How to solve $y''-y=\sin(x)$ using power series?

I was asked to find the solution for this equation around point $x=1$: $$y''+y=\sin(x)$$
My try:
Let $X=x-1,$ we have: $$y(X)=\sum_{n=0}c_nX^n\Rightarrow y''(X)=\sum_{n=2}n(n-1)c_nX^{n-2}$$
and also we know: $$\sin(X+1) =\sum_{n=0}(-1)^n\frac{(X+1)^{2n+1}}{(2n+1)!} $$ by subsitution in the equation we have: $$\sum_{n=2}n(n-1)c_nX^{n-2}-\sum_{n=0}c_nX^n = \sum_{n=0}(-1)^n\frac{(X+1)^{2n+1}}{(2n+1)!}$$ we must change the values of first sigma in order to merge left sigmas: $$\sum_{n=0}(n+2)(n+1)c_{n+2}X^{n}-\sum_{n=0}c_nX^n = \sum_{n=0}(-1)^n\frac{(X+1)^{2n+1}}{(2n+1)!}$$ so we have: $$\sum_{n=0}(n+2)(n+1)c_{n+2}-c_n)X^n = \sum_{n=0}(-1)^n\frac{(X+1)^{2n+1}}{(2n+1)!}$$ I got stuck at this section because I don't know how to equate coefficients for this equation. Any ideas??


Solution 1:

Hint: $\sin (X+1)=\sin X \cos 1+\cos X \sin 1$. Use the series expansions of $\sin X$ and $\cos X$.