Harmonic-analysis Fourier series proof - general fourier series. Let $f(x) \in L^2[-\pi,\pi]$ such that $f(x)$ suffice: $f(x) \sim \frac{a_0}{\sqrt{2}} + \sum_{n=1}^{\infty}a_n\cos(nx)+b_n\cos(nx) $
$f(x)$ is also even function. Prove:
$
\int_{-\pi}^{\pi} f^2(x)\cos^2(x)\, dx = \frac{1}{2}
\int_{-\pi}^{\pi} f^2(x)\ \iff \frac{1}{2}a_1^2 +\frac{a_0}{\sqrt{2}}a_2+\sum_{n=2}^{\infty}a_{n-1}a_{n+1} =0
$
I've proved that $f(x)\cos(x)$ has a Fourier coefficients (such that Fourier sum is exists). But I don't have any idea how to solve the proof? May anyone help me/ guide me how should I prove it?
Best regards,
Sababoni.
 A: Since $f$ is even, we have
$$f(x) = \frac{a_0}{\sqrt2}+\sum_{n=1}^\infty a_n \cos (nx)$$
\begin{align}
f(x)\cos x &= \frac{a_0}{\sqrt2}\cos x + \sum_{n=1}^\infty a_n \cos (nx) \cos (x)\\
&=\frac{a_0}{\sqrt2}\cos x + \sum_{n=1}^\infty \frac{a_n}{2}\left[ \cos(n+1)x  + \cos (n-1) x \right] \\
&= \frac{a_0}{\sqrt2}\cos x + \sum_{n=2}^\infty \frac{a_{n-1}}{2}\cos (nx) + \sum_{n=0}^\infty \frac{a_{n+1}}{2}\cos (nx)\\
&=\frac{a_1}{2} + \left( \frac{a_0}{\sqrt2}+\frac{a_2}{2}\right)\cos x + \sum_{n=2}^\infty\left(\frac{a_{n-1}+a_{n+1}}2\right) \cos (nx)
\end{align}
Also,
$$\frac{f(x)}{\sqrt2}=\frac{a_0}{2}+\sum_{n=1}^\infty \left(\frac{a_n}{\sqrt2} \right) \cos nx$$
Hence, by Parserval theorem,
\begin{align}
&\int_{-\pi}^\pi f^2(x) \cos^2(x) \, dx= \frac12 \int_{-\pi}^{\pi}f^2(x) \, dx = \int_{-\pi}^\pi \left( \frac{f(x)}{\sqrt2}\right)^2 \, dx \\
& \iff \frac{a_1^2}2 + \left( \frac{a_0}{\sqrt2} + \frac{a_2}2\right)^2 +\frac14 \sum_{n=2}^\infty \left( a_{n-1}+a_{n+1}\right)^2 = \frac{a_0^2}2 + \sum_{n=1}^\infty \frac{a_n^2}{2}\\
&\iff  \frac{a_2^2}{4}+\frac{a_0a_2}{\sqrt2} + \frac{a_1^2}{4} + \frac14 \sum_{n=2}^\infty a_n^2 + \frac14 \sum_{n=3}^\infty a_n^2 + \frac12 \sum_{n=2}^\infty a_{n-1}a_{n+1}= \sum_{n=2}^\infty \frac{a_n^2}{2}\\
&\iff \frac{1}{4}a_1^2 + \frac{a_0a_2}{\sqrt2} + \frac12 \sum_{n=2}^\infty a_{n-1}a_{n+1}=0\\
&\iff\frac12 a_1^2 + \color{red}{\sqrt2} a_0a_2 + \sum_{n=2}^\infty
a_{n-1}a_{n+1}=0\end{align}
