I'm given this :
$y''(x)+\sin(x)y'(x)+x^3y(x)=1+x$
$y'(0)=0,\;y(0)=1$
and I'm asked to calculate a polynomial of at least degree $3$ that approximates the solution of that problem. May I try a series for $y(x)$ and then just chop at degree $3$?. If this is correct, then
$y(x)=\sum_{k=0}^{\infty}c_{k}x^{k}, y'(x)=\sum_{k=1}^{\infty}kc_{k}x^{k-1},y''(x)=\sum_{k=2}^{\infty}k(k-1)c_{k}x^{k-2}$
Substitution into the ODE gives
$\sum_{k=2}^{\infty}k(k-1)c_{k}x^{k-2}+\sin(x)\sum_{k=1}^{\infty}kc_{k}x^{k-1}+x^3\sum_{k=0}^{\infty}c_{k}x^{k}=1+x$
and
$\sum_{k=2}^{\infty}k(k-1)c_{k}x^{k-2}+\sum_{k=0}^{\infty}(-1)^k\frac{x^{2k+1}}{(2k+1)!}\sum_{k=1}^{\infty}kc_{k}x^{k-1}+\sum_{k=0}^{\infty}c_{k}x^{k+3}=1+x$
Now, how do I match the powers to set the coefficients of $x^0=1$, the coefficients of $x^1=1$ , and the rest equal to zero? I'm stuck in the index change and in the product of $y'(x)$ and $sin(x)$ series.
Thanks for your time.