[Math] About a particular solution of the equation $y”-y=e^x$

ordinary differential equations

ODE: $y''-y=e^x$.

I found that complemantary solution of the ode is
$y_c=c_1e^x+c_2e^{-x}$. No problem.

But, I don' t understand why do we suppose that trial solution is $y_p=Axe^x$ instead of $y_p=Ae^x$ ?

What is the key point for selection of a particular solution of an ODE?

Best Answer

Always check the complementary solution, $y'' - y = 0$, before identifying a particular solution.

$y'' - y = 0$ has a solution of the form $y = C_1 e^x + C_2 e^{-x}$. Since the right handside, $e^x$, is a term in the complementary solution you can usually try multiplying the particular solution that you would try, $y_p = Ae^x$, by $x$: try $y_p = Ax e^x$.