Skip to main content

Math 220-2: Kursobjekt

Section 1.26 First-order linear differential equations

Definition 1.26.1. First-order linear equation.

A first-order linear differential equation for the function \(f\) is a differential equation that can be written in the form
\begin{equation} f'(x)+p(x)f(x)=q(x)\tag{1.26.1} \end{equation}
for some functions \(p\) and \(q\text{.}\) Equation (1.26.1) is called the standard form of the equation.

Definition 1.26.2. Integrating factor.

Consider a first-order linear equation with standard form
\begin{equation*} f'(x)+p(x)f(x)=q(x)\text{.} \end{equation*}
An integrating factor for this equation is any function of the form
\begin{equation*} v(x)=e^{P(x)}\text{,} \end{equation*}
where \(P(x)\) is an antiderivative of \(p(x)\text{.}\)
As a somewhat liberal usage of indefinite integral notation, we sometimes write \(v(x)=e^{\int p(x)\, dx} \text{.}\)

Example 1.26.4. Exponential change revisited.

Use the integrating factor method to find the general solution to \(y'=k y\text{,}\) where \(k\) is any fixed nonzero constant.
Solution.
Observe that this differential equation is both linear and separable, but we are asked here to use the linear differential equation technique for solving The standard form of the differential equation is
\begin{equation*} y'\underset{p(x)}{\underbrace{-k}}y=\underset{q(x)}{\underbrace{0}}\text{.} \end{equation*}
Clearly, \(P(x)=-kt\) is an antiderivative of \(p(x)=-k\text{,}\) so we set
\begin{equation*} v(x)=e^{-kt}\text{.} \end{equation*}
Next we compute
\begin{equation*} \int v(x)q(x)\, dx=\int 0\, dx= C\text{.} \end{equation*}
Finally, we conclude that the general solution is
\begin{equation*} f(x)=\frac{C}{v(x)}=\frac{C}{e^{-kx}}=Ce^{kx}\text{.} \end{equation*}
This should come as no surprise: we have re-derived the general solution to the exponential change differential equation \(y'=ky\text{.}\)

Example 1.26.5. Non-separable example.

Find the general solution to the differential equation
\begin{equation*} (x^2+1)f'(x)-x=x^3-xf(x), \ x\in (-\infty, \infty)\text{.} \end{equation*}
Solution.
Following Procedure 1.26.3 we first bring the differential equation into standard form:
\begin{equation*} f'(x)+\underset{p(x)}{\underbrace{\frac{x}{x^2+1}}}f(x)=\frac{x^3+x}{x^2+1}=\underset{q(x)}{\underbrace{x}}\text{.} \end{equation*}
We then compute
\begin{equation*} \int p(x)\, dx=\int \frac{x}{x^2+1}\, dx=\frac{1}{2}\ln\vert x^2+1\vert+C=\frac{1}{2}\ln (x^2+1)+C\text{,} \end{equation*}
and thus set
\begin{equation*} v(x)=e^{\frac{1}{2}\ln(x^2+1)}=\sqrt{x^2+1}\text{.} \end{equation*}
Next, we compute
\begin{equation*} \int v(x)q(x)\, dx=\int x\sqrt{x^2+1}, dx=\underset{G(x)}{\underbrace{\frac{1}{3}(x^2+1)}}+C\text{.} \end{equation*}
Finally, we conclude that the general solution is given by
\begin{equation*} f(x)=\frac{G(x)}{v(x)}+\frac{C}{v(x)}=\frac{1}{3}(x^2+1)+\frac{C}{\sqrt{x^2+1}}\text{.} \end{equation*}
Note in particular that setting \(C=0\text{,}\) we see that the polynomial \(f(x)=\frac{1}{3}(x^2+1)\) is a solution to the differential equation.

Example 1.26.6. Initial value.

Consider the differential equation
\begin{equation*} (x-2)f'=e^{-x}-3f, \ x\in (-\infty, 2)\text{.} \end{equation*}
  1. Find the general solution to the differential equation.
  2. Find the solution satisfying \(f(1)=-1\text{.}\)
Solution.
First we bring the differential equation into standard form:
\begin{equation*} f'+\underset{p(x)}{\underbrace{\frac{3}{x-2}}}f=\underset{q(x)}{\underbrace{\frac{e^{-x}}{x-2}}}\text{.} \end{equation*}
Since \(3\ln\abs{x-2}\) is an antiderivative of \(p(x)=3/(x-2)\text{,}\) we set the integrating factor to be
\begin{equation*} v(x)=e^{3\ln\abs{x-2}}=\abs{x-2}^3=-(x-2)^3\text{,} \end{equation*}
where the minus sign arises due to the fact that we assume \(x\leq 2\text{,}\) and hence \(x-2\leq 0\text{.}\) Next we compute (using integration by parts twice)
\begin{equation*} \int v(x)q(x)\, dx=\int -(x-2)^2e^{-x}\, dx=(x-2)^2e^{-x}+2(x-2)e^{-x}+2e^{-x}+C=\underset{G(x)}{\underbrace{(x^2-2x+2)e^{-x}}}+C\text{.} \end{equation*}
We conclude that the general solution is given by
\begin{equation*} f(x)=\frac{G(x)}{v(x)}+\frac{C}{v(x)}=-\frac{x^2-2x+2}{(x-2)^3}e^{-x}-\frac{C}{(x-2)^3}\text{.} \end{equation*}
Finally, the condition \(f(1)=-1\) implies that
\begin{equation*} -\frac{1}{(-1)}e^{-1}-\frac{C}{(-1)}=-1\text{,} \end{equation*}
and thus
\begin{equation*} C=-(e^{-1}+1)\text{.} \end{equation*}