3

I'm doing exercise 15 on page 255 in Kreyszig:

  1. 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.

t.b.
  • 78,116
  • Doesn't Kreyszig normalize the integral with a factor? – t.b. Jul 30 '12 at 06:45
  • @t.b. Isn't choosing the normalising constants up to me? – Rudy the Reindeer Jul 30 '12 at 06:45
  • I think you need to normalize the coefficients by the period – Thomas Rot Jul 30 '12 at 06:46
  • Yes, they are up to you up to the point where you need to make them compatible with the inversion theorem. – t.b. Jul 30 '12 at 06:46
  • Does it matter that you have $\int_0^\pi{e^{-inx} dx} = {i\over n}e^{in\pi}$ instead of ${i\over n}\left(e^{in\pi}-1\right)$ ? – MJD Jul 30 '12 at 06:47
  • @MarkDominus That is of course a mistake in my sums. Thank you very much for spotting that! – Rudy the Reindeer Jul 30 '12 at 06:48
  • @MarkDominus It makes not difference though because they cancel out. My problem is at the zero-character. – Rudy the Reindeer Jul 30 '12 at 06:49
  • You need to divide by the period $2 \pi$ somewhere along the line. I would expect the series to converge to the average of limits from either side, so at $x=0$, I would expect $\frac{1}{2}$. It is not immediately obvious to me how you conclude with $f(x) = \pi$. I would expect $f(0) = \frac{1}{2}$. – copper.hat Jul 30 '12 at 06:51
  • @t.b. But no matter what normalisation I choose: the zero coefficient is non-zero. Didn't we discuss yesterday that the Fourier series should be zero? Although that wouldn't make sense either because the Fourier should equal the function. – Rudy the Reindeer Jul 30 '12 at 06:52
  • 2
    I certainly didn't discuss that (I said I couldn't follow) I only said that you can reduce to a pure sine wave by subtracting $1/2$. See also: Gibbs phenomenon – t.b. Jul 30 '12 at 06:59
  • @t.b. Ok : ) Didn't mean to accuse you of it. Just misremembered. Going to read link now. – Rudy the Reindeer Jul 30 '12 at 07:01
  • 1
    @MattN.: The zero coefficient is the average of the function and is definitely not zero here... – copper.hat Jul 30 '12 at 07:03
  • @copper.hat Ooh, thank you! I knew that actually, but didn't remember! But: if all my other coefficients cancel out, then the Fourier series equals $\hat{f}(e^{i0})$. But shouldn't the Fourier series equal the function we take the Fourier series of? Or maybe not since we're in $L^2(G)$ and we only have convergence in norm... – Rudy the Reindeer Jul 30 '12 at 07:08
  • Well, in this case the series will converge to the function everywhere except at $x=0,\pm \pi$. – copper.hat Jul 30 '12 at 07:13
  • @t.b. Wait, but: where does Gibbs come in here? My function is $1$ at zero and my $n$-th partial Fourier series is $\frac12$ at zero. So there is no overshooting in this example. Well at least not the way they draw it in the example pictures on Wikipedia. Perhaps being constant $\frac12$ on $[-\pi,0)$ counts as overshooting, too. – Rudy the Reindeer Jul 30 '12 at 07:28
  • 2
    There is definitely overshooting in this example! The Gibbs phenomenon applies to finite sums, not the limit. – copper.hat Jul 30 '12 at 07:43
  • Note the reconstructed function is $0$ on $(-\pi,0)$ and $1$ on $(0,\pi)$, not $\frac{1}{2}$. – copper.hat Jul 30 '12 at 07:50
  • All that @copper.hat says is correct. The page on the Gibbs phenomenon has the example you ask about completely worked out along with pictures of how the partial sums approximate the function. This is the easiest instance of the Gibbs phenomenon. – t.b. Jul 30 '12 at 07:58
  • @t.b. Yes I know. But I wouldn't trust Wikipedia. Examples there might be wrong, including the pictures. (Although it's not very likely.) – Rudy the Reindeer Jul 30 '12 at 08:07
  • 1
    Yeah right :) They also perpetuate such blatant falsehoods as the uncountability of the reals... Come on: a page on a phenomenon that is specifically about this effect might have some $\varepsilon$'s off but won't be completely wrong. – t.b. Jul 30 '12 at 08:12
  • @t.b. Probably. But I'm just very insecure about my mathematical thoughts in general and particularly tired today. Both together is a bad combination. Anyway. Things are looking up slightly. – Rudy the Reindeer Jul 30 '12 at 08:31
  • @t.b. Like for example the stub article about lifts: If you have two morphisms $f: X \to Y$ and $g: Z \to Y$, certainly "lifting $f$ to $Z$" must be a map $h: Z \to X$ such that $fh = g$, not $h: X \to Z$. I don't believe this. – Rudy the Reindeer Jul 30 '12 at 08:36
  • No, they have it completely right (despite the fact that it's a stub). It's about lifting the morphism $f$ over $g$ and that's what they say it is. Just as in homological algebra: you lift a morphism $f\colon P \to B$ from a projective $P$ over every epimorphism $g\colon A \twoheadrightarrow B$. We should stop now, we already auto-generated a flag for having posted too many comments (and the last few comments are decidedly off-topic). – t.b. Jul 30 '12 at 08:44
  • @MattN: funny you should mention the article about lifts; I used it in an answer about this yesterday (including an explanation why we call this a lift and not as you say.) – wildildildlife Jul 30 '12 at 22:04

3 Answers3

4

@AD. gave the usual formula for the Fourier series.

The Fourier coefficients are $\hat{f}_0 = \frac{1}{2}$, and $\hat{f}_n = - \frac{1}{2 i \pi n} (e^{-in \pi} -1) = \frac{1}{2 i \pi n} (1-(-1)^n)$, for $n \neq 0$. So, for $n\neq 0$, only the odd coefficients are non zero.

Now let $\phi(x) = f_0 + \sum_{n>0} f_n e^{inx} + f_{-n} e^{-inx} = \frac{1}{2} + \sum_{n>0,\, n\ \mathbb{odd}} \frac{2}{2 i \pi n}(e^{inx}-e^{-inx})$. Continuing gives $\phi(x) = \frac{1}{2} + \frac{2}{\pi} \sum_{n>0,\, n\ \mathbb{odd}} \frac{\sin nx}{n} $. This is the Fourier series of the periodic step function, and converges to $f(x)$ at all points except for $x=0,\pi$, where it converges to the average of the right and left limits of $f$ (inasmuch as left and right make sense in a periodic setting!).

copper.hat
  • 172,524
1

I think you missed some point in the definition.

The definition of the Fourier coefficient of a function $f$ defined on $[-\pi,\pi]$ with respect to $x\mapsto e^{inx}$ where $n\in\mathbb{Z}$ is given by $$\hat{f}(n)=\frac{1}{2\pi}\int_{-\pi}^\pi f(x)e^{-inx}dx$$ and the Fourier series of $f$ is then given by $$f(x) \sim\sum_{n\in\mathbb{Z}} \hat{f}(n)e^{inx}.$$ The normalizing constant $\frac{1}{2\pi}$ is needed in order for $n\mapsto e^{inx}$ to be an ON-basis (otherwise they will not have norm 1).

Please, go through your calculations with the above in mind.

  • Thank you, yes I will do that. – Rudy the Reindeer Jul 31 '12 at 04:55
  • I re-computed everything. But I think there is still a mistake in it. – Rudy the Reindeer Aug 20 '12 at 14:32
  • 1
    @Matt At this very moment, I do not have time to answer. So if I don't get back - please notify me again and I will! Three comments: (1) Try to factorize your formula before computing it; (2) You lost a factor 2 in the formula for $n\ne0$; (3) It is (fairly) common to say that the Fourier series is the limit of the symmetric sum $$S_Nf=\sum_{n=-N}^N \hat{f}(n)e^{inx}$$ which you may use to find the sine formula by gathering the coefficients of $e^{-kx}$ and $e^{ikx}$. – AD - Stop Putin - Aug 20 '12 at 19:40
  • Thanks a lot for your comment! – Rudy the Reindeer Aug 20 '12 at 19:41
  • Also, a useful formula for the $N$-th partial sum is given by $$(D_N * f)(x)$$ where $D_N$ is the Dirichlet kernel that is $$D_n(x)=\sum_{k=-N}^Ne^{ikx}$$ This sum is computable using a geometric sum - or if you wish you may Google the name. Moreover, the sum is not absolutely convergent - in the usual meaning. – AD - Stop Putin - Aug 20 '12 at 19:43
  • @Matt Thanks, and please return later on - if I am quiet or if something is strange. – AD - Stop Putin - Aug 20 '12 at 19:45
  • Yes, I will, thank you so much for your help. – Rudy the Reindeer Aug 20 '12 at 19:45
0

I re-computed the Fourier series:

$$ a_0 = \langle f, e^{-i0} \rangle = \frac{1}{2 \pi} \int_0^\pi 1 dx = \frac12$$

$$ a_n = \frac{1}{2 \pi} \int_0^\pi e^{-inx} dx = \frac{1}{2 \pi} \left [ \frac{i}{n} e^{-inx} \right ]_0^\pi$$

If $n$ is even: $a_n = \frac{1}{2 \pi}(\frac{i}{n} - \frac{i}{n}) = 0$

If $n$ is odd: $a_n = \frac{1}{2 \pi}(\frac{i}{n}(-1) - \frac{i}{n}) = \frac{-i}{2 \pi n}$

So that

$$ f(x) = \sum_{k=-\infty}^\infty \frac{-i}{2 \pi (2k + 1)} e^{(2k + 1)ix}$$

and hence

$$ |f(x)| \leq \frac{1}{2 \pi } \sum_{k=-\infty}^\infty \frac{1}{ (2k + 1)} = 0$$

So that the Fourier series converges at $0$ absolutely.