Forced linear ODE

General method for any linear forced ODEs:

  1. Find (guess) a particular integral $y_p(x)$ i.e. a single solution of the forced equation;

  2. Write the general solution of the ODE as $$ y(x) = y_p(x) + y_c(x). $$ Then $y_c(x)$, the complementary function, satisfies the homogenous equation.

  3. Combine $y_p$ and $y_c$ to get the general solution.

Example (constant forcing)

Example (eigenfunction forcing)