Evaluate $\sum_{n=0}^{\infty} \frac{(-1)^n n^2 i^n}{(2n)!}$ $$\sum_{n=0}^{\infty}  \frac{(-1)^n n^2 i^n}{(2n)!}$$
$i^n$ can be written as $(\frac{1+i}{\sqrt{2}})^{2n}$ but the main problem is the series :
$$\sum_{n=0}^{\infty} (-1)^n \frac{n^2 }{(2n)!}$$
I don't understand why this series can be written as a sum of sine and cosine because if we add $\sin{1} + \cos{1} $ (for example) togheter we would get : 
$$ \sum_{n=0}^{\infty} (-1)^n \frac{2n+2}{(2n+1)!} $$
The correct answer should be :
$$-\frac{1}{4} \frac{1+i}{\sqrt[4]{2}} \sin{\frac{1+i}{\sqrt[4]{2}}} -\frac{1}{4} i\sqrt{2} \cos\frac{1+i}{\sqrt[4]{2}}  $$
 A: As $$4n^2=2n(2n-1)+2n$$  write $y^2=-i$
$$\dfrac{(-1)^ni^nn^2}{(2n)!}=\dfrac{y^{2n}(2n(2n-1)+2n)}{4(2n)!}=\dfrac{y^2}4\dfrac{y^{2n-2}}{(2n-2)!}+\dfrac y4\dfrac{y^{2n-1}}{(2n-1)!}$$
Now $\displaystyle e^y=\sum_{r=0}^\infty\dfrac{y^r}{r!}$
Find $$\dfrac{e^y+e^{-y}}2,\dfrac{e^y-e^{-y}}2$$
Replace the value of $y^2$
A: \begin{eqnarray}
\sum_{n=0}^\infty\frac{(-1)^nn^2}{(2n)!}x^{2n}
&=&
\left(\frac x2\frac\partial{\partial x}\right)^2\sum_{n=0}^\infty\frac{(-1)^n}{(2n)!}x^{2n}
\\
&=&
\left(\frac x2\frac\partial{\partial x}\right)^2\cos x
\\
&=&
\frac x2\frac\partial{\partial x}\left(-\frac12x\sin x\right)
\\
&=&
-\frac14\left(x\sin x+x^2\cos x\right)\;.
\end{eqnarray}
Thus
\begin{eqnarray}
\sum_{n=0}^\infty\frac{(-1)^nn^2}{(2n)!}\sqrt{\mathrm i}^{2n}
&=&
-\frac14\left(\sqrt{\mathrm i}\sin\sqrt{\mathrm i}+\mathrm i\cos\sqrt{\mathrm i}\right)\;,
\end{eqnarray}
where $\sqrt{\mathrm i}=\frac{1+\mathrm i}{\sqrt2}$. I don't see how to get that into the form you state, which anyway seems to contain some errors: The root should probably be a square root, as in the first line, rather than a quartic root, and $\mathrm j$ is presumably meant to be $\mathrm i$?
