Section 11.2 First Order Linear DEs
Definition 11.2.1. Linear First Order DE.
A first order DE that can be put into the form
is called a linear first order DE.
Example 11.2.2.
Which of the following DEs are linear?
\(\displaystyle y' = e^x y\)
\(\displaystyle \dfrac{dy}{dx} = -\dfrac{x}{y+1}\)
\(\displaystyle \sin(x) y' + \cos(x) y = \cos(x)\)
\(\displaystyle y^2 y' + x^2 y =4\)
\(a\) and \(c\text{.}\)
Since this DE can be rearranged as
\begin{equation*} y' - e^x y = 0 \end{equation*}it is linear with \(P(x) = -e^x\) and \(Q(x) = 0\text{.}\) Notice that this DE is also separable since it is of the form \(y' = f(x)g(y)\text{.}\) Here \(f(x) = e^x\) and \(g(y) = y\text{.}\)We cannot rearrange this DE into the form \(y' + P(x) y = Q(x)\) and hence it is not linear. It is however separable.
Dividing the equation by \(\sin(x)\) gives
\begin{equation*} y' + \cot(x) y = \cot(x) \end{equation*}and hence this DE is linear with \(P(x) = \cot(x)\) and \(Q(x) = \cot(x)\text{.}\) Notice that this DE is also exact since it can be written as\begin{equation*} \dfrac{d}{dx} \left( \sin(x) y \right) = \cos(x)\text{.} \end{equation*}This observation leads to the solution of the DE very efficiently.This DE is not linear. It also isn't separable nor exact.
As illustrated in Example 11.2.2(c), we can solve a first order linear DE if it is of the form
since in this case the DE is already exact. If the DE is not of this form we proceed by looking for an integrating factor, \(I(x)\text{,}\) for the DE. Remember that multiplying both sides of the DE by an integrating factor makes the equation exact. So, consider the first order linear DE
Multiplying both sides by the (as yet unknown) function \(I(x)\) gives
On comparing this to (11.2.1) we can see that this will only be exact if
(11.2.2) is itself a first order linear DE for the function \(I(x)\text{.}\) However it is also separable and so we can solve it via the separation of variables technique. This gives
where here \(\int P(x) dx\) refers to any one of the antiderivatives of \(P(x)\text{.}\) Thus, in theory at least, we can find an entire family of integrating factors for our original DE. It won’t matter which particular integrating factor we use so we usually just take the one with \(A=1\text{.}\) In summary:
Algorithm 11.2.3. Solving a First Order Linear DE.
To solve the first order linear DE
Calculate the integrating factor
\begin{equation*} I(x) = e^{\int P(x) dx} \end{equation*}Multiply both sides of the DE by the integrating factor \(I(x)\)
Solve the resulting exact DE \(\dfrac{d}{dx} \left(I(x) y \right) = I(x) Q(x)\)
Example 11.2.4.
Solve \(y' = x+y\)
\(y(x) = Ce^x - x - 1\)
This first order DE is not separable. If we rearrange the equation as
we can see that the equation is linear with \(P(x) = -1\) and \(Q(x) = x\text{.}\) Thus an integrating factor will be
Multiplying both sides of the DE by \(I(x)\) gives
and hence
Using integration by parts gives
and so the general solution is
Note: As always we can check our answer by substituting back into the original DE.
Example 11.2.5.
Solve \(y' + \sin(x)y = \sin(x)\)
\(y(x) = 1+C e^{\cos(x)}\)
This equation is linear with \(P(x) = \sin(x)\) and \(Q(x) = \sin(x)\text{.}\) Thus an integrating factor will be
Multiplying both sides of the DE by the integrating factor gives
and hence
Using integration by substitution gives
Thus the general solution is
Once again we should check that this is indeed a solution by substituting back into the original DE.
Example 11.2.6.
Solve the initial-value problem
\(y(x) = x^3 + x\)
On rearranging the equation as
we see that this DE is linear with \(P(x) = -\frac{1}{x}\) and \(Q(x) = 2x^2\text{.}\) Thus an integrating factor will be
Multiplying both sides by \(I(x)\) gives
and hence
Thus the general solution is
Using the initial condition \(y(1) = 2\) gives
and so the solution to the initial-value problem is
Exercises Example Tasks
1.
Solve the first order linear DE \(\dfrac{dP}{dt} = t^2 - P\text{.}\)
2.
Solve \(y' + \cot(x)y = x\text{.}\)
3.
Solve the initial-value problem
4.
Solve \(x^2y' + y = 1\text{.}\)