The Ringing That Never Dies

Round sine waves are layered to build a sharp square wave.

More terms press the flat parts onto the wave. But the ringing beside each jump does not shrink. No number of terms removes that bump.

For example, zoom into a 🏒 building in a πŸ“· photo. Smaller pixels sharpen the shape. Yet the jagged marks along the edges stay to the end.

SN(x)=4Ο€βˆ‘k=1Nsin⁑((2kβˆ’1)x)2kβˆ’1S_N(x) = \frac{4}{\pi}\sum_{k=1}^{N} \frac{\sin((2k-1)x)}{2k-1}

Examples & Exercises

Compute the sine-series coefficients b2kβˆ’1=4Ο€(2kβˆ’1)b_{2k-1} = \frac{4}{\pi(2k-1)} of the square wave by direct integration.

bn=2Ο€βˆ«0Ο€sin⁑(nx) dx=2(1βˆ’cos⁑nΟ€)nΟ€b_n = \frac{2}{\pi}\int_0^{\pi} \sin(nx)\,dx = \frac{2(1-\cos n\pi)}{n\pi}
N=5N = 5: the first 5 odd harmonics mimic the step.
Show proof
  1. The square wave is odd on (βˆ’Ο€,Ο€)(-\pi, \pi), so cosine coefficients vanish and bn=1Ο€βˆ«βˆ’Ο€Ο€f(x)sin⁑(nx) dx=2Ο€βˆ«0Ο€sin⁑(nx) dxb_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\sin(nx)\,dx = \frac{2}{\pi}\int_0^{\pi}\sin(nx)\,dx.

  2. Integrating gives 2nΟ€(1βˆ’cos⁑nΟ€)\frac{2}{n\pi}(1 - \cos n\pi): 00 for even nn, 4nΟ€\frac{4}{n\pi} for odd nn.

  3. So b2kβˆ’1=4Ο€(2kβˆ’1)b_{2k-1} = \frac{4}{\pi(2k-1)} and b2k=0b_{2k} = 0.

Verify numerically that the peak near the jump tends to β‰ˆ1.179\approx 1.179, i.e. about 9% of the jump.

(Numerical check)

max⁑SNβ†’2 Si(Ο€)Ο€β‰ˆ1.17898\max S_N \to \frac{2\,\mathrm{Si}(\pi)}{\pi} \approx 1.17898
N=50N = 50: peak β‰ˆ1.179\approx 1.179 β€” overshooting 1 by 0.1790.179.
Show proof
  1. Measuring the peak just right of the jump at N=50N = 50 gives β‰ˆ1.179\approx 1.179 (theory: 2 Si(Ο€)Ο€β‰ˆ1.17898\frac{2\,\mathrm{Si}(\pi)}{\pi} \approx 1.17898).

  2. The jump size is 22, so the excess 0.1790.179 above 11 is about 8.95%8.95\% of the jump.

  3. This fraction does not go to 0 as NN grows β€” that is the Gibbs phenomenon. (Verified numerically; the rigorous proof is omitted.)

9. Series of Functions & Fourier