I have to find the development of a function $f(x)= x\cos^2(2x)$ in the power series in point $0,$ and after that find derivative of $f^{(21)}(0)$
I have started with:\begin{align}f(x)&=\frac{x(\cos(4x)+1)}{2}\\&=x\left(\sum_{n=0}^\infty\frac{(-1)^n*4x^{2n}+1}{(2n)!}\right)\\&=x\left(\sum_{n=0}^\infty(\frac{(-1)^n*4^{2n}*x^{2n}}{2(2n)!})+\frac{1}{2}\right)\\&=\sum_{n=0}^\infty\frac{(-1)^n*4^{2n}*x^{2n+1}}{2(2n)!}+\frac{x}{2}\end{align}
And now I am not sure if I did it corectly, and if I did what to do next with this. Please help, I have spent 4 hours already with that exercise.
Note that\begin{align}\cos(4x)&=\cos^2(2x)-\sin^2(2x)\\&=2\cos^2(2x)-1,\end{align}and that therefore$$\cos^2(2x)=\frac12\bigl(1+\cos(4x)\bigr).$$So\begin{align}f(x)&=x\cos^2(2x)\\&=\frac x2\bigl(1+\cos(4x)\bigr)\\&=\frac x2+\frac x2\sum_{n=0}^\infty\frac{(-1)^n}{(2n)!}(4x)^{2n}\\&=\frac x2+\sum_{n=0}^\infty\frac{(-1)^n2^{4n-1}}{(2n)!}x^{2n+1}\end{align}and therefore$$\frac{f^{(21)}(0)}{21!}=\frac{2^{39}}{20!}.$$In other words, $f^{(21)}(0)=2^{39}\times21$.