<s>[INST] solving differential equation $\frac{d^3y}{dx^3}+\frac{d^2y}{dx^2}=x^2+2x+2$ How would you solve this third order differential equation:
$$\frac{d^3y}{dx^3}+\frac{d^2y}{dx^2}=x^2+2x+2$$
My first thought was to take a double integral:
$$\iint\frac{d^3y}{dx^3}+\frac{d^2y}{dx^2}dxdx=\iint{x^2+2x+2}dxdx$$
so:
$$y+\frac{dy}{dx}=\frac{x^4}{12}+\frac{x^3}{3}+x^2+c_1x+c_2$$
This is what I got to but I am unsure beyond here 
 [/INST] Here is another simple way
$$\frac{d^3y}{dx^3}+\frac{d^2y}{dx^2}=x^2+2x+2$$
Multiply both side by $e^x$ We get
$$(y''e^x)'= (e^x(x^2+2))'$$
we can reduce the order by direct integration
$$y''e^x= e^x(x^2+2)+K_1$$
$$y"=x^2+2+K_1e^{-x}$$
Integrate
$$y'=\frac {x^3}3+2x+K_1e^{-x}+K_2$$
Integrate again
$$y=\frac {x^4}{12}+x^2+K_1e^{-x}+K_2x+K_3$$
</s>