Use Fourier series for computing $\sum_{n=1}^{\infty}\frac{1}{(2n-1)^2}$ I need to compute Fourier series for the following function: $f(x)=\frac{-\pi}{4}
$ for $-\pi \leq x &lt;0$, and $\frac{\pi}{4} $ for $ 0 \leq x \leq \pi$, and then to use it and compute $\sum_{n=1}^{\infty}\frac{1}{(2n-1)^2}$

I tried to use Parseval equality:

$$\widehat{f(n)}=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)e^{-inx}=\frac{1}{4in}-\frac{(-1)^n}{4in}, \sum_{-\infty}^{\infty}|\widehat{f(n)}|^2=\frac{1}{2\pi}\int_{-\pi}^{\pi}|f(x)|^2.$$

$$\sum_{-\infty}^{\infty}|\frac{1}{4in}-\frac{(-1)^n}{4in}|=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)=\frac{\pi^2}{16}.$$

Does someone see how can I compute form that the requsted sum?

Thanks!
Or you might want to think that

$$\eqalign{
  &amp; \omega  = 1 + \frac{1}{{{2^2}}} + \frac{1}{{{3^2}}} + \frac{1}{{{4^2}}} +  \cdots  = \frac{{{\pi ^2}}}{6}  \cr 
  &amp; \frac{\omega }{4} = \frac{1}{{{2^2}}} + \frac{1}{{{4^2}}} + \frac{1}{{{6^2}}} + \frac{1}{{{8^2}}} +  \cdots  = \frac{{{\pi ^2}}}{{24}}  \cr 
  &amp; \omega  - \frac{\omega }{4} = 1 + \frac{1}{{{3^2}}} + \frac{1}{{{5^2}}} + \frac{1}{{{7^2}}} +  \cdots  = \frac{{{\pi ^2}}}{6} - \frac{{{\pi ^2}}}{{24}} = \frac{{{\pi ^2}}}{8} \cr} $$
We can use cosx to get the same result. This is how I did. 
Hope it helps. 

Cosx = c [(x-pi/2)(x+pi/2)(x-3pi/2)(x+3pi/2)........]

As +-pi/2, +-3pi/2, +-5pi/2,...are roots of this function. 

Cosx =
c [(x^2-(pi/2)^2)(x^2-(3pi/2)^2).....]

Another way to represent it. 

Cosx =
d [(1-(4x^2/pi^2)(1-4x^2/9pi^2)...]

Put  x=0 to get  d=1

Cosx =
 [(1-(4x^2/pi^2)(1-4x^2/9pi^2)...]        

Cosx = 
1-(4x^2/pi^2)[1+1/9+1/25+.....]                  -> 1

Comparing coefficient of x^2 in Taylor series for Cosx we get-

(4/pi^2)[1+1/9+1/25+...... ]=1/2!

[1+1/9+1/25+...... ]= pi^2/8