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$?
Thanks in advance.