Deriving $\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$ using Fourier Series for $f(x)=|x|$ One can find that $$f(x) = \frac{\pi}{2} + \sum_{n=1}^{\infty}\frac{2(-1+(-1)^n)}{\pi n^2}\cos(nx)$$
Now look at the case for $x=0$. We can find that $\sum_{n \text{ odd}, n \geq 1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{8}$. However, I am having a hard time proving the original equality since all the even terms would vanish. Thus it seems like the total sum should be equivalent to the sum of odd terms, but I know this is not the case. What nuance am I missing?

Rearranging gives
\begin{eqnarray*}
\sum_{n=1}^{\infty} \frac{1+(-1)^{n+1}}{n^2} =\frac{\pi^2}{4}.
\end{eqnarray*}
Now let 
\begin{eqnarray*}
\sum_{n=1}^{\infty} \frac{1}{n^2} =x.
\end{eqnarray*}
So
\begin{eqnarray*}
\sum_{n=1}^{\infty} \frac{1}{(2n)^2} =\frac{x}{4} \\
\sum_{n=1}^{\infty} \frac{1}{(2n-1)^2} =\frac{3x}{4} \\
\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n^2} =\frac{x}{2}. \\
\end{eqnarray*}
Do some linear algebra and we have the usual result
\begin{eqnarray*}
\sum_{n=1}^{\infty} \frac{1}{n^2} =\frac{\pi^2}{6}.
\end{eqnarray*}
