# How to transform the function $\frac{\cos x+x\sin x-1}{x^2}$ to the given power series?

Function $$\frac{\cos(x)+x\sin(x)-1}{x^2}$$ to power series $$\sum_{n=0}^{\infty}\frac{(-1)^nx^{2n}}{2n!(2n+2)}$$

I tried to expand $$\cos x$$ and $$\sin x$$ in their power series but I can't figure out how to deal with the $$\frac{-1}{x^2}$$ expression.

• If you show us how you expanded the $\sin$ and $\cos$ part, you are probably almost there. Commented Aug 30, 2022 at 13:59
• Both $\cos(x)-1$ and $x\sin(x)$ have power series starting with $x^2$ times something Commented Aug 30, 2022 at 14:02

$$\frac{\cos x+x\sin x-1}{x^2}=\frac{1}{x^2}\left(\sum_{j=0}^\infty(-1)^j\frac{x^{2j}}{(2j)!}+x\sum_{j=0}^\infty(-1)^j\frac{x^{2j+1}}{(2j+1)!}-1\right)=\sum_{j=0}^\infty(-1)^j\frac{x^{2j-2}}{(2j)!}+\sum_{j=0}^\infty(-1)^j\frac{x^{2j}}{(2j+1)!}-x^{-2}.$$
From here, the first term in the first series cancels the $$x^{-2}$$-term. So do that cancellation, reindex the first sum, them combine the sums to get the result. I'll leave doing it explicitly to you.