Prove: $$\sum_{n=1}^{\infty} \frac{1}{n^2}\cos(n x)= \frac{\pi^2}{6}-\frac{\pi x}{2}+\frac{x^2}{4}$$ for $0\le x\le 2 \pi$
I've found the result in 1.443 I.S. Gradshteyn and I.M. Ryzhik's book. But I need the proof.
Prove: $$\sum_{n=1}^{\infty} \frac{1}{n^2}\cos(n x)= \frac{\pi^2}{6}-\frac{\pi x}{2}+\frac{x^2}{4}$$ for $0\le x\le 2 \pi$
I've found the result in 1.443 I.S. Gradshteyn and I.M. Ryzhik's book. But I need the proof.