How to solve $y'''+2y''-y'-2y= e^x+x^2$? The equation that needs to be solved is: $$y'''+2y''-y'-2y= e^x+x^2$$
Steps: homogeneous solution and then the particular part.Bbut how do i handle the particular part? Do i need to take them once at a time?
 A: Solving 
$$
(*)\;\;y'''+2y''-y'-2y= e^x+x^2
$$
By the method of undetermined coefficients:
First, we find the solution to the homogeneous equation:
$$
(**)\;\;y'''+2y''-y'-2y= 0
$$
By the usual characteristic equation:
$$
m^3+2m^2-m-2=0\Rightarrow m^2(m+2)-1(m+2)=0\Rightarrow m^2=1,m=-2
$$
yielding our solution to $(**)$, 
$$
y_h(x)=c_1e^{-x}+c_2e^{x}+c_3e^{-2x}
$$
Then, we need to find some solution $y_p$ to the original equation $(*)$, which we do by a sort of guess and check. We guess that the solution will be of the form
$$
y_p(x)=Axe^{x}+Bx^2+Cx+D
$$
I.e. a second order polynomial summed with an exponential multiplied by a linear factor (called a fix up factor), since an $e^x$ term is already present in our homogenous solution. Then by the conditions of $(*)$ we know that
$$
y_p'''+2y_p''-y_p'-2y_p= e^x+x^2\Rightarrow\\
Axe^{x}+3Ae^{x}+2Axe^x+4Ae^x+4B-Axe^x-Ae^x-2Bx-C-2Axe^x-2Bx^2-2Cx-2D-2Bx^2\\
=x^2+e^x\\
\Rightarrow 6Ae^x+(4B-2D-C)+x(-2B-2C)-2Bx^2=x^2+e^x \\
\Rightarrow 6A=1,4B-2D-C=0,-2B=1,-2B-2C=0
$$
By equating coefficients. Then solving the system of coefficients we see that
$$
A=1/6\\
B=-1/2\\
-B=C=1/2\\
4B-2D-C=0\Rightarrow D=-5/4 
$$
$$
y_p(x)=1/6xe^{x}-1/2x^2+1/2x+-5/4
$$
Yielding the solution to $(*)$ of 
$$
y_p+y_h=1/6xe^{x}-1/2x^2+1/2x+-5/4+c_1e^{-x}+c_2e^{x}+c_3e^{-2x}
$$
