Calculate $\sum \limits_{n = 1}^{\infty} \frac{\cos 2n}{n^2}$ I need to calculate the following sum:
$$
\sum \limits_{n = 1}^{\infty} \frac{\cos 2n}{n^2}
$$
I've tried adding an imaginary part and differentiating:
$$
f(x) = \sum \limits_{k = 1}^{\infty} \frac{\cos 2xk + i \sin 2xk}{k^2} \\
f(x) = \sum \limits_{k = 1}^{\infty} \frac{e^{2ixk}}{k^2} \\
f'(x) = \sum \limits_{k = 1}^{\infty} \frac{2i e^{2ixk}}{k} \\
f''(x) = - 4\sum \limits_{k = 1}^{\infty} e^{2ixk} \\ 
f''(x) = -4\frac{e^{2ix}}{1 - e^{2ix}}
$$
Where $f(x)$ if a function of which I need to find the value at $x = 1$.
After differentiating once I get 
$$
f'(x) = \frac{\log \left( 1 - e^{kx} \right)}{k} + C
$$
(k is just some constant), and I can't integrate once more as I'll get an integral logarithm which I don't want to work with.
Is there any more pleasant way to calculate the aforementioned sum?
 A: The series has terms of the form $a_n\cos (n)$ with $n\in\mathbb{N}$, $n$ even, so your mind should immediately jump to Fourier series, where the coefficients are of the form $\displaystyle \frac1{n^2}$ for even $n$ or $0$ otherwise. Insert a variable into the series to transform it into the function, $\displaystyle \sum_{n=1}^{\infty}\frac{\cos\left(2nx\right)}{n^{2}}$. We see from a graph that this is a $\pi$-periodic, U-shaped curve with a minimum at $x=\frac\pi2$ so we can make the ansatz that it is the Fourier series of parabola of the form $\left(x-\frac{\pi}{2}\right)^2$ up to a constant difference. We can then treat this with a typical Fourier series of the function over $(-\pi,\pi)$ by taking the absolute value of $x$.
The function is even so the coefficients of $\sin nx$ terms, $b_n$, are all $0$. We may then solve for $\displaystyle a_0=\frac1\pi\int_\pi^\pi\left(|x|-\frac\pi2\right)^2\,\mathrm{d}x=\frac{\pi^{2}}{6}$ and, using $\sin(\pi n)=0$ and $\cos(\pi n)=(-1)^n$,
$$\begin{align}
a_n&=\frac{1}{\pi}\int_{-\pi}^{\pi}\left(\left|x\right|-\frac{\pi}{2}\right)^{2}\cos\left(nx\right)\,\mathrm{d}x
\\
&=\frac{2}{\pi}\cdot\frac{\left(\pi^{2}-8\right)\sin\left(\pi n\right)+4\pi n+4\pi n\cos\left(\pi n\right)}{4n^{3}}
\\
&=2\cdot \frac{1+\left(-1\right)^{n}}{n^{2}}
\end{align}$$
Thus, $\displaystyle \left(x-\frac\pi2\right)^2=\frac{\pi^{2}}{12}+2\sum_{n=1}^{\infty}\frac{1+\left(-1\right)^{n}}{n^{2}}\cos\left(nx\right)$. You should be able to take it from here.
A: $$ \sum_{k=1}^\infty \frac{\cos 2 k x}{k^2} \sim f(x) = \left(x-\frac{\pi}{2}\right)^2 - \frac{\pi^2}{12} .$$
See, for example, this math stackexchange exchange.
This means that 
$$ \sum_{k=1}^\infty \frac{\cos 2 k }{k^2} =\left(1-\frac{\pi}{2}\right)^2 - \frac{\pi^2}{12},$$
since the series converges to $f(x)$ on $[0,\pi]$ and its periodic extension everywhere.
A: Subtract $\sum_n\frac1{n^2}=\frac{\pi^2}6$ to obtain
\begin{eqnarray}
\sum_{n=1}^\infty\frac{\cos2n}{n^2}-\frac{\pi^2}6
&=&
\sum_{n=1}^\infty\frac{1-\cos2n}{n^2}
\\
&=&
-2\sum_{n=1}^\infty\left(\frac{\sin n}n\right)^2\;.
\end{eqnarray}
Now note that $\frac1\pi\frac{\sin n}n$ is the $n$-th coefficient in the Fourier series of a rectangular pulse with period $2\pi$ and length $2$:
$$
\frac1{2\pi}\int_{-1}^1\mathrm e^{-\mathrm inx}\mathrm dx=\frac1\pi\frac{\sin nx}n\;.
$$
By Parseval’s theorem we have
$$
\sum_{n=-\infty}^\infty\left(\frac1\pi\frac{\sin nx}n\right)^2=\frac1{2\pi}\int_{-1}^1\mathrm dx=\frac1\pi\;,
$$
and thus
\begin{eqnarray}
\sum_{n=1}^\infty\left(\frac{\sin n}n\right)^2
&=&
\frac12\left(\sum_{n=-\infty}^\infty\left(\frac{\sin nx}n\right)^2-1\right)
\\
&=&
\frac{\pi-1}2\;.
\end{eqnarray}
Substituting above yields
\begin{eqnarray}
\sum_{n=1}^\infty\frac{\cos2n}{n^2}
&=&
\frac{\pi^2}6-2\cdot\frac{\pi-1}2
\\
&=&\frac{\pi^2}6-\pi+1\;.
\end{eqnarray}
