Computing series $\sum_{n=1}^{\infty} 1/n^2$ using Fourier Series
$$f=\frac{\pi^2}3+\sum_{n=1}^{\infty} \frac{4\color{blue}{(-1)^n}}{n^2}\cos(nx)$$
As we let $x=\pi$, we have
$$\pi^2=\frac{\pi^2}{3}+\sum_{n=1}^\infty \frac{4}{n^2}$$
$$\sum_{n=1}^{\infty}\frac1{n^2}=\frac{\pi^2}{6}$$