Example (eigenfunction forcing)

When you notice the forcing term is an eigenfunction of the operator on $y$, guess the particular integral to be some constant multiple of the forcing term.

For example, consider the equation $$ y' + \beta y = \alpha \gamma e^{-\alpha x},\quad \alpha\neq\beta. $$ We guess $$ y_p(x) = Ce^{-\alpha x}, $$ then $$\begin{align*} -\alpha Ce^{-\alpha x} + \beta Ce^{-\alpha x} &= \alpha\gamma e^{-\alpha x} \\ C &= \frac{\alpha}{\beta-\alpha} \gamma. \end{align*}$$

Now the general solution is $y(x) = y_c(x) + y_p(x)$ where $$ y_c' + \beta y_c = 0 \implies y_c = De^{-\beta x}. $$ Therefore $$ y(x) = De^{-\beta x} + \frac{\alpha}{\beta-\alpha}\gamma e^{-\alpha x}. $$