Unit 12, lesson 68

Fourier Convergence, Gibbs Phenomenon, and Half-Range Series

Where the Fourier series of a piecewise smooth function converges and to what, why it gives the average of the one-sided limits at a jump, what the Gibbs overshoot is, and how odd and even extensions lead to half-range series.

  • Video 68
  • Fourier Series

The sawtooth series sums to 00 at x=πx = \pi, where the sawtooth itself jumps from π\pi down to −π-\pi. Redefining the function at that single point would change no coefficient, so the series has no way of knowing the value written there. This lesson states when a Fourier series converges at each point and to what, explains the overshoot that partial sums keep next to a jump, and shows how data given only on [0,L][0, L] lead to two different half-range series. It ends with the conditions under which a Fourier series may be differentiated term by term.

Key terms

Piecewise smooth function

Definition A function ff is piecewise continuous on [a,b][a, b] if there are finitely many points a=x0<x1<⋯<xk=ba = x_0 < x_1 < \cdots < x_k = b such that ff is continuous on each open interval (xj−1,xj)(x_{j-1}, x_j) and has finite one-sided limits at both ends of each of these intervals. It is piecewise smooth on [a,b][a, b] if, in addition, ff is continuously differentiable on each open interval (xj−1,xj)(x_{j-1}, x_j) and f′f' has finite one-sided limits at both ends of it. A periodic function is piecewise smooth if it is piecewise smooth on one period. The values of ff at the break points xjx_j play no role.

In plain words Over one period the graph is made of finitely many smooth arcs. Jumps and corners are allowed where the arcs meet, but no blow-ups, no vertical tangents and no endless wiggling.

Example The square wave, equal to −1-1 on (−π,0)(-\pi, 0) and to 11 on (0,π)(0, \pi) and repeated with period 2π2\pi, is piecewise smooth, with jumps at the integer multiples of π\pi. So is the sawtooth, equal to xx on (−π,π)(-\pi, \pi), and so is the triangle wave, equal to ∣x∣\lvert x \rvert on [−π,π][-\pi, \pi], which has corners but no jumps. The function ∣x∣\sqrt{\lvert x \rvert} on [−1,1][-1, 1] is continuous but not piecewise smooth, because its derivative tends to ±∞\pm\infty at 00. The function sin⁡(1/x)\sin(1/x) is not even piecewise continuous on [0,1][0, 1], since it has no limit as x→0+x \to 0^+.

Pointwise convergence

Definition A series of functions converges pointwise on a set if, for each fixed xx in the set, its partial sums form a convergent sequence of numbers. The pointwise convergence theorem for Fourier series says the following. Let ff be piecewise smooth and periodic with period 2L2L, and write f(x−)f(x^-) and f(x+)f(x^+) for its left and right limits at xx. Then at every real xx the Fourier series of ff converges, and its sum is

S(x)=f(x−)+f(x+)2.S(x) = \frac{f(x^-) + f(x^+)}{2}.

At a point where ff is continuous this is f(x)f(x). At a jump it is the average of the one-sided limits, the midpoint of the jump, whatever value ff is given at that point. At the ends x=±Lx = \pm L of the basic interval the limits come from the periodic extension, so the sum at x=Lx = L is 12(f(L−)+f(−L+))\tfrac{1}{2}\bigl(f(L^-) + f(-L^+)\bigr), which is not f(L−)f(L^-) unless f(L−)=f(−L+)f(L^-) = f(-L^+). If ff is also continuous on the whole line, the convergence is uniform.

In plain words The series cannot see the single value written at a jump, since no integral changes when that value changes. What it does see are the values just to the left and just to the right, and it settles halfway between them.

Example The square wave is odd, so every ana_n is zero, and

bn=2π∫0πsin⁡nx dx=2(1−(−1)n)πn,\begin{aligned} b_n &= \frac{2}{\pi}\int_0^{\pi} \sin nx\,dx \\[0.4em] &= \frac{2\bigl(1 - (-1)^n\bigr)}{\pi n}, \end{aligned}

which is 4/(πn)4/(\pi n) for odd nn and 00 for even nn. So

f(x)∼4π∑n oddsin⁡nxn.f(x) \sim \frac{4}{\pi}\sum_{n\ \text{odd}}\frac{\sin nx}{n}.

At x=0x = 0 the one-sided limits are −1-1 and 11, so the sum is 00, and indeed every term vanishes there. At x=πx = \pi the left limit is 11 and, by periodicity, the right limit is −1-1, so the sum is again 00. At x=π/2x = \pi/2 the function is continuous with value 11, and the series becomes 4π(1−13+15−⋯ )=1\frac{4}{\pi}\bigl(1 - \frac{1}{3} + \frac{1}{5} - \cdots\bigr) = 1. A partial sum is only an approximation, even at a point of continuity. The three nonzero modes through sin⁡5x\sin 5x give

S5f(π/2)=4π(1−13+15)=5215π≈1.103.\begin{aligned} S_5 f(\pi/2) &= \frac{4}{\pi}\Bigl(1 - \frac{1}{3} + \frac{1}{5}\Bigr) \\[0.4em] &= \frac{52}{15\pi} \approx 1.103. \end{aligned}

Gibbs phenomenon

Definition Let ff be periodic and piecewise smooth with a jump at x0x_0 of size J=f(x0+)−f(x0−)≠0J = f(x_0^+) - f(x_0^-) \ne 0. The Gibbs phenomenon is the overshoot of the partial sums SNfS_N f next to x0x_0. On the side of the larger one-sided limit the partial sums rise above that limit, and on the other side they fall below the smaller one. As N→∞N \to \infty, the peak of each overshoot nearest the jump differs from its one-sided limit by an amount that tends to G∣J∣G\lvert J \rvert, where

G=1π∫0πsin⁡uu du−12≈0.0895,G = \frac{1}{\pi}\int_0^{\pi}\frac{\sin u}{u}\,du - \frac{1}{2} \approx 0.0895,

with the integrand taken to be 11 at u=0u = 0. So about 99 percent of the jump remains on each side, while the peak moves toward x0x_0 and sits at a distance of about L/NL/N from it. The partial sums therefore do not converge uniformly on any interval that has x0x_0 as an endpoint, even though they converge at every point. On every closed interval that contains no jump of the periodic extension the convergence is uniform. Mean-square convergence still holds, and the two facts fit together because the overshoot occupies a strip whose width tends to zero.

In plain words Adding more terms squeezes the ripples next to a jump into a narrower and narrower strip, but the tallest ripple keeps its height. About 99 percent of the jump survives on each side, however many terms are used.

Example For the square wave J=2J = 2, so the peaks approach 1+2G≈1.1791 + 2G \approx 1.179. The partial sum through sin⁡9x\sin 9x peaks at x=π/10x = \pi/10 with value about 1.1821.182, and the partial sum through sin⁡49x\sin 49x peaks at x=π/50x = \pi/50 with value about 1.1791.179. Over the same range the mean-square error ∥f−SNf∥2\lVert f - S_N f \rVert^2 on [−π,π][-\pi, \pi] drops from about 0.2540.254 to about 0.0510.051. The overshoot gets thinner, not lower.

Odd and even extensions

Definition Let ff be piecewise continuous on [0,L][0, L]. Its even extension is the function fef_e on (−L,L)(-L, L) with fe(x)=f(x)f_e(x) = f(x) and fe(−x)=f(x)f_e(-x) = f(x) for 0<x<L0 < x < L. Its odd extension fof_o has fo(x)=f(x)f_o(x) = f(x) and fo(−x)=−f(x)f_o(-x) = -f(x) for 0<x<L0 < x < L, with fo(0)=0f_o(0) = 0. Each is then repeated with period 2L2L. The values at x=0x = 0 and x=±Lx = \pm L affect no Fourier coefficient. The periodic even extension never has a jump at 00 or at LL, since its one-sided limits are f(0+)f(0^+) on both sides of 00 and f(L−)f(L^-) on both sides of LL. The periodic odd extension has a jump at 00 unless f(0+)=0f(0^+) = 0, and a jump at LL unless f(L−)=0f(L^-) = 0.

In plain words Data on [0,L][0, L] say nothing about negative xx, so we choose how to fill in that side. The even extension mirrors the graph in the vertical axis, and the odd extension mirrors it and flips its sign. The choice is ours, not a fact about the data.

Example For f(x)=1f(x) = 1 on (0,π)(0, \pi), the even extension is the constant 11 and the odd extension is the square wave. For f(x)=xf(x) = x on (0,π)(0, \pi), the odd extension is the sawtooth, with jumps at the odd multiples of π\pi, while the even extension is the triangle wave, which is continuous.

Half-range sine and cosine series

Definition Let ff be piecewise continuous on [0,L][0, L]. Its half-range sine series is the Fourier series of its odd extension,

f(x)∼∑n=1∞bnsin⁡nπxL,bn=2L∫0Lf(x)sin⁡nπxL dx,\begin{gathered} f(x) \sim \sum_{n=1}^{\infty} b_n \sin\frac{n\pi x}{L}, \\[0.4em] b_n = \frac{2}{L}\int_0^L f(x)\sin\frac{n\pi x}{L}\,dx, \end{gathered}

and its half-range cosine series is the Fourier series of its even extension,

f(x)∼a02+∑n=1∞ancos⁡nπxL,an=2L∫0Lf(x)cos⁡nπxL dx\begin{gathered} f(x) \sim \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos\frac{n\pi x}{L}, \\[0.4em] a_n = \frac{2}{L}\int_0^L f(x)\cos\frac{n\pi x}{L}\,dx \end{gathered}

for n≥0n \ge 0. Both use only the data on [0,L][0, L]. If ff is piecewise smooth on [0,L][0, L], both series converge at every interior point xx to 12(f(x−)+f(x+))\tfrac{1}{2}\bigl(f(x^-) + f(x^+)\bigr), which is f(x)f(x) where ff is continuous. They can differ at the ends. Every term of the sine series is zero at x=0x = 0 and at x=Lx = L, so its sum is 00 there. The cosine series converges to f(0+)f(0^+) at x=0x = 0 and to f(L−)f(L^-) at x=Lx = L. The sine modes satisfy the Dirichlet conditions X(0)=X(L)=0X(0) = X(L) = 0, while the cosine modes, the constant among them, satisfy the Neumann conditions X′(0)=X′(L)=0X'(0) = X'(L) = 0. The boundary conditions of a problem decide which series is useful.

In plain words The same data on half a period can be written with sines only or with cosines only. The two series agree inside the interval and part ways at the ends, where the sine series is held at zero and the cosine series follows the data.

Example For f(x)=1f(x) = 1 on (0,π)(0, \pi) the cosine series has a0=2a_0 = 2 and an=0a_n = 0 for n≥1n \ge 1, so it is just the constant a0/2=1a_0/2 = 1. The sine series has the square-wave coefficients bn=2(1−(−1)n)/(πn)b_n = 2\bigl(1 - (-1)^n\bigr)/(\pi n), so

1=4π∑n oddsin⁡nxn1 = \frac{4}{\pi}\sum_{n\ \text{odd}}\frac{\sin nx}{n}

for 0<x<π0 < x < \pi, while the sine series sums to 00 at x=0x = 0 and x=πx = \pi. That endpoint value comes from the chosen extension and is not a defect of the series. For a heat problem on (0,π)(0, \pi) with initial temperature 11 and both ends held at 00, the sine series is the natural choice, even though the initial data and the boundary values disagree at the two corners.

Termwise differentiation

Definition To differentiate a Fourier series term by term is to replace each term by its derivative, so the amplitudes of the nnth modes are multiplied by nπ/Ln\pi/L, with sines and cosines exchanged. The result need not be the Fourier series of f′f', and it need not converge at all. A sufficient condition is the following. If ff is continuous on the whole line and periodic with period 2L2L, and f′f' is piecewise smooth, then the termwise derivative of the Fourier series of ff is the Fourier series of f′f', and it converges to 12(f′(x−)+f′(x+))\tfrac{1}{2}\bigl(f'(x^-) + f'(x^+)\bigr) at every xx. The reason is integration by parts. For such an ff it gives the coefficients (nπ/L) bn(n\pi/L)\,b_n and −(nπ/L) an-(n\pi/L)\,a_n for the cosines and sines of f′f', exactly those of the termwise derivative, while a jump of ff would add boundary terms to these formulas. Termwise integration needs much less. If ff is piecewise continuous on [−L,L][-L, L], then integrating its Fourier series term by term from −L-L to xx gives a series that converges to ∫−Lxf(t) dt\int_{-L}^{x} f(t)\,dt for every xx in [−L,L][-L, L], whether or not the Fourier series of ff itself converges.

In plain words Differentiation multiplies the nnth amplitude by a multiple of nn, so a series whose coefficients shrink only like 1/n1/n loses all its decay. It is safe when the periodic extension of ff has no jumps and f′f' is itself piecewise smooth. Integration divides by nn and only helps.

Example The sawtooth series ∑2(−1)n+1sin⁡(nx)/n\sum 2(-1)^{n+1}\sin(nx)/n cannot be differentiated term by term. Its termwise derivative is ∑2(−1)n+1cos⁡nx\sum 2(-1)^{n+1}\cos nx. At x=0x = 0 the terms are 2,−2,2,…2, -2, 2, \dots, and at no xx do they tend to zero, since cos⁡nx→0\cos nx \to 0 would force both cos⁡2nx→0\cos 2nx \to 0 and cos⁡2nx=2cos⁡2nx−1→−1\cos 2nx = 2\cos^2 nx - 1 \to -1. So the differentiated series diverges everywhere, although f′(x)=1f'(x) = 1 on (−π,π)(-\pi, \pi). The trouble is the jump of the periodic extension at x=±πx = \pm\pi. The triangle wave has no jumps, and its derivative, the square wave, is piecewise smooth. Its series can be differentiated term by term,

∣x∣∼π2−4π∑n oddcos⁡nxn2,sgn⁡x∼4π∑n oddsin⁡nxn,\begin{aligned} \lvert x \rvert &\sim \frac{\pi}{2} - \frac{4}{\pi}\sum_{n\ \text{odd}}\frac{\cos nx}{n^2}, \\[0.4em] \operatorname{sgn} x &\sim \frac{4}{\pi}\sum_{n\ \text{odd}}\frac{\sin nx}{n}, \end{aligned}

on (−π,π)(-\pi, \pi), and the second series, the square-wave series, is exactly the termwise derivative of the first.

Check yourself

  1. Let ff have period 2π2\pi, with f(x)=0f(x) = 0 for −π<x<0-\pi < x < 0 and f(x)=xf(x) = x for 0≤x<π0 \le x < \pi. To what value does its Fourier series converge at x=0x = 0, x=π/2x = \pi/2, x=πx = \pi and x=−πx = -\pi?
Show the answer

The function is piecewise smooth, so the series converges everywhere to the average of the one-sided limits. At x=0x = 0 both limits are 00, so the sum is 00. At x=π/2x = \pi/2 the function is continuous and the sum is π/2\pi/2. At x=πx = \pi the left limit is π\pi, and by periodicity the right limit is the limit of ff as x→−π+x \to -\pi^+, which is 00. The sum there is π/2\pi/2, and by periodicity it is also π/2\pi/2 at x=−πx = -\pi. No value assigned to ff at ±π\pm\pi changes these answers.

  1. Find the half-range cosine series of f(x)=xf(x) = x on (0,π)(0, \pi). Give the sums of the half-range sine and cosine series of this function at x=0x = 0 and at x=πx = \pi, and use the cosine series at x=0x = 0 to find the sum of 1/n21/n^2 over the odd nn.
Show the answer

The coefficients are a0=2π∫0πx dx=πa_0 = \frac{2}{\pi}\int_0^{\pi} x\,dx = \pi and, after integrating by parts, an=2((−1)n−1)/(πn2)a_n = 2\bigl((-1)^n - 1\bigr)/(\pi n^2) for n≥1n \ge 1, which is −4/(πn2)-4/(\pi n^2) for odd nn and 00 for even nn. So

x∼π2−4π∑n oddcos⁡nxn2x \sim \frac{\pi}{2} - \frac{4}{\pi}\sum_{n\ \text{odd}}\frac{\cos nx}{n^2}

on [0,π][0, \pi]. The even extension is the triangle wave, which is continuous, so the cosine series sums to f(0+)=0f(0^+) = 0 at x=0x = 0 and to f(π−)=πf(\pi^-) = \pi at x=πx = \pi. The sine series is the sawtooth series, whose terms all vanish at 00 and at π\pi, so it sums to 00 at both ends. At π\pi that is the midpoint of the sawtooth’s jump from π\pi to −π-\pi. Setting x=0x = 0 in the cosine series gives 0=π2−4π∑n odd1n20 = \frac{\pi}{2} - \frac{4}{\pi}\sum_{n\ \text{odd}} \frac{1}{n^2}, so the sum of 1/n21/n^2 over odd nn is π2/8\pi^2/8.

  1. To get a series for f′(x)=1f'(x) = 1 on (0,π)(0, \pi), one student differentiates the half-range sine series of f(x)=xf(x) = x term by term, and another differentiates its half-range cosine series. Which result is valid, and why?
Show the answer

The sine series is the Fourier series of the odd extension, the sawtooth, whose periodic extension jumps at the odd multiples of π\pi. Its termwise derivative ∑2(−1)n+1cos⁡nx\sum 2(-1)^{n+1}\cos nx has terms that do not tend to zero, so it diverges. The cosine series is the Fourier series of the triangle wave, which is continuous and has the piecewise smooth square wave as its derivative, so termwise differentiation is valid. The derivative of −4π⋅cos⁡nxn2-\frac{4}{\pi}\cdot\frac{\cos nx}{n^2} is 4π⋅sin⁡nxn\frac{4}{\pi}\cdot\frac{\sin nx}{n}, which gives

4π∑n oddsin⁡nxn.\frac{4}{\pi}\sum_{n\ \text{odd}}\frac{\sin nx}{n}.

This converges to 11 for 0<x<π0 < x < \pi and to 00 at x=0x = 0 and x=πx = \pi, the jump averages of the square wave. It is the half-range sine series of the constant 11.

How this lesson connects