1. Fourier series exercise

Let f(t) be defined by $\displaystyle -\pi -t$ if $\displaystyle -\pi <t \leq 0$ and $\displaystyle \pi -t$ if $\displaystyle 0<t< \pi$.
1)Calculate $\displaystyle \hat f (n)$, $\displaystyle \forall n \in \mathbb{Z}$.
Attempt: After a lot of algebra, I reached $\displaystyle \hat f (n)=\frac{i [(-1)^n-1]}{n}+\frac{(-1)^n}{2n}+\frac{[(-1)^n-1]}{2n^2}+\frac{(-1)^{n+1}+1}{2\pi n}\left [ \pi + \frac{i}{n}} \right ]$ for all $\displaystyle n\neq 0$. I don't know how to check it out in Mathematica so I'd like to know if you could verify my answer. For $\displaystyle \hat f(0)$, I get $\displaystyle -\frac{\pi}{2}$.
2)Calculate $\displaystyle \sum _{n \in \mathbb{Z}} |\hat f (n)|^2$. Attempt: Not done yet, but if I remember well I should use Parseval identity. Is that right?
3)Study the pointwise convergence of the Fourier series of f. Attempt: Not done yet, but I think I should look at $\displaystyle \lim _{n \to \infty} \hat f (n)$ and see if it's equal to the function f?

2. At any point of discontinuity the Fourier series should converge to the average of the limit from the left and the right. In this case

$\displaystyle \displaystyle \hat{f}(0)=\lim_{h \to 0}\frac{f(t+h)+f(t-h)}{2}=\frac{\pi-\pi}{2}=0$

When I do the integral

$\displaystyle \displaystyle c_n=\int_{-\pi}^{\pi}f(t)e^{int}dt=\frac{2\pi i}{n}$

$\displaystyle \displaystyle \hat{f}(n)=\sum_{n=-\infty;n \ne 0}^{\infty}\frac{2\pi i}{n}e^{itn}$

Notice that
$\displaystyle \displaystyle \hat{f}(0)=\sum_{n=-\infty;n \ne 0}^{\infty} \frac{2\pi i}{n}=0$
all of the terms reduce out pairwise.
for 2) that is a great idea.
for 3 Convergence of Fourier series - Wikipedia, the free encyclopedia

3. Originally Posted by TheEmptySet
At any point of discontinuity the Fourier series should converge to the average of the limit from the left and the right. In this case

$\displaystyle \displaystyle \hat{f}(0)=\lim_{h \to 0}\frac{f(t+h)+f(t-h)}{2}=\frac{\pi-\pi}{2}=0$
Oh yes, you're right. I forgot this important result.
When I do the integral

$\displaystyle \displaystyle c_n=\int_{-\pi}^{\pi}f(t)e^{int}dt=\frac{2\pi i}{n}$
Do you mean $\displaystyle \int_{-\pi}^{\pi}f(t)e^{-int}dt$? What it a typo or an error?

Notice that
$\displaystyle \displaystyle \hat{f}(0)=\sum_{n=-\infty;n \ne 0}^{\infty} \frac{2\pi i}{n}=0$
all of the terms reduce out pairwise.
for 2) that is a great idea.
for 3 Convergence of Fourier series - Wikipedia, the free encyclopedia
Ok thanks a lot, I'll be working on it.

4. I used a different definition of the Fourier transform. The kernel I used was $\displaystyle e^{inx}$ as opposed to $\displaystyle e^{-inx}$ The only difference is that this would give a minus sign for my coefficients but it should not change the solution as to invert I have to use the opposite kernel.