Ordinary differential equations-method of undetermined coefficients. Use the method of undetermined coefficients to solve the IVP
$y′′ + 4y′ + 4y = (3 + x)e^{−2x},\; y(0) = 2,\; y′(0) = 5$ .
My answer (partial)
$r^2 + 4r +4 = 0$
$ (r+ 2)^2 = 0$
$r = -2$
$y_h = (c_1 +xc_2) e^{-2x}$
$y_p =(xc_1 + x^2c_2)e^{-2x} $
Unable to reach final answer. Need help!
 A: Your homogeneous solution is correct, but your particular solution should at least use different constants.   Because $(c_1+c_2 x) e^{-2 x}$ returns zero upon substitution into the differential equation (because it is the homogeneous solution), the particular solution should contain the next two higher powers, i.e.
$$y_p(x) = (a x^2+b x^3) e^{-2 x}$$ 
Substituting this into the equation returns
$$y_p''+4 y_p'+4 y_p = 2 (a + 3 b x) e^{-2 x} = (3+x) e^{-2 x}$$
Equate coefficients of $x$, i.e., $2 a=3$, $6 b = 1$.  The solution is then
$$y(x) = \left (c_1+c_2 x +\frac{3}{2} x^2 + \frac16 x^3\right )e^{-2 x}$$
Find $c_1$ and $c_2$ from the initial conditions.
$$y(0)=2 \implies c_1=2$$
$$y'(0)=5 \implies -2 c_1+c_2 = 5 \implies c_2=9$$
A: Just noting additional point, following @Ron's answer. If you have: $$a_ny^{(n)}+\cdots+a_1y'+a_0y=Q(x)$$ and  two following conditions are fulfilled:


*

*The characteristics equation of the associated homogenous OE has an $r$ multiple roots.

*$Q(x)$ contains a term such that, ignoring constants, is $x^t$ times a term a(x) in $y_c$.
Then in this case the $y_p$ will be a linear combination of $$x^{k+r}a(x)$$  and all its linearly independent derivatives.
I think you can find out @Ron's answer better after this points. (-:
