# Math Help - y'' + 4y' + 5y = xe^x

1. ## y'' + 4y' + 5y = xe^x

Hi I have some problem with the following d.e

y'' + 4y' + 5y = xe^x.

I will solve it as much as I can

Yh

fives yh = c1 cosx + c2 sinx)*e^-2x

Yp

hard to know what to choose, but I looked at an example

Yp = (A+Bx)e^x (I don't really know why we take it)
Yp' = (A + B + Bx)e^x
Yp'' = (A + 2b + Bx)e^x

Right lets put it into the d.e

((A + 2b + Bx)e^x) + 4((A + B + Bx)e^x) + 5((A+Bx)e^x) = x^x

I dont whats happenening but i dont get the real, constants, I get B = -1/4 etc
would be nice if someone could correct my solution, and help me

Thanks

2. You make that choice for $y_{p}$ because any derivative of $xe^{x}$ will have that form.

$y_{p} = (A+Bx)e^{x}$

$y'_{p} = Be^{x} + (A+Bx)e^{x} = (A+B+Bx)e^{x}$

$y''_{p} = Be^{x} + (A+B+Bx) e^{x} = (A+2B+Bx)e^{x}$

So that part was correct.

$(A+2B+Bx)e^{x} +4(A+B+Bx)e^{x} + 5(A+Bx)e^{x} = xe^{x}$

$(A+2B+4A+4B+5A)e^{x} + (B+4B+5B)xe^{x} = xe^{x}$

so $10A + 6B = 0$ and $10B = 1$

$B = \frac{1}{10}$

$A = -\frac{6}{100} = -\frac{3}{50}$

3. Thank you very much