A1441 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A14 · Lesson 41 · Pointwise convergence of Fourier series

The Dirichlet kernel, what happens at a jump, and why the overshoot never goes away

Lesson 40 showed that a Fourier series converges in the mean-square sense, the energy of the error going to zero. An engineer looking at a reconstructed square wave on a scope sees something more specific: the series settles to the right value at most points, hits the midpoint exactly at each jump, and overshoots by about 9% on either side of the jump no matter how many terms are kept. All three facts come from one function, the Dirichlet kernel, that every partial sum convolves the signal with.

  • The curve is the partial sum of the Fourier series of a ±1 square wave, using harmonics up to N. The dashed line is the limit of its overshoot, 2πSi(π)=1.179.
  • More terms squeeze the ripple closer to the jump, but its peak never drops below that line.

Predict

The Fourier series of a ±1 square wave is evaluated exactly at a jump, where the wave switches from −1 to +1. What value does the series converge to there?

Name it

Partial sums as convolution

With ck=12π∫−ππf(t)e−iktdt, the partial sum SNf(x)=∑k=−NNckeikx can be rewritten as

SNf(x)=12π∫−ππf(x−t)DN(t)dtDN(t)=∑k=−NNeikt=sin⁡((N+12)t)sin⁡(t/2)

The Dirichlet kernel DN has height 2N+1 at t=0, area 2π, and oscillating side lobes that take negative values. That last fact causes all the trouble.

Dirichlet's theorem

If f is piecewise smooth (finitely many jumps, with one-sided derivatives everywhere), then at every x

SNf(x)→f(x+)+f(x−)2

so to f(x) where f is continuous and to the midpoint at a jump. The proof splits the integral near t=0, where the kernel's peak picks out the two one-sided values, and away from it, where the Riemann-Lebesgue lemma, that ∫g(t)sin⁡(Mt)dt→0 as M→∞ for integrable g, kills the rest.

The Gibbs phenomenon

Near a jump of size J, SN overshoots by about 0.0895J on each side, at a distance of about π/N from the jump. The overshoot narrows as N grows but its height approaches

(1πSi(π)−12)J=0.0895JSi(π)=∫0πsin⁡ttdt=1.8519

So convergence near a jump isn't uniform: the maximum error never falls below 9% of the jump. Lesson 42's Fejér means, built from a kernel that's never negative, remove the overshoot.

Continuity isn't enough

There are continuous functions whose Fourier series diverge at a point. Smoothness, not mere continuity, is what Dirichlet's theorem needs; the more derivatives f has, the faster ck→0 and the faster SNf converges.

Worked example

Show that the Dirichlet kernel has height 2N+1 at t=0 and area 2π over one period.

Show the solution
  1. Height at t = 0. Every term eikt is 1 there, and there are 2N+1 of them: DN(0)=2N+1
  2. Integrate term by term. Over [−π,π], ∫eiktdt=0 for k≠0 and 2π for k=0, so for every N ∫−ππDN(t)dt=2π
  3. As N grows. The kernel gets taller and narrower with the same area, but it never becomes positive everywhere: its side lobes swing negative by an amount that doesn't shrink relative to the peak.

Answer DN(0)=2N+1, and its area over one period is 2π for every N.

Worked example

A ±1 square wave's partial sums overshoot near the jump. What peak do they approach, and how far from the jump does it sit for N=50?

Show the solution
  1. Size of the overshoot. The jump is J=2, so the overshoot approaches 0.0895×2=0.179
  2. The peak. That's a peak of 1.179, which is 2πSi(π).
  3. Where it sits. About π/N from the jump: π50=0.063rad or 1% of a period.
  4. More terms. A thousand terms move it ten times closer but leave it just as tall, which is why a band-limited square wave on a scope always shows those spikes.

Answer the peak approaches 1.179, and for N=50 it sits about 0.063 radians from the jump.

Worked example

The sawtooth f(x)=x on (−π,π), repeated, has SNf(x)=2∑k=1N(−1)k+1ksin⁡kx. What does the series give at x=π, and what is the peak of its partial sums near there for large N?

Show the solution
  1. The value at π. Every sin⁡kπ=0, so the series gives 0: the midpoint of the jump from π down to −π.
  2. The overshoot. The jump is 2π, so the partial sums overshoot to about π+0.0895(2π)=3.704 just inside the jump.
  3. Compare. That's again about 9% of the jump above the function's largest value, π.

Answer the series gives 0 at x=π, and the partial sums peak near 3.704 just inside the jump.

Check

A piecewise smooth function jumps from 0 to 3 at a point. What does its Fourier series converge to there?

Check

A signal jumps by 2 at a point, its value just after the jump being 1. Approximately what peak do its Fourier partial sums approach just after the jump, for large N?

Check

What is the height of the Dirichlet kernel D20 at t=0?

Check

For the ±1 square wave's partial sum SN(x)=4π∑k odd≤Nsin⁡kxk, evaluate it on x = np.linspace(1e-4, 4 / N, 4000) for N = 200 and set peak to its largest value and where to the x where that happens. Set ratio to where * N, which should be close to π, and gibbs to 2πSi(π), with Si(π) by Simpson's rule on 2000 intervals.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Where is the first zero of the Dirichlet kernel D20(t)=sin⁡((N+12)t)/sin⁡(t/2) to the right of t=0?

Check

Why do Fourier partial sums overshoot a jump while Fejér means (averages of the partial sums) don't?

Explain why

A band-limited reconstruction of a square wave always shows spikes near each edge, and adding bandwidth makes them narrower but not shorter. Explain why, using the kernel.

Practice

Keep practicing

7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.