1. ## Fourier series

I posted a very similar exercise a few days ago. I think this one is a bit easier.
Let $f(t)=0$ if $- \pi < t \leq 0$, $1$ if $0.
1)Calculate $\hat f (n)$ for all $n \in \mathbb{Z}$.
2)Calculate $\sum _{n=-\infty}^{\infty} |\hat f (n)|^2$.
3)Study the pointwise convergence of the Fourier series of f.

Attempt: 1)For all $n \neq 0$, I get that $\hat f(n)=\frac{i(-1)^n}{2 \pi n}$. For $n=0$, $\hat f(0)=\frac{1}{2}$ which is consistent with the average of the right and left limit of the function at $t=0$.
2) $\sum _{n=-\infty}^{\infty} |\hat f (n)|^2 =||f||^2 = \lim _{N \to \infty} ||S_N f||^2+ ||f- S_N f||^2=\frac{1}{2 \pi} \int _{-\pi}^{\pi} |f(t)|^2 dt$. So I think I should calculate the Fourier series of f.
It gave me $f(t)=\frac{1}{2}+ \sum _{n=-\infty}^{-1} \frac{i(-1)^n}{2 \pi n} \left [ \cos (tn) - i \sin (tn) \right ] + \sum _{n=1}^{+\infty} \frac{i(-1)^n}{2\pi n} \left [ \cos (tn) - i \sin (tn) \right ]$.
So that $||S_N f||^2 =\frac{1}{2\pi} \int _{- \pi}^{\pi} \left | \sum _{n=-N} ^{n=N} _{n \neq 0} \frac{i(-1)^n}{2 \pi n} + \frac{1}{2} \right | ^2$.
The algebra really get messy... Too messy. I suppose there is an easier way to solve the question.
3)Maybe I should use the Dirichlet–Dini Criterion (that I found in Convergence of Fourier series - Wikipedia, the free encyclopedia). But we never studied it, so I'm guessing there's another way.

Edit: For 2), if I plug directly the expression of $\hat f (n)$ into the infinite series, it diverges since I fall over 2 harmonic series.

2. For 2) use Parseval's Identity

$\displaystyle \sum_{n=-\infty}^{\infty}|\hat{f}(n)|^2=\frac{1}{2\pi}\int_ {-\pi}^{\pi}|f(x)|^2dx=\int_{-\pi}^{0}|0|^2dx+\int_{0}^{\pi}|1|^2dx=...$

Anywhere the $f(x)$ is differentiable the series will converge point wise. So for this series everywhere but 0.

3. Oh... now it seems so simple!
Did you forget a 1/(2 pi ) factor in the right side?
So that $\sum_{n=-\infty}^{\infty}|\hat{f}(n)|^2=\frac{1}{2\pi} \int _{0}^{\pi} dx=\frac{1}{2}$, or I'm missing something and $\sum_{n=-\infty}^{\infty}|\hat{f}(n)|^2=\pi$?

4. You are correct it got lost in translation.

5. Thanks for all. My exam (which is worth 100% of the grade for this course) starts in about 11 hours now. I'm very stressed and will reread my whole course and stop to do exercises now.