First Order Linear Differential Equations
A first order linear differential equation is a differential equation of the form \(y'+p(x) y=q(x)\). The left-hand side of this equation looks almost like the result of using the product rule, so we solve the equation by multiplying through by a factor that will make the left-hand side exactly the result of a product rule, and then integrating. This factor is called an integrating factor.
First order linear differential equations are the only differential equations that can be solved even with variable coefficients - almost every other kind of equation that can be solved explicitly requires the coefficients to be constant, making these one of the broadest classes of differential equations that can be solved.
Integrating Factors
An integrating factor will be a function \(f(x)\) such that multiplying it to both sides of the equation,
\[\begin{align} f(x) \left[ y'+p(x)y \right] &= f(x)q(x) \\ \\ f(x)y'+f(x)p(x)y &= f(x)q(x), \end{align}\]
gives an expression on the left-hand side that can be integrated with the anti-product rule. In other words, it is the function that satisfies:
\[\begin{align} f(x)y'+f(x)p(x)y &= f(x)y'+f'(x)y \\ \\ \int\left[ f(x)y'+f(x)p(x)y \right]\ dx &= f(x)y+C \end{align}\]
This means the function \(f\) should satisfy \(f'(x)=f(x)p(x)\), which is a separable differential equation. This can be solved as
\[\begin{equation}\begin{split} \frac{f'(x)}{f(x)}\, dx= p(x)\, dx &\implies \int \frac{f'(x)}{f(x)}\, dx=\int p(x)\, dx \\ \\ & \implies \ln |f(x)|=\int p(x)\, dx \\ \\ &\implies f(x)= {\large e}^{\int p(x)\, dx}. \end{split}\end{equation}\]
This is the integrating factor needed to solve first order linear differential equations.
Solving Equations
With the integrating factor, solving the equations is relatively straightforward.
Solve the differential equation \(y'+e^xy=e^x\).
Here, \(p(x)=q(x)=e^x\). Our integrating factor is \[e^{\int e^x\, dx}=e^{e^x}.\] Note that we omit the constant of integration, since it would just produce a shifted solution to the equation. Now we multiply both sides by \(e^{e^x}\) to get \[e^{e^x}y'+e^{e^x}e^xy=e^xe^{e^x}\implies \left[e^{e^x}y\right]'=e^xe^{e^x},\] and now integrating both sides gives \[e^{e^x}y=e^{e^x}+C\implies y=Ce^{-e^x}+1.\]
Solve \[\dfrac{dy}{dx} - 3y = e^{2x}, \quad y(0) = 3\]
\[v(x) = e^{-3x} \Rightarrow e^{-3x} \dfrac{dy}{dx} - 3e^{-3x}y = e^{-x} \Rightarrow\] \[\dfrac{d}{dx} \left(e^{-3x}y\right) = e^{-x} \Rightarrow\] \[e^{-3x}y = -e^{-x} + C \Rightarrow y(x) = Ce^{3x} - e^{2x}\] along the condition \(y(0) = 3\) we get \(C = 4\) so the function is \[y(x) = 4e^{3x} - e^{2x}\]
Solve \[\begin{cases} ty' +(2t +1)y =te^{-2t},\quad t \in [1,\infty)\\ y(1) = 0 \end{cases}\]
\[y' + \frac{2t +1}{t}y = e^{-2t} \rightarrow v(t) = te^{2t} \rightarrow \dfrac{d}{dt} (te^{2t}y) = t \Rightarrow\] \[y(t) =\frac{1}{t}e^{-2t}\left(\frac{t^2}{2} + C\right),\quad y(1) = 0 \Rightarrow C = \frac{-1}{2} \Rightarrow\] \[y(t) = \frac{1}{2}\left(t -\frac{1}{t}\right)e^{-2t}\]
Applications
Many physical systems can be described by first order linear differential equations.
Suppose there is a circuit with a switch, a battery, a resistor, and an inductor in series. The battery produces a voltage of 45 volts and a current of \(I(t\) amperes at time \(t\). The resistor is an \(9\) ohm resistor and the inductor has an inductance of \(3\) henries. If the switch is initially closed, what is the current in the circuit a long time after the switch has been opened?
Ohm's law says that the voltage drop due to the resistor is \(9I(t) \) volts. The voltage drop from the inductor is \(3 I'(t)\). Kirchoff's laws say that the sum of the voltage drops is equal to the supplied voltage, so we find \[ 3I'(t)+9I(t)=45\implies I'(t)+3I(t)=15.\] The integrating factor is \(e^{\int 3\, dt}=e^{3t}\), and multiplying through by this gives \[I'(t)e^{3t}+3e^{3t}I'(t)=15e^{3t}\implies \left[I(t)e^{3t}\right]'=15e^{3t}\implies I(t)e^{3t}=5e^{3t}+C\implies I(t)=Ce^{-3t}+5.\] As \(t\to\infty\), we see that \(I(t)\to 5\), so the current after a long time is 5 amperes.