I'm learning to the exam and I find this exercise in the book , and I can't think how I solve it.
Given Fourier series for $f(x)$ continuous over $[-\pi, \pi]$.
$$f(x) \approx \frac{a_0}{2} + \sum^\infty_{n=1}a_n\cos(nx) + b_n\sin(nx).$$
Find $\int_{-\pi}^\pi f(x)\cos^2(nx)dx$.
Can you please give me some hints to solve it? thanks in advance.