# Solving for $y'' - 4y' - 5y - 2 = 0$

I am looking to solve for the above nonhomogeneous ODE. I know how to find the general solution for the reduced equation of the homogeneous form, that is, $$y'' - 4y' - 5y = 0.$$

The characteristic equation is $$r^{2} - 4r - 5 = 0$$, which gives two real and distinct roots $$r=-1,5$$.

So the complementary solution is $$y_{c}=c_{1}e^{5x} + c_{2}e^{-x}$$.

Now I am looking to guess the particular on the right-hand side but I am not sure about how to do that in order to find the general solution of the above nonhomogenous ODE.

• If you cannot see the one below, you could try polynomials, i.e. assume $y = Ax^2 + Bx = C$ satisfies the nonhomogeneous ODE, then plug it into the equation to solve for $A,B,C$ you might be able to get a same answer. – xbh Nov 28 '18 at 9:30
• Define $z=5y+2$ and see what happens. – Claude Leibovici Nov 28 '18 at 9:44

$$y''-4y'-5y=2$$

If $$y=-\frac25$$ everywhere, then $$y'=y''=0$$.

Hint:

Let $$y=z+a+bx+cx^2+d\cdot x^3$$

$$y'=z'+b+2cx+3d\cdot x^2$$

$$y''=z''+2c+6\cdot dx$$

$$2=y''-4y'-5y=z''-4z'-5z+x^3(d)+x^2(c-12d)+x(b-8c-30d)-5a-4b+2c$$

Set $$0=d=c-12d=b-8c-30d\implies b=c=d=0;$$

$$2=2c-4b-5a\iff a=?$$