I posted a very similar exercise a few days ago. I think this one is a bit easier.

Let if , if .

1)Calculate for all .

2)Calculate .

3)Study the pointwise convergence of the Fourier series of f.

Attempt: 1)For all , I get that . For , which is consistent with the average of the right and left limit of the function at .

2) . So I think I should calculate the Fourier series of f.

It gave me .

So that .

The algebra really get messy... Too messy. I suppose there is an easier way to solve the question.

3)Maybe I should use theDirichlet–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 into the infinite series, it diverges since I fall over 2 harmonic series.