Solve Basel problem with Fourier series of $[-\pi,\pi]\to \mathbb{R}:\theta \mapsto |\theta|$ A problem from Stein/Shakarchi's Fourier Analysis:

Consider the function $f:[-\pi, \pi] \to \mathbb{R}:\theta \mapsto
 |\theta|$. 
  
  
*
  
*Show $$\hat{f}(n)=\begin{cases} \pi/2& n=0 \\\frac{(-1)+(-1)^n}{\pi    n^2} & n\neq 0.\end{cases}$$
  
*Write out the Fourier series in sines and cosines.
  
*Taking $\theta=0$, prove $$\sum_{n \text{ odd }\geq    1}\frac1{n^2}=\frac{\pi^2}{8}\\[19pt]\sum_{n=1}^\infty \frac1{n^2} =  
 \frac{\pi^2}{6}.$$

I've got all but the last part. Writing in terms of sines and cosines gives $$f(\theta)\sim \frac{\pi}{2}-\frac{4}{\pi}\sum_{n \text{ odd } \geq 1}\frac{\cos(n\theta)}{n^2}.$$ Then plug in $\theta=0$ and we get the sum of the odd terms. How can we extend to even $n$? 
One idea I had was to add some canonical function whose Fourier series involves even terms with $n^2$ in the denominator, but I don't know such a function. 
I searched around online a bit for an answer, because I know this result is canonical, but they were using $\theta \mapsto \theta$ and Parseval's theorem. The book has not yet gotten to Parseval's theorem, so I'd like to do without it. 

Let $O$ be the sum of the reciprocals of the squares of the odd numbers. Let $E$ be the corresponding sum over the even numbers. You want to determine $S=O+E$. Now note that $E=\frac{S}{2^2}$ and solve. 
