[Math] Find the general solution for the differential equation $(D^2+4D+4)y=5xe^{-2x}$

ordinary differential equations

Find the general solution for the differential equation $(D^2+4D+4)y=5xe^{-2x}$

Attempt: $y_c(x)=c_1e^{-2x}+c_2xe^{-2x}$ and $y_p(x)=Ax^2e^{-2x}$. Moreover $y'_p(x)=2Axe^{-2x}-2Ax^2e^{-2x}$ and $y_p''(x)=2Ae^{-2x}-8Axe^{-2x}+4Ax^2e^{-2x}$
So $A=5x/2$. So the general solution is $y(x)=c_1e^{-2x}+c_2xe^{-2x}+(5/2)x^3e^{-2x}$.
But the answer says that the genral solution is $y(x)=c_1e^{-2x}+c_2xe^{-2x}+(5/6)x^3e^{-2x}$. I am very new in differential equations. Did I mistake somewhere?Thanks!

Best Answer

This problem can be easily solved directly. Multiplying both sides by $e^{2x}$ yields

$$e^{2x}y''+4e^{2x}y'+4e^{2x}y=(e^{2x}y)''=5x$$

Integrating twice and multiplying by $e^{-2x}$ gives the solution you've obtained.