Determine the first three non-zero terms in the Taylor polynomial approximation for the initial value problem: $y''+\sin(y)=0$ Having trouble understanding how to solve this problem.  Did I at least set it up correctly?
$y''+\sin(y)=0,\;y(0)=1,\;y'(0)=0$
So assuming $y(x)=\sum_{n=0}^{\infty}a_nx^n$ then $y''(x)=\sum_{n=2}^{\infty}n(n-1)a_nx^{n-2}$
And since $\sin(y)=\sum_{n=0}^{\infty}\frac{(-1)^nx^{2n}}{(2n)!}$ rewriting the original equation I get:
$$y''+\sin(y) = \sum_{n=2}^{\infty}n(n-1)a_nx^{n-2}+\sum_{n=0}^{\infty}\frac{(-1)^nx^{2n}}{(2n)!}$$
I tried combining terms and simplifying so that I can solve for $a_{n+2}:
$$\sum_{n=0}^{\infty}x^n\left((n+2)(n+1)a_{n+2}+\frac{(-1)^nx^2}{(2n!)}\right)$$
But I don't know how to get rid of the factor of $x$ inside the parenthesis so that I can solve for the coefficient.  Am I going down the wrong path?
 A: $y = a_0 + a_1 x + a_2 x^2 + a_3 x^3$
$y(0) = 1, y'(0) = 0$
$y = 1 + a_2 x^2 + a_3 x^3$
$y'' = 2 a_2 + 6 a_3 x + 12 a_4 x^2$
$\sin y = y - y^3 / 6 + y^5/5!...$
$y^3 = 1 + 3 a_2 x^2 + 3 a_3 x^3 + 3 a_2x^4 + 3a_4 x^4...$
$y^5 = 1 + 5 a_2 x^2 + 5 a_3 x^3 + 10 a_2x^4 + 5a_4 x^4...$
$\sin y = (1-1/6+1/120...) + (1-1/2+1/24...) a_2 x^2$
$\sin y = \sin 1 + (cos 1) a_2 x^2.. $ 
$y'' + \sin y = 0$ 
$2a_2 + \sin 1 + 6a_3 x + (12 a_4 + \cos 1 a_2) x^2 = 0$
$a_2 = (-1/2) (\sin 1), a_3 = 0, a_4 = (-1/12)(\cos 1)(-1/2)(\sin 1)$
$y = \sin 1 - (1/2) (\sin 1) x^2 + (1/48) (\sin 2) x^4$
A: Yes, you are going about this the wrong way!
You have $y(0)=1$
You have $y'(0)=0$
Since $y''+\sin(y)=0$, you have $y''(0)+\sin(y(0))=0 \Rightarrow y''(0)+\sin(1)=0 \Rightarrow y''(0)= - \sin(1)$
Next differentiate $y''+\sin(y)=0$ with respect to $x$
You get $y'''+\cos(y) y'=0$ (Chain Rule)
$y'''(0)+\cos(y(0)) y'(0)=0 \Rightarrow y'''(0)+\cos(1) \times 0=0 \Rightarrow  y'''(0)=0$
Differentiate $y'''+\cos(y) y'=0$ with respect to $x$
You get $y''''-\sin(y) (y')^2+\cos(y) y''=0$ (Product Rule)
$y''''(0)-\sin(y(0)) (y'(0))^2+\cos(y(0)) y''(0)=0$
$\Rightarrow y''''(0)-\cos(1) \sin(1)=0 \Rightarrow y''''(0)=\cos(1) \sin(1)$
The series is given by $y(0)+y'(0)x+\frac 12y''(0)x^2+\frac 1{3!}y'''(0)x^3+\frac 1{4!}y''''(0)x^4+\frac 1{5!}y'''''(0)x^5+...$
Substituting the first three non-zero values gives:
$1-\frac 12 \sin(1)x^2+\frac 1{4!}\sin(1)\cos(1)x^4$
