I'm doing exercise 15 on page 255 in Kreyszig:
- To illustrate that a Fourier series of a function $f$ may converge even at a point where $f$ is discontinuous, find the Fourier series of
$ f(x) = \begin{cases} 0 & x \in [-\pi, 0) \\ 1 & x \in [0, \pi) \end{cases}$
My solution:
(i) For the $n$-th character, $n \in \mathbb N$, we compute the $n$-th coefficient as follows: $ \hat{f}(e^{inx}) = \langle f, e^{inx} \rangle = \int_0^\pi e^{-inx} dx = \frac{i}{n}(e^{in \pi} - 1)$
(ii) For the $-n$-th character we compute $\hat{f}(e^{inx}) = \langle f, e^{-inx} \rangle = \frac{-i}{n}(e^{in \pi}-1)$
(iii) For the $0$-character $e^{i0x} = 1$ we compute $\hat{f}(e^{i0x}) = \langle f, e^{-i0x} \rangle = \int_0^\pi 1 dx = \pi$
So that the Fourier series of $f$ is $ F(f(x)) = \pi , \hspace{1cm} x \in [-\pi, \pi)$
Which is clearly wrong. What did I do wrong? Thanks for your help.