Let $\displaystyle f$ be the function given by $\displaystyle f(\theta) = |\theta|$ for $\displaystyle \theta\in [ -\pi , \pi ]$.

a) Calculate the fourier coefficients of $\displaystyle f$ and show that...

$\displaystyle \hat{f}(n) = \frac{(-1)^n - 1}{\pi n^2}$ for $\displaystyle n \neq 0$

$\displaystyle \hat{f}(n) = \frac{\pi}{2}$ for $\displaystyle n = 0$.

done...

b) What is the Fourier series of $\displaystyle f$ in terms of sines and cosines?

My answer, $\displaystyle \frac{\pi}{2} + \sum_{n=-\infty}^{\infty} \frac{(-1)^n - 1}{\pi n^2} \cos(n\theta)$.

For even n's the summands of this series are zero, so you can take only odd n's in the sum and since you have a square in the denominator this is the same as twice the sum over the odd natural numbers (taking $\displaystyle \theta=0$): $\displaystyle \frac{\pi}{2} + \sum_{n=-\infty}^{\infty} \frac{(-1)^n - 1}{\pi n^2} \cos(n\cdot 0)=\frac{\pi}{2}+\frac{2}{\pi}\sum^\infty_{k=0}\fr ac{-2}{(2k-1)^2}$ $\displaystyle = \frac{\pi}{2}-\frac{4}{\pi}\sum^\infty_{k=0}\frac{1}{(2k-1)^2}$ . Now equal the above to zero and you'll get what you want... Tonio
c) Taking $\displaystyle \theta= 0$, prove that

$\displaystyle \sum_{k=0}^{\infty} \frac{1}{(2k+1)^2} = \frac{\pi^2}{8}$ and $\displaystyle \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$

Now this, I suspect, should have just been a simple application of Parsevals theorem but I'm going wrong somewhere.

**Parsevals Theorem.**
$\displaystyle \left ( \frac{1}{2 \pi} \int_{-\pi}^{\pi} |f(\theta)|^2 d \theta \right)^{\frac{1}{2}} = \left ( \sum_{n=-\infty}^{\infty} |\hat{f}(n)|^2\right)^{\frac{1}{2}}$

But with $\displaystyle \theta = 0$ the left hand side is 0.

Thus we get,

$\displaystyle 0 = \left ( \sum_{n=-\infty}^{\infty} |\hat{f}(n)|^2\right)^{\frac{1}{2}}$

= $\displaystyle \left ( \frac{\pi^2}{4} + \sum_{n=-\infty}^{\infty} \left (\frac{1-1}{n^2 \pi} \right )^2 \right)^{\frac{1}{2}} = \frac{\pi}{2}$

So clearly I'm doing something wrong... Most likely in that last 2 steps...