# Find the sums of the series $S_1=\sum_{k=1}^\infty\frac{\cos^2 kx}{k^2}$ and $S_2=\sum_{k=1}^\infty\frac{\sin^2 kx}{k^2}$

Find the sums $$S_1$$ and $$S_2$$ $$S_1=\sum_{k=1}^\infty\frac{\cos^2 kx}{k^2}\\ S_2=\sum_{k=1}^\infty\frac{\sin^2 kx}{k^2}$$ using the following expansion: $$I_{[a,b]}(x)=\begin{cases} 1,\ a\leqslant x\leqslant b\\ 0\ \text{otherwise} \end{cases};\ \ \ \ [a,b]\subset[-\pi,\pi]\\ I_{[a,b]}(x)=\frac{b-a}{2\pi}+\frac{1}{\pi}\sum_{n=1}^\infty\left(\frac{2}{n}\sin\frac{n(b-a)}{2}\cos\frac{n(b+a-2x)}{2}\right)$$

I found another solution to this problem (not using Fourier series of Indicator function), and here is my answer: \begin{aligned} &S_1=\frac{\pi^2}{6}+\frac{x^2}{2}-\frac{\pi x}{2}\\ &S_2=-\frac{x^2}{2}+\frac{\pi x}{2} \end{aligned} I did it by finding the sum of $$\sum_{k=1}^\infty\frac{\cos 2kx}{k^2}$$ as a subtask. But now I have to somehow apply that Indicator function. I've been told that the solution should be straightforward. However, I haven't succeeded in finding it so far.

• What is the significance of k in the first 2 summations? Did you mean to put n instead? Commented Feb 21, 2020 at 18:33
• Oops, yes, I made a typo. Commented Feb 21, 2020 at 19:34
• I suggest using the identity $$\sin(\alpha+\beta)+\sin(\alpha-\beta)=2\sin\alpha\sin\beta,$$ to see that the indicator function in question is $$\chi_{[a,b]}(x)=\frac{b-a}{2\pi}+f(x-a)-f(x-b),$$ where $$f(x)=\frac1\pi\sum_{n\ge1}\frac{\sin nx}{n}.$$ Commented Feb 21, 2020 at 22:35
• But the identity is wrong. It should be $\sin(\alpha+\beta)+\sin(\alpha-\beta)=2\sin\alpha\cos\beta$ Commented Feb 22, 2020 at 7:39

See my answer at Calculate $\sum \limits_{n = 1}^{\infty} \frac{\cos 2n}{n^2}$. You can regard your series as sums of the squares of coefficients of Fourier series. In your expansion, choose $$b+a=0$$ so that the cosine becomes $$\cos nx$$, and use Parseval’s theorem to replace the sum of the squares of the coefficients by the square of the integral of the (squared) indicator function. This gives you $$S_2$$, and then $$S_1=\frac{\pi^2}6-S_2$$ since $$\cos^2+\sin^2=1$$. (Here $$\frac{b-a}2$$ and $$n$$ in the expansion play the role of $$x$$ and $$k$$, respectively, in the series.)
• Nice!${}{}{}{}{}{}{}$