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.

Resonance open_in_new

When the forcing term $f(x)$ is a complimentary function of the ODE, we detune it.

The general rule is that we try $y_p(t) = t \times (\text{non-resonant particular integral})$.

Example (resonance)

Variation of parameters open_in_new

For the equation $$y'' + p(x)y' + q(x) y = f(x),$$ given its two linearly independent complimentary functions $y_1(x), y_2(x)$, a particular integral is given by $$ y_p(x) = y_2(x) \int^x \frac{y_1(\xi) f(\xi)}{W(\xi)}d\xi - y_1(x) \int^x \frac{y_2(\xi) f(\xi)}{W(\xi)} d\xi. $$

Derivation