Stuck at a differential equation, particular solution The problem is:
$y'' + 4y' + 3y = (4x-2).e^{-3x}$ 
with conditions $y(0)=2$ & $y'(0)=0$
I first find the characteristic polynomial $p(r) = (r+3)(r+1)$ which gives me the homogeneous solution $yh = A.e^{-3x}+B.e^{-x}$. 
But I'm having trouble finding the particular solution. 
I first make the function 
$z(x)=y(x).e^{3x} \implies y(x) = z(x).e(-3x)$.
$y(x) = e^{-3x} . z$
$y'(x) = e^{-3x} .(z'-3z)$
$y''(x) = e^{-3x} . (z'' - 6z' + 9z)$
I substitute this into $y''+4y'+3y = (4x-2) .e^{-3x}$ which gives me (after dividing both sides with $e^{-3x})$:
$(z''-2z') = (4x-2)$ 
According to my calculus book I can now find the solution on the form $z=x(cx+d)$ because there is no z-term in the $LHS$ above.
$z = x(cx+d) = cx^2 + d(x)$
$z' = 2cx + d$
$z'' = 2c$
Substituting this into $(z''-2z') = (4x-2)$ gives me:
$2c - 4cx - 2d = (4x-2)$ 
which tells me that $c=-1$ and $d=0 (-x^2)$
According to the book the solution is $y(x) = 3e^(-3x) - (x^2 + 1) .e^{-3x}$
I can't see why I get $-(x^2) .e^(-3x)$ as the particular solution while the book claims that it's:
$-(x^2 + 1) .e^{-3x}$.
 A: I suggest you to use the method Variation of parameters. According to this way, we should solve the following OE to find the particular solution. Also,you noted that $y_1=e^{-3x},~y_2=e^{-x}$ are the solutions for homogenous associated OE, so we have: $$u'_1=\frac{-y_2f(x)}W,~~~u'_2=\frac{y_1f(x)}W$$ where in $f(x)=(4x-2)e^{-3x}$ and $W=W(y_1,y_2)=2e^{-4x}$ is the Wronskian of two solutions $y_1,y_2$.
We have, then, 
$$u'_1=\frac{-e^{-3x}(4x-2)e^{-3x}}{2e^{-4x}}\to u'_1=\frac{(4x-2)e^{-2x}}{-2}$$
and $$u'_2=\frac{e^{-x}(4x-2)e^{-3x}}{2e^{-4x}}\to u'_2=\frac{(4x-2)}{2}$$ Now find $u_1$ and $u_2$ by a simple integration and note that in this approach $y_p=u_1y_1+u_2y_2$
A: Let $D\equiv \frac{d}{dx}$ and apply the following procedure:
The given ODE is $(D^2+4D+3)y=(4x-2)e^{-3x}$ and so (formally) $y_p=\frac{1}{(D^2+4D+3)}(4x-2)e^{-3x}$. There is now a general identity $\frac{1}{f(D)}e^{ax}g(x)=e^{ax}\frac{1}{f(D+a)}g(x)$ which yields 
$y_p=e^{-3x}\frac{1}{D^2-2D}(4x-2)$
$=-e^{-3x}\frac{1}{2D(1-\frac{D}{2})}(4x-2)$
$=-e^{-3x}\frac{1}{2D}(1+D/2+(D/2)^2\cdots)(4x-2)$
$=-e^{-3x}\frac{1}{2D}(4x)$. 
Now $1/D$ stands for taking the antiderivative so we get $y_p=-e^{-3x}x^2$.
So your particular solution is indeed $-e^{-3x}x^2$ and the general solution is $y=Ae^{-3x}+Be^{-x}-e^{-3x}x^2$. Substituting the given initial conditions we get two equations $A+B=2$ and $3A+B=0$. Solving them we get $A=-1$ and $B=3$ so that the solution of the complete problem is indeed $3e^{-x}-e^{-3x}(x^2+1)$.
