Let $$g:\Bbb R \to \Bbb R $$ $$g(x) = \sum_{n=0}^\infty \frac{cos(n^2x)}{2^n}$$
Find the Taylor-series for g at x=0.
My attempt:
Okay, I guess it's first necessary to show that g converges for every x (?). But that's easy since cosine is at most 1 and $\sum_{n=0}^\infty \frac{1}{2^n}$ converges.
Now onto the interesting stuff.
Let $$\alpha:\Bbb R \to \Bbb R$$ $$\alpha(x)=\frac {cos(n^2)}{2^n}$$
The Maclaurin series of $\alpha$ is $$\sum_{k=0}^\infty \frac{(-1)^k n^{4k}x^{2k}}{(2k)!2^n}$$ (I hope this is correct)
So $g(x) = \sum_{n=0}^\infty \sum_{k=0}^\infty \frac{(-1)^k n^{4k}x^{2k}}{(2k)!2^n} $
I am stuck here, how do I deal with the nested sums? Am I on the right track?