The Gibbs Phenomenon

Why the bump beside the jump never dies — rescaling by t=2Nxt = 2Nx collapses SNS_N onto (2/π)Si(t)(2/\pi)\mathrm{Si}(t), and the first peak tends to (2/π)Si(π)≈1.179(2/\pi)\mathrm{Si}(\pi) \approx 1.179. The overshoot is about 8.95% of the jump.

SN′(x)=2πsin⁡(2Nx)sin⁡xS_N'(x) = \frac{2}{\pi}\frac{\sin(2Nx)}{\sin x}
peak→2πSi(π)≈1.17898\text{peak} \to \frac{2}{\pi}\mathrm{Si}(\pi) \approx 1.17898

Examples & Exercises

Differentiate 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} to prove SN′(x)=2π⋅sin⁡(2Nx)sin⁡xS_N'(x) = \frac{2}{\pi}\cdot\frac{\sin(2Nx)}{\sin x}. Show the critical points in (0,π)(0, \pi) are xm=mπ2Nx_m = \frac{m\pi}{2N}, with the first peak at x1=π2Nx_1 = \frac{\pi}{2N}. (Complete proof)

∑k=1Ncos⁡((2k−1)x)=ℜ∑k=1Nei(2k−1)x=sin⁡(2Nx)2sin⁡x\sum_{k=1}^{N}\cos((2k-1)x) = \Re\sum_{k=1}^{N}e^{i(2k-1)x} = \frac{\sin(2Nx)}{2\sin x}
SN′(x)=4π⋅sin⁡(2Nx)2sin⁡x=2π⋅sin⁡(2Nx)sin⁡xS_N'(x) = \frac{4}{\pi}\cdot\frac{\sin(2Nx)}{2\sin x} = \frac{2}{\pi}\cdot\frac{\sin(2Nx)}{\sin x}
xm=mπ2N(m=1,…,2N−1)x_m = \frac{m\pi}{2N}\quad (m = 1, \dots, 2N-1)
N=12N = 12: the first peak sits at x1=π24≈0.1309x_1 = \frac{\pi}{24} \approx 0.1309 — the derivative identity's zeros pin down the peak positions.
Show proof
  1. The sum is finite, so termwise differentiation is legitimate: SN′(x)=4π∑k=1Ncos⁡((2k−1)x)S_N'(x) = \frac{4}{\pi}\sum_{k=1}^{N}\cos((2k-1)x). View the cosine sum through complex exponentials: ∑k=1Ncos⁡((2k−1)x)=ℜ∑k=1Nei(2k−1)x\sum_{k=1}^{N}\cos((2k-1)x) = \Re\sum_{k=1}^{N}e^{i(2k-1)x}.
  2. It is a geometric series: ∑k=1Nei(2k−1)x=eix1−ei2Nx1−ei2x\sum_{k=1}^{N}e^{i(2k-1)x} = e^{ix}\frac{1 - e^{i2Nx}}{1 - e^{i2x}}. Factoring, 1−ei2Nx=−2i eiNxsin⁡(Nx)1 - e^{i2Nx} = -2i\,e^{iNx}\sin(Nx) and 1−ei2x=−2i eixsin⁡x1 - e^{i2x} = -2i\,e^{ix}\sin x, so the ratio is eiNxsin⁡(Nx)eixsin⁡x=ei(N−1)xsin⁡(Nx)sin⁡x\frac{e^{iNx}\sin(Nx)}{e^{ix}\sin x} = e^{i(N-1)x}\frac{\sin(Nx)}{\sin x}. Multiplying by the leading eixe^{ix} gives eiNxsin⁡(Nx)sin⁡xe^{iNx}\frac{\sin(Nx)}{\sin x}, whose real part is cos⁡(Nx)sin⁡(Nx)sin⁡x=sin⁡(2Nx)2sin⁡x\frac{\cos(Nx)\sin(Nx)}{\sin x} = \frac{\sin(2Nx)}{2\sin x}.
  3. Hence SN′(x)=4π⋅sin⁡(2Nx)2sin⁡x=2π⋅sin⁡(2Nx)sin⁡xS_N'(x) = \frac{4}{\pi}\cdot\frac{\sin(2Nx)}{2\sin x} = \frac{2}{\pi}\cdot\frac{\sin(2Nx)}{\sin x} — the Dirichlet kernel in closed form for the odd frequencies.
  4. On (0,π)(0, \pi) we have sin⁡x≠0\sin x \ne 0, so critical points come from sin⁡(2Nx)=0\sin(2Nx) = 0: 2Nx=mπ2Nx = m\pi, i.e. xm=mπ2Nx_m = \frac{m\pi}{2N} for m=1,…,2N−1m = 1, \dots, 2N-1. On (0,π2N)(0, \frac{\pi}{2N}) both sin⁡(2Nx)>0\sin(2Nx) > 0 and sin⁡x>0\sin x > 0, so SN′(x)>0S_N'(x) > 0; starting from SN(0)=0S_N(0) = 0 the sum climbs monotonically to its first maximum (the peak) at x1=π2Nx_1 = \frac{\pi}{2N}.

Show the first peak's height tends to 2πSi(π)≈1.17898\frac{2}{\pi}\mathrm{Si}(\pi) \approx 1.17898, marking the step that passes the limit N→∞N \to \infty under the integral as the analysis step. Also prove Si(t)=∫0tsin⁡uu du\mathrm{Si}(t) = \int_0^t \frac{\sin u}{u}\,du attains its global maximum at t=πt = \pi. (Complete except for the honestly marked analysis step)

SN(x)=2π∫02Nxsin⁡t2Nsin⁡(t/2N) dtS_N(x) = \frac{2}{\pi}\int_0^{2Nx}\frac{\sin t}{2N\sin(t/2N)}\,dt
→analysis step2π∫02Nxsin⁡tt dt\xrightarrow{\text{analysis step}} \frac{2}{\pi}\int_0^{2Nx}\frac{\sin t}{t}\,dt
Si′(t)=sin⁡tt>0on (0,π)\mathrm{Si}'(t) = \frac{\sin t}{t} > 0 \quad \text{on } (0, \pi)
N=12N = 12: measured peak ≈1.17956\approx 1.17956 against the theoretical limit 2πSi(π)≈1.17898\frac{2}{\pi}\mathrm{Si}(\pi) \approx 1.17898 — error under 0.00060.0006.
Show proof
  1. Since SN(0)=0S_N(0) = 0, we have SN(x)=∫0xSN′(u) duS_N(x) = \int_0^x S_N'(u)\,du. Substituting the previous problem's identity gives SN(x)=2π∫0xsin⁡(2Nu)sin⁡u duS_N(x) = \frac{2}{\pi}\int_0^x \frac{\sin(2Nu)}{\sin u}\,du; the change of variables t=2Nut = 2Nu (dt=2N dudt = 2N\,du) yields SN(x)=2π∫02Nxsin⁡t2Nsin⁡(t/2N) dtS_N(x) = \frac{2}{\pi}\int_0^{2Nx}\frac{\sin t}{2N\sin(t/2N)}\,dt — pure algebra so far.
  2. For each fixed tt, 2Nsin⁡(t/2N)→t2N\sin(t/2N) \to t (since sin⁡v∼v\sin v \sim v). ★ Here — exactly once — we use analysis: for x≤π2x \le \frac{\pi}{2} (in particular at the peak x1=π2Nx_1 = \frac{\pi}{2N}), t∈(0,2Nx]t \in (0, 2Nx] gives v=t2N∈[0,π2]v = \frac{t}{2N} \in [0, \frac{\pi}{2}], and sin⁡v≥2vπ\sin v \ge \frac{2v}{\pi} yields 2Nsin⁡(t/2N)≥2tπ2N\sin(t/2N) \ge \frac{2t}{\pi}. So the integrand is dominated by π2⋅∣sin⁡t∣t≤π2\frac{\pi}{2}\cdot\frac{\lvert\sin t\rvert}{t} \le \frac{\pi}{2}. Dominated convergence passes the limit inside: SN(x)→2π∫02Nxsin⁡tt dt=2πSi(2Nx)S_N(x) \to \frac{2}{\pi}\int_0^{2Nx}\frac{\sin t}{t}\,dt = \frac{2}{\pi}\mathrm{Si}(2Nx).
  3. At the first peak x1=π2Nx_1 = \frac{\pi}{2N} we have 2Nx1=π2Nx_1 = \pi, so the peak height tends to 2πSi(π)≈1.17898\frac{2}{\pi}\mathrm{Si}(\pi) \approx 1.17898. Numerical cross-check: it agrees with the Fourier scene's observed GIBBS_PEAK=1.178979744472167\mathrm{GIBBS\_PEAK} = 1.178979744472167 to within 10−910^{-9}.
  4. Since Si′(t)=sin⁡tt>0\mathrm{Si}'(t) = \frac{\sin t}{t} > 0, Si\mathrm{Si} is strictly increasing on (0,π)(0, \pi). For t>πt > \pi, split the tail ∫πtsin⁡uu du\int_{\pi}^{t}\frac{\sin u}{u}\,du into lobes Lk=∫kπ(k+1)πsin⁡uu duL_k = \int_{k\pi}^{(k+1)\pi}\frac{\sin u}{u}\,du (k≥1k \ge 1): they alternate in sign, shrink because ∣Lk+1∣=∫kπ(k+1)π∣sin⁡v∣v+π dv<∫kπ(k+1)π∣sin⁡v∣v dv=∣Lk∣\lvert L_{k+1}\rvert = \int_{k\pi}^{(k+1)\pi}\frac{\lvert\sin v\rvert}{v+\pi}\,dv < \int_{k\pi}^{(k+1)\pi}\frac{\lvert\sin v\rvert}{v}\,dv = \lvert L_k\rvert, and the first lobe L1<0L_1 < 0. Every partial sum of this alternating series is negative (even counts are sums of negative pairs, odd counts add one more negative lobe), so Si(t)<Si(π)\mathrm{Si}(t) < \mathrm{Si}(\pi) for t>πt > \pi. Hence Si\mathrm{Si} attains its global maximum at t=πt = \pi, with value ≈1.85194\approx 1.85194.

Compute that the overshoot is about 8.949%8.949\% of the jump (size 2), and prove why it never disappears as N→∞N \to \infty. (Complete proof)

2πSi(π)−12≈0.08948987≈8.949%\frac{\frac{2}{\pi}\mathrm{Si}(\pi) - 1}{2} \approx 0.08948987 \approx 8.949\%
SN ⁣(t2N)  →N→∞  2πSi(t)(N-independent limit)S_N\!\left(\frac{t}{2N}\right) \;\xrightarrow[N\to\infty]{}\; \frac{2}{\pi}\mathrm{Si}(t) \quad \text{(N-independent limit)}
Even at N=12N = 12 the overshoot is already 8.949%8.949\% of the jump — and growing NN leaves this fraction untouched.
Show proof
  1. The peak height tends to 2πSi(π)≈1.17898\frac{2}{\pi}\mathrm{Si}(\pi) \approx 1.17898 while the square wave sits at 11, so the overshoot is 1.17898−1=0.178981.17898 - 1 = 0.17898. The jump runs from −1-1 to 11 (size 22), hence the overshoot fraction is 0.178982=0.08948987≈8.949%\frac{0.17898}{2} = 0.08948987 \approx 8.949\%.
  2. Why it never dies: in the rescaled coordinate t=2Nxt = 2Nx the whole curve converges to the NN-independent limit function 2πSi(t)\frac{2}{\pi}\mathrm{Si}(t) (previous problem). The first bump has a fixed shape and height in tt-coordinates.
  3. Back in the original xx-coordinate the tt-interval is squeezed by 1/(2N)1/(2N): the bump's width ∼π/N→0\sim \pi/N \to 0 narrows, but its height tends to the constant 2πSi(π)−1≈0.179\frac{2}{\pi}\mathrm{Si}(\pi) - 1 \approx 0.179. In one sentence: the bump narrows like 1/N1/N but never shrinks.
  4. This is why the Fourier scene's numerical observation had to be exactly 2πSi(π)\frac{2}{\pi}\mathrm{Si}(\pi) — analysis catching up to prove the constant the numerics had already seen.

8. Series of Functions & Fourier