y'' + y = e^x + x^3, y(0) = 2, y'(0)=0
There are two parts to this problem.
First we need to find the complimentery solution(the solution to the homogenious solution)
$\displaystyle y''+y=0$ has the auxillary equation
$\displaystyle m^2+1=0 \iff m=\pm i$ so
$\displaystyle y_c=c_1\cos(t)+c_2\sin(t) $
Now we need to find the particular solution
$\displaystyle y_p=Ae^{x}+B+Cx+Dx^2+Ex^3 $
$\displaystyle y_p'=Ae^{x}+C+2Dx+3Ex^2$
$\displaystyle y_p''=Ae^{x}+2D+6Ex $
Plugging these in we get
$\displaystyle Ae^{x}+B+Cx+Dx^2+Ex^3+Ae^{x}+2D+6Ex=e^{x}+x^3 $
$\displaystyle 2Ae^{x} +Ex^3+Dx^2 +(6E+C)x+(2D+B)=e^{x}+x^3 $
From this we see that both $\displaystyle D=0,B=0$
$\displaystyle 2A=1 \iff A=\frac{1}{2}$
$\displaystyle E=1$ and
$\displaystyle 6E+C=0 \iff 6+C=0 \iff C=-6$
$\displaystyle y_p=\frac{1}{2}e^{x}+x^3-6x $
So the solution by superposition
$\displaystyle y=y_c+y_p=c_1\cos(t)+c_2\sin(t)+\frac{1}{2}e^{x}+x ^3-6x$
From here just plug in you I.C and you are done