Calculus II 06.04 First-Order Linear Differential Equations
Previous | Calculus II 06.03 Separating Variables and the Logistic Equation |
Next | Calculus II 07 Integration Applications |
Contents
6.4 First-Order Linear Differential Equations
- Solve a first-order linear differential equation
- Use linear differential equations to solve applied problems
First-Order Linear Differential Equations
Definition 6.4.1 First-Order Linear Differential Equation
A first-order linear differential equation has the form
- $$ y^{\prime }+P(x)y=Q(x) \text{ or }\frac{dy}{dx}+P(x)y=Q(x)$$
where \(P\) and \(Q\) are continuous functions for \(x\). This first-order linear differential equation is in standard form.
For example, the linear equation \(xy^{\prime }+y=2x\), where \(x \neq 0\), can be written as
\(xy^{\prime }+y\) | \(=2x\) | Original Equation |
\(xy^{\prime }+y\) | \(=(xy)^{\prime } \) | The Product Rule gives us this identity. |
\((xy)^{\prime }\) | \(=2x\) | Substituting the Product Rule identity. |
\(y\) | $$=x+\frac{C}{x} \:\:\:\: $$ | Substituting the Product Rule identity and separating the variables. |
It turns out that every first-order linear differential equation can be solved in a similar fashion by multiplying both sides by a suitable function \(u(x)\) called an integrating factor. When both sides are multiplied by the integrating factor the left-handed side, the \(y\) side, becomes the derivative for a product.
\(u(x)\) | $$=e^{\int P(x)\:dx} $$ | Integrating Factor |
\(y\) | $$=\frac{1}{u(x)}\int Q(x)u(x)\:dx $$ | General Solution |
\(y(x)\) | $$= \frac{\int e^{P(x)dx}Q(x)dx+C}{e^{\int P(x)dx }} \:\:\:\: $$ | General Solution: Not Reduced |
Substituting the integrating factor into the definition produces.
- $$ y^{\prime }e^{\int P(x)\:dx}+P(x)ye^{\int P(x)\:dx}=Q(x)e^{\int P(x)\:dx} $$
which reduces to
- $$ \left [ ye^{\int P(x)\:dx} \right ]^{\prime }=Q(x)e^{\int P(x)\:dx}\:\:\:\:(1) $$
Take equation 1, integrate both sides, then divide by \(u(x)\) produces the general solution.
Example 6.4.1 Solving a Linear Differential Equation
Find the general solution for
- $$ y^{\prime }+y=e^{x} $$
Solution For this equation, \(P(x)=1\) and \(Q(x)=e^{x}\). The integrating factor is
- \( u(x)=e^{\int P(x)dx}=e^{\int dx}=e^{x} \:\:\:\: \)Drop \(C\) when integrating \(P(x)\).
This produces the general solution
\(y\) | $$= \frac{1}{u(x)}\int Q(x)u(x)\:dx $$ |
$$ = \frac{1}{e^{x}}\int e^{x}(e^{x})\:dx$$ | |
$$= e^{-x}(\frac{1}{2}e^{2x}+C) $$ | |
$$y=\frac{1}{2}e^{x}+Ce^{-x} $$ |
Theorem 6.4.1 Solution for a First-Order Linear Differential Equation
An integrating factor for the first-order linear differential equation
- $$ y^{\prime }+P(x)y=Q(x)$$
is
- $$ u(x)=e^{\int P(x)\:dx} $$
The general solution is
- $$ ye^{\int P(x)\:dx}=\int Q(x)e^{\int P(x)\:dx}\:dx+C $$
Example 6.4.2 Solving a First-Order Linear Differential Equation
Find the general solution for \(xy^{\prime }-2y=x^{2}\).
Substituting \(P(x)=-2/x\) produces
integrating both sides with respect to \(x\) produces the integrating factor
Multiplying each side by \(1/x^{2}\) yields
Figure 6.4.1 shows several solution curves for \(C = -2,\: -1,\: 0,\: 1,\: 2,\: 3, \text{ and } 4\). |
In most falling-body problems discussed so far air resistance has been neglected. In the Example 3 the air resistance on a falling object is assumed to be proportional to its velocity \(v\). If \(g\) is the gravitational constant, the downward force \(F\) on a falling object with mass \(m\) is given by the difference \(mg-kv\). If \(a\) is the object's acceleration, then by Newton’s Second Law of Motion[1],
- $$ F=ma=m\frac{dv}{dt} $$
which yields the following differential equation.
- $$ m\frac{dv}{dt}=mg-kv\:\Rightarrow \:\frac{dv}{dt}+\frac{kv}{m}=g $$
Example 6.4.3 A Falling Object with Air Resistance
An object with mass \(m\) is dropped from a hovering helicopter. The air resistance is proportional to the object's velocity. Find the object's velocity as a function for \(t\).
Solution The velocity \(v\) satisfies the equation
$$ \frac{dv}{dt}+\frac{kv}{m}=g.\:\:\:\: \color{red}{ g = \text{ gravitational constant, } k = \text{ proportionality constant }}$$
Let \(b=k/m\), then separate the variables to produce
\(dv\) | \(= (g-bv)\:dt \) | |
$$ \int \frac{dv}{g-bv}$$ | $$= \int dt$$ | |
$$-\frac{1}{b}\ln\left | g-bv \right | $$ | \(=t+C_{1} \) | |
\(\ln\left | g-bv \right | \) | \(= -bt-bC_{1}\) | |
\(g-bv\) | \(=Ce^{-bt}\) | \(C=e^{-bC_{1}}\) |
Because the object was dropper, \(v=0\) when \(t=0\); so \(g=C\), and it follows that
- $$ -bv=-g+ge^{-bt}\rightarrow v=\frac{g-ge^{-bt}}{b}=\frac{mg}{k} \left (1-e^{-kt/m} \right ) $$
Electrical Circuits
An electric circuit has these properties electric current \(I\) (in amperes), a resistance \(R\) (in ohms), an inductance \(L\) (in henrys), and a constant electromotive force \(E\) (in volts), as shown in Figure 6.4.2. My notation uses \(A\) for amperes, \(R\) for resistance, and \(V\) for volts in describing Ohm's Law[2]. According to Kirchhoff’s Second Law[3], if the switch \(S\) is closed when time \(t=0\) in seconds, then the applied electromotive force (voltage) is equal to all the voltage in the circuit. This, in turn, means that the current \(I\) satisfies the differential equation
|
Example 6.4.4 An Electric Circuit Problem
Find the current \(I\) as a function of time \(t\) (in seconds), given that \(I\) satisfies the
differential equation \(L(dI/dt)+RI=\sin 2t\), where \(R\) and \(L\) are nonzero constants.
Solution The given linear equation in standard form is
- $$ \frac{dI}{dt}+\frac{R}{L}I=\frac{1}{L}\sin 2t $$
Let \(P(t)=R/L\), then
\(e^{\int P(t)\:dt} \) | \(= e^{(R/L)t} \) | |
$$Ie^{(R/L)t} $$ | $$=\frac{1}{L}\int e^{(R/L)t}\sin 2t\:dt $$ | by Theorem 6.4.1 |
$$Ie^{(R/L)t} $$ | $$=\frac{1}{4L^{2}+R^{2}}e^{(R/L)t}(R\:\sin 2t-2L\:\cos 2t)+C $$ | |
$$I$$ | $$ = e^{-(R/L)t}\left [ \frac{1}{4L^{2}+R^{2}}e^{(R/L)t}(R\sin 2t-2L\cos2t)+C \right ] $$ | |
$$= \frac{1}{4L^{2}+R^{2}}(R\sin 2t-2L\cos2t)+Ce^{-(R/L)t} $$ | General Solution |
Example 6.4.5 A Chemical Mixture Problem
A solution with 90% water and 10% alcohol fills a 50 gallon tank. A second solution containing 50% water and 50% alcohol is added to the tank at 4 gallons per minute. As the second solution is being added, the tank is being drained at 5 gallons per minute, as shown in Figure 6.4.3. The solution in the tank is stirred constantly. How much alcohol is in the tank after 10 minutes?
gallons in alcohol per minute. The tank also gains alcohol at two gallons per minute, therefore the alcohol in the tank changes with the rate
Let
Plug this in and integrate to find the general solution
Use \(y=5\) when \(t=0\) to find \(C\)
When t=10, the alcohol in the tank is
which represents a solution containing 33.6% alcohol. |
Example 6.4.6 General Solution for a Trigonometric ODE
Solve
- $$\frac{dy}{dx}\cos^{2} x+y-1=0,\:\: y(0) = 5$$
Solution Solve for \(\frac{dy(x)}{dx}\) by separating out \( \cos^{2} x\). Then solve for \(y(x)\). Then solve for \(C\) and substitute back in the solution for \(C\) to obtain the general solution.
$$y(x)+\cos^{2}x\frac{dy(x)}{dx}-1$$ | \( = 0\) | Separate out \(y(x)\) |
$$ \frac{dy(x)}{dx} $$ | \(-(y(x)-1)\sec^{2}x))\) | Since \(\cos x=\frac{1}{sec x}\) |
$$\frac{dy(x)}{dx}$$ | \(=(-y(x)+1)\sec^{2}x\) | Simplify |
$$ \frac{\frac{dy(x)}{dx}}{-y(x)+1} $$ | \(=\int \sec^{2}x\) | Divide both sides by \(-y(x)+1\) |
$$ \int \frac{\frac{dy(x)}{dx}}{-y(x)+1}dx $$ | $$=\int \sec^{2}x\:dx $$ | Integrate both sides with respect to \(x\) |
$$-\log (-y(x)+1) $$ | \(=C_{1}+\tan x\) | Evaluate the integrals where \(C_{1}\) is an arbitrary constant |
\(y(x) \) | \(=-e^{-C_{1}-\tan x}+1 \) | Solve for \(y(x)\) |
\(y(x) \) | $$=\frac{C_{1}}{e^{\tan x}}+1 $$ | Simplify the arbitrary constants |
\(C_{1}+1\) | \(=5\) | Solve for \(C_{1}\) by substituting \(y(0) = 5\) |
\(C_{1}\) | \(=4\) | Solve the equation. |
\(y(x)\) | $$=\frac{4}{e^{\tan x}}+1 $$ | Substitute \(C_{1}=4\) into the equation. |
Internal Links
Parent Article: Calculus II 06 Differential Equations