I tried to prove that $$(1-2x)^2=1/3+4/\pi^2\sum_1^\infty \cos(2n x \pi)/n^2$$ for $x \in [0,1)$ with Fourier analysis, but I just found a Fourier series which defines the function. I also found the fourier series of $\cos(2n x \pi)$.
I don't think these results are helpful.
Any suggestions on how to prove this equation?
Hint/Problems
(Changed since the previous was wrong -- the function is not even in it self..)
Note first that $x\mapsto e(x)=(1-2x)^2$ is even on $[0,1]$ in the sense $e(x)= e(1-x)$ (either visualise it or by computation $(1-2(1-x))^2 = (1-2+2x)^2 = (-1+2x)^2)$).
Now, let us look at the function $s$ on $I=[-1,1]$, which is the even extension of the function $x\mapsto (1-2x)^2$ on $[0,1]$ (so the graph looks a bit like $\omega$).
Note that the sine Fourier coefficients are 0, while the cosine Fourier coefficients are given by $$a_n = 2\int_0^1s(x)\cos(n\pi x)dx.$$
Next $a_n=0$ for odd $n$, this follows from 1 (try to see why without a calculation) or a simple calculation, and for even $n\ne0$ we have $$a_n= \frac{16}{n^2\pi^2}$$ while $a_0=2/3$.
Why is $s$ equal to the Fourier series on $[-1,1]$?
What is $s$ equal to in $[0,1]$?
Last edit
For even $n$ we have $n=2k$ for some $k$ and that $a_0$ should be divided by 2 in the expansion.