# Substitute function with its fourier series inside an integral

This is a Fourier Analysis homework question. I am not asking for a solution, just to validate my thought.

Let $f(x)=\sin x$ defined on $[-\pi,\pi]$ and let $G(x)=\dfrac{a_0}{2}+\sum\limits_{n=1}^{\infty} a_n \cos(n x)$ where $a_n$ are the Fourier coefficients of the cosine-series of $\sin x$ in $[0,\pi]$.

Since $G(x)$ is the cosine series of $\sin x$, it is the Fourier series of the even continuation of $\sin x$ which is $|\sin x|$.

I am required to find: $\int_{-\pi}^{\pi}\!|G(x)|^2\,\mathrm{d}x$. My first thought was to use Parseval's Identity. However, why am I required to do that? Can I just substitute $G(x)$ with $|\sin x|$, and then find $\int_{-\pi}^{\pi}\!|\sin x|^2\,\mathrm{d}x$?

Are you required to use Parseval's identity? If so, you have to compute the Fourier coefficients $a_k$, of course, which is a pain. If not, the approach you propose appears to be the easiest. – Rod Carvalho Sep 10 '12 at 11:58
I am not required to use Parseval's identity, just to find $\int_{-\pi}^{\pi}\!|G(x)|^2\,\mathrm{d}x$. Thank you for your answer and friendly edits. – The-Q Sep 10 '12 at 12:02