Inhomogeneous linear second-order ODE
For such ODE with constant coefficients, $$ ay'' + by' + cy = f(x), $$ try to guess the following for the particular solution:
$f(x)$ |
$y_p(x)$ |
|---|---|
$e^{\lambda x}$ |
$Ae^{\lambda x}$ |
$\sin kx$ or $\cos kx$ |
$A\sin kx + B\cos kx$ |
degree-$n$ polynomial |
degree-$n$ polynomial |
Also due to linearity of the differential operator, you can find separately the particular solution of each term in $f(x)$ and then add them.