I'm pretty sure that there's a theorem that says that the Fourier coefficients of a sum of $\cos(nx)$ and $\sin(nx)$ 's are the coefficients of the sum itself.
I tried to prove that in the specific case of $f(x) = \sum_{n=1}^{\infty}\frac{\cos(nx)}{n^2}$. In calculating the Fourier coefficients I got to calculating $\cos(nx)\cdot\cos(mx)$, but I'm now stuck. Any tips would be appreciated!