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 <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!
 A: You want your computation of the coefficients to be in a convenient form; check that
$$|\hat{f}(n)|^2=\begin{cases} (2n)^{-2} & n \text{ odd} \\ \\ 0 & n \text{ even}  \end{cases} $$
The major issue I see in the work you posted is that you have an erroneous version of Parseval's:
$$ \hskip 0.3in \sum_{-\infty}^{+\infty} |\hat{f}(n)|= \int_{-\pi}^{\pi} |f(x)|dx \hskip 0.3in \color{Red}{\text{Incorrect}} $$
The correct version is with squares, which makes the computations meaningful:
$$\hskip 0.3in \sum_{-\infty}^{+\infty} |\hat{f}(n)|^2= \int_{-\pi}^{\pi} |f(x)|^2dx \hskip 0.3in \color{LimeGreen}{\text{Correct}} $$
On the left side we'll be adding $(2n)^{-2}$ over the odds twice, and the right side is $\pi^2/16$.
A: The Fourier series of $f$ is given by
$$
\mathcal{F}f(x)= \sum_{k=1}^{\infty} \frac{1}{2k-1}\sin((2k-1)x),
$$
which converges pointwise to $f$ except at $x=0$ (where it is zero). So on $(-\pi, 0)$, we can write $\mathcal{F}f =f$, and integrating both sides of the first equation, we get
$$
-\frac{\pi^{2}}{4} = \int_{-\pi}^{0} f(x)\, \mathrm{d}x = \sum_{k=1}^{\infty} \frac{1}{2k-1}\int_{-\pi}^{0}\sin((2k-1)x) = -2\sum_{k=1}^{\infty} \frac{1}{(2k-1)^{2}}
$$
which gives the result
$$
\sum_{n=1}^{\infty} \frac{1}{(2n-1)^{2}} = \frac{\pi^{2}}{8}
$$
A: Or you might want to think that
$$\eqalign{
  & \omega  = 1 + \frac{1}{{{2^2}}} + \frac{1}{{{3^2}}} + \frac{1}{{{4^2}}} +  \cdots  = \frac{{{\pi ^2}}}{6}  \cr 
  & \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 
  & \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} $$
A: Since the function is odd, we have $\widehat f(2n)=0$ for all integer $n$ and $$\widehat f(2n-1)=\frac 1{2\pi}\frac{\pi}4\left(-\int_{-\pi}^0e^{-i(2n-1)x}dx+\int_0^{\pi}e^{-i(2n-1)x}dx\right)\\\ 
=\frac 18\left(\frac 1{(2n-1)i}(1-(-1)^{2n-1})+\frac 1{(2n-1)i}(1-(-1)^{2n-1})\right) =\frac 1{2(2n-1)i}.$$
We have $\frac1{2\pi}\int_{-\pi}^{\pi}|f(x)|^2dx=\frac{\pi^2}{16}$ and $|\widehat f(2n-1)|^2=\frac1{4(2n-1)^2}$ so by Parseval equality
$$\frac{\pi^2}{16}=\sum_{n\in\mathbb Z}|\widehat f(2n-1)|^2=\sum_{n\in\mathbb Z}\frac1{4(2n-1)^2}=\frac 14 \sum_{n\in\mathbb Z}\frac 1{(2n-1)^2}\\\
=\frac 14\sum_{n\geq 1}\frac 1{(2n-1)^2}+\frac 14\sum_{n\geq 0}\frac 1{(2n+1)^2}
=\frac 12\sum_{n\geq 1}\frac 1{(2n-1)^2}. $$
and finally $$\sum_{n=1}^{+\infty}\frac 1{(2n-1)^2}=\frac{\pi^2}8.$$
A: We have $$\frac{\pi^2}{6}=\sum_{n=1}^\infty\frac{1}{n^2}=\sum_{n=1}^\infty \frac{1}{(2n-1)^2}+\sum_{n=1}^\infty\frac{1}{(2n)^2}$$
But $\sum_{n=1}^\infty\frac{1}{(2n)^2}=\frac{1}{4}\sum_{n=1}^\infty\frac{1}{n^2}
$ so $$\sum_{n=1}^\infty \frac{1}{(2n-1)^2}=\frac{\pi^2}{8}$$
But in general for two real numbers $a,b>0$ we have 
$$\sum_{n=1}^{\infty}\frac{1}{(an+b)^2}=\int_0^\infty \frac{te^{-at}}{1-e^{-bt}}dt$$
A: 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
