Calculus – Finding Particular Solution of Second Order Differential Equation

calculusordinary differential equations

I am a bit stuck on the following second order differential equation, using the method of undertermined coefficients. $$y'' + 3y' + 2y = xe^{-x}$$

The homogenous solution is easy to find, but I run into some issues with the particular solution. $y = Axe^{-x}$ doesn't seem to be a good enough guess, but I am not sure why? Since it doesn't appear in the homogenous solution I thought it would be independent from it. What is a better particular solution to get started with this?

Best Answer

Using the substitution $u=y'+2y$, so $u'=y''+2y'$, the equation becomes $$u'+u=x\mathrm{e}^{-x}$$ Using the integrating factor method this becomes $$u'\mathrm{e}^x+u\mathrm{e}^x=\frac{\mathrm{d}}{\mathrm{d}x}\left(u\mathrm{e}^x\right)=x\\u\mathrm{e}^x=\frac12x^2+A\\u=y'+2y=\left(\frac12x^2+A\right)\mathrm{e}^{-x}$$Using the integrating factor method again this becomes $$y'\mathrm{e}^{2x}+2y\mathrm{e}^{2x}=\frac{\mathrm{d}}{\mathrm{d}x}\left(y\mathrm{e}^{2x}\right)=\left(\frac12x^2+A\right)\mathrm{e}^{x}\\y\mathrm{e}^{2x}=\left(\frac12x^2-x+B\right)\mathrm{e}^x+C\\\boxed{y= \left(\frac12x^2-x+B\right)\mathrm{e}^{-x}+C\mathrm{e}^{-2x}}$$Note that $x^2\mathrm{e}^{-x}$ is used as well as $x\mathrm{e}^{-x}$.