4.6: Inhomogeneous Linear First-Order ODEs Revisited
The linear first-order ode can be solved by use of an integrating factor. Here I show that odes having constant coefficients can be solved by our newly learned solution method.
Solve \(\overset{.}{x}+2x=e^{-t}\) with \(x(0)=3/4\).
Solution
Rather than using an integrating factor, we follow the three-step approach:
- find the general homogeneous solution;
- find a particular solution;
- add them and satisfy initial conditions.
Accordingly, we try the ansatz \(x_h (t) = e^{rt}\) for the homogeneous ode \(\overset{.}{x}+ 2x = 0\) and find \[r+2=0,\quad\text{or}\quad r=-2.\nonumber\]
To find a particular solution, we try the ansatz \(x_p(t) = Ae^{−t}\), and upon substitution \[-A+2A=1,\quad\text{or}\quad A=1.\nonumber\]
Therefore, the general solution to the ode is \[x(t)=ce^{-2t}+e^{-t}.\nonumber\]
The single initial condition determines the unknown constant \(c\):
\[x(0)=\frac{3}{4}=c+1,\nonumber\] so that \(c=-1/4\). Hence, \[\begin{aligned}x(t)&=e^{-t}-\frac{1}{4}e^{-2t} \\ &=e^{-t}\left(1-\frac{1}{4}e^{-t}\right).\end{aligned}\]