The Gibbs’ Phenomenon

Eli Dean & Britton Girard

Math 572, Fall 2013

December 4, 2013 1. Introduction 1

 π  Z X inx X 1 −inx inx SN f(x) := fb(n)e := f(x)e dx e 2π  |n|≤N |n|≤N −π denotes the partial Fourier sum for f at the point x

Can use Fourier Sums to approximate f : T → R under the appropriate conditions 1. Introduction 2

Defn: Pointwise Convergence of Functions:

A of functions {fn}n∈N converges pointwise to f on the set D if ∀ > 0 and ∀x ∈ D, ∃N ∈ N such that |fn(x) − f(x)| < ∀n ≥ N.

Defn: of Functions:

A series of functions {fn}n∈N converges uniformly to f on the set D if ∀ > 0, ∃N ∈ N such that |fn(x) − f(x)| < ∀n ≥ N and ∀x ∈ D.

1.5

1 0.8

0.6 0.5

0.4 0

0.2 −0.5

0

−1

−0.2

−1.5 −4 −3 −2 −1 0 1 2 3 4 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 Figure : Pointwise Conv. Figure : Uniform Conv. Persistent “bump” in second illustrates Gibbs’ Phenomenon.

1. Introduction 3

Some movies to illustrate the difference. (First Uniform then Pointwise) 1. Introduction 3

Some movies to illustrate the difference. (First Uniform then Pointwise)

Persistent “bump” in second illustrates Gibbs’ Phenomenon. 2. Gibbs’ Phenomenon: A Brief History 1

Basic Background

1848: Property of overshooting discovered by Wilbraham

1899: Gibbs brings attention to behavior of (Gibbs observed same behavior as Wilbraham but by studying a different function)

1906: Maxime Brocher shows that the phenomenon occurs for general Fourier Series around a jump discontinuity 2. Gibbs’ Phenomenon: A Brief History 2

Key Players and Contributions

Lord Kelvin: Constructed two machines while studying tide heights as a function of time, h(t). Machine capable of computing h(t) using Fourier Coefficients Constructed a “Harmonic Analyzer” capable of computing Fourier coefficients of past tide height functions, h(t).

A. A. Michelson: Elaborated on Kelvin’s device and constructed a machine “which would save considerable time and labour involved in calculations. . . of the resultant of a large number of simple harmonic motions.” Using first 80 coefficients of sawtooth wave, Michelson’s machine closely approximated the sawtooth function except for two blips near the points of discontinuity 2. Gibbs’ Phenomenon: A Brief History 3

Key Players and Contributions Cont.

Wilbraham 1848: Wilbraham investigated the equation:

cos(3x) cos(5x) cos((2n − 1)x) y = cos(x) + + + ... + + ... 3 5 2n − 1

π Discovered that “at a distance of 4 alternately above and below it, joined by perpendiculars which are themselves part of the locus” the

equation overshoots π by a distance of: 1 R ∞ sin(x) dx 4 2 π x Also suggested that similar analysis of  sin(2x) sin(3x) n+1 sin(nx)  y = 2 sin(x) − 2 + 3 − ... + (−1) n (An equation explored later on) would lead to an analogous result These discoveries gained little attention at the time 2. Gibbs’ Phenomenon: A Brief History 4

Key Players and Contributions Cont.

J. Willard Gibbs 1898: Published and article in Nature investigating the behavior of the function given by:

 sin(2x) sin(3x) sin(nx) y = 2 sin(x) − + − ... + (−1)n+1 2 3 n

Gibbs observed in this first article that the limiting behavior of the function (sawtooth) had “vertical portions, which are bisected the axis of X, [extending] beyond the points where they meet the inclined portions, their total lengths being express by four times the definite π Z sin(u) integral du.” u 0 2. Gibbs’ Phenomenon: A Brief History 5

Key Players and Contributions Cont.

Brocher 1906: In an article in Annals of , Brocher demonstrated that Gibbs’ Phenomenon will be observed in any Fourier Series of a function f with a jump discontinuity saying that the limiting curve of the approximating curves has a vertical line that “has to be produced beyond these points by an amount that bears a devinite ratio to the magnitude of the jump.” Before Brocher, Gibbs’ Phenomenon had only been observed in specific series without any generalization of the concept 3. Gibbs’ Phenomenon: An Example 1

Consider the function given by:

 −1 if − π ≤ x < 0 g(x) := 1 if 0 ≤ x < π

Goal: Analytically prove that Gibbs’ Phenomenon occurs at jump discontinuities of this 2π-periodic function 3. Gibbs’ Phenomenon: An Example 2

π Z 1 −inx Using the definition an := 2π f(x)e dx, basic Calculus yields −π

N X 1 X  2  einθ S f(x) = a einθ = N n π n i n=−N |n|≤N n is odd M 4 X sin((2m − 1)θ) = π 2m − 1 m=1 where M is the largest integer such that 2M − 1 ≤ N. 3. Gibbs’ Phenomenon: An Example 3

Here we notice that sin((2m − 1)θ) Z x = cos((2m − 1)θ) dθ 2m − 1 0 which yields the following identity:

M 4 X sin((2m − 1)x) S g(x) = 2M−1 π 2m − 1 m=1 M 4 X Z x = cos((2m − 1)θ) dθ π m=1 0 M 4 Z x X = cos((2m − 1)θ) dθ π 0 m=1 3. Gibbs’ Phenomenon: An Example 4

Now using the identity

M X sin(2Mx) cos((2m − 1)x) = 2 sin(x) m=1 we get the following:

M 4 Z x X S g(x) = cos((2m − 1)θ) dθ 2M−1 π 0 m=1 4 Z x sin(2Mθ) = dθ π 0 2 sin(θ) 3. Gibbs’ Phenomenon: An Example 5

At this point, using basic analysis of the derivative of S2M−1g(x), we see that there are local maximum and minimum values at π π x = and x = − M,+ 2M M,− 2M Here, using the substitution u = 2Mθ and the fact that for u ≈ 0, sin(u) ≈ u, we get that for large M 2 Z π sin(θ) S2M−1g(xm,+) ≈ dθ π 0 θ and 2 Z π sin(θ) S2M−1g(xm,−) ≈ − dθ π 0 θ π Z sin(θ) Further, the value 2 dθ ≈ 1.17898. Have shown that π θ 0 ∀M >> 1,M ∈ N, ∃x = xM,+ such that S2M−1g(xm,+) ≈ 1.17898. π ⇒ is always a “blip” near the jump discontinuity, namely at x = 2M , where the value S2M−1g(x) is not near 1! We can also see the same behavior in the 2π-periodic sawtooth function given by f(x) = x on the interval [−π, π).

3. Gibbs’ Phenomenon: An Example 6

Have shown analytically that a “blip” persists for all S2M−1g near the jump discontinuity.

Demonstrated again by square wave 3. Gibbs’ Phenomenon: An Example 6

Have shown analytically that a “blip” persists for all S2M−1g near the jump discontinuity.

Demonstrated again by square wave

We can also see the same behavior in the 2π-periodic sawtooth function given by f(x) = x on the interval [−π, π). 3. Gibbs’ Phenomenon: An Example 7

For both of the square wave and sawtooth functions, we have shown that a “blip” of constant size persists

⇒ while SM g → g pointwise, we now know that SM g 6→ g uniformly since for small enough neighborhoods, the “blip” is always outside the boundaries. (revisit square wave animation) X inθ Dirichlet: DN (θ) = e |n|≤N π π Z Z X inθ ⇒ DN (θ) dθ = e dθ −π |n|≤N−π Fej´er: FN (θ) = [D0(θ) + D1(θ) + ... + DN−1(θ)]/N Recall: Dirichlet Kernel is NOT a good kernel and Fej´erKernel is.

4. Gibbs’ Phenomenon: General Principles 1 Kernels And Kernels: n Def : (Good Kernel) A family {Kn}n∈N real-valued integrable functions on the circle is a family of good kernels if the following hold:

π Z 1 (i) ∀n ∈ N, 2π Kn(θ) dθ = 1. −π π Z (ii) ∃M > 0 such that ∀n ∈ N, |Kn(θ)| dθ ≤ M. −π Z (iii) ∀δ > 0, |Kn(θ)| dθ → 0 as n → ∞.

δ≤|θ|<π π π Z Z X inθ ⇒ DN (θ) dθ = e dθ −π |n|≤N−π Fej´er: FN (θ) = [D0(θ) + D1(θ) + ... + DN−1(θ)]/N Recall: Dirichlet Kernel is NOT a good kernel and Fej´erKernel is.

4. Gibbs’ Phenomenon: General Principles 1 Kernels And Convolutions Kernels: n Def : (Good Kernel) A family {Kn}n∈N real-valued integrable functions on the circle is a family of good kernels if the following hold:

π Z 1 (i) ∀n ∈ N, 2π Kn(θ) dθ = 1. −π π Z (ii) ∃M > 0 such that ∀n ∈ N, |Kn(θ)| dθ ≤ M. −π Z (iii) ∀δ > 0, |Kn(θ)| dθ → 0 as n → ∞.

δ≤|θ|<π X inθ Dirichlet: DN (θ) = e |n|≤N Fej´er: FN (θ) = [D0(θ) + D1(θ) + ... + DN−1(θ)]/N Recall: Dirichlet Kernel is NOT a good kernel and Fej´erKernel is.

4. Gibbs’ Phenomenon: General Principles 1 Kernels And Convolutions Kernels: n Def : (Good Kernel) A family {Kn}n∈N real-valued integrable functions on the circle is a family of good kernels if the following hold:

π Z 1 (i) ∀n ∈ N, 2π Kn(θ) dθ = 1. −π π Z (ii) ∃M > 0 such that ∀n ∈ N, |Kn(θ)| dθ ≤ M. −π Z (iii) ∀δ > 0, |Kn(θ)| dθ → 0 as n → ∞.

δ≤|θ|<π X inθ Dirichlet: DN (θ) = e |n|≤N π π Z Z X inθ ⇒ DN (θ) dθ = e dθ −π |n|≤N−π Recall: Dirichlet Kernel is NOT a good kernel and Fej´erKernel is.

4. Gibbs’ Phenomenon: General Principles 1 Kernels And Convolutions Kernels: n Def : (Good Kernel) A family {Kn}n∈N real-valued integrable functions on the circle is a family of good kernels if the following hold:

π Z 1 (i) ∀n ∈ N, 2π Kn(θ) dθ = 1. −π π Z (ii) ∃M > 0 such that ∀n ∈ N, |Kn(θ)| dθ ≤ M. −π Z (iii) ∀δ > 0, |Kn(θ)| dθ → 0 as n → ∞.

δ≤|θ|<π X inθ Dirichlet: DN (θ) = e |n|≤N π π Z Z X inθ ⇒ DN (θ) dθ = e dθ −π |n|≤N−π Fej´er: FN (θ) = [D0(θ) + D1(θ) + ... + DN−1(θ)]/N 4. Gibbs’ Phenomenon: General Principles 1 Kernels And Convolutions Kernels: n Def : (Good Kernel) A family {Kn}n∈N real-valued integrable functions on the circle is a family of good kernels if the following hold:

π Z 1 (i) ∀n ∈ N, 2π Kn(θ) dθ = 1. −π π Z (ii) ∃M > 0 such that ∀n ∈ N, |Kn(θ)| dθ ≤ M. −π Z (iii) ∀δ > 0, |Kn(θ)| dθ → 0 as n → ∞.

δ≤|θ|<π X inθ Dirichlet: DN (θ) = e |n|≤N π π Z Z X inθ ⇒ DN (θ) dθ = e dθ −π |n|≤N−π Fej´er: FN (θ) = [D0(θ) + D1(θ) + ... + DN−1(θ)]/N Recall: Dirichlet Kernel is NOT a good kernel and Fej´erKernel is. ⇒ SM f = (DM ∗ f)(θ)

n Def : σM f(θ) := [S0f(θ) + S1f(θ) + ... + SM−1f(θ)]/M

From a previous homework, we also know that FM ∗ f = σM f ⇒ FM ∗ f is of sort an averaging of the Dirichlet kernels, or more importantly, the partial Fourier sums.

4. Gibbs’ Phenomenon: General Principles 2

Kernels And Convolutions Cont. : Defn: The convolution of two functions, f and g is given by:

π 1 Z (f ∗ g)(θ) = f(y)g(θ − y) dy (1) 2π −π n Def : σM f(θ) := [S0f(θ) + S1f(θ) + ... + SM−1f(θ)]/M

From a previous homework, we also know that FM ∗ f = σM f ⇒ FM ∗ f is of sort an averaging of the Dirichlet kernels, or more importantly, the partial Fourier sums.

4. Gibbs’ Phenomenon: General Principles 2

Kernels And Convolutions Cont. Convolution: Defn: The convolution of two functions, f and g is given by:

π 1 Z (f ∗ g)(θ) = f(y)g(θ − y) dy (1) 2π −π

⇒ SM f = (DM ∗ f)(θ) From a previous homework, we also know that FM ∗ f = σM f ⇒ FM ∗ f is of sort an averaging of the Dirichlet kernels, or more importantly, the partial Fourier sums.

4. Gibbs’ Phenomenon: General Principles 2

Kernels And Convolutions Cont. Convolution: Defn: The convolution of two functions, f and g is given by:

π 1 Z (f ∗ g)(θ) = f(y)g(θ − y) dy (1) 2π −π

⇒ SM f = (DM ∗ f)(θ)

n Def : σM f(θ) := [S0f(θ) + S1f(θ) + ... + SM−1f(θ)]/M ⇒ FM ∗ f is of sort an averaging of the Dirichlet kernels, or more importantly, the partial Fourier sums.

4. Gibbs’ Phenomenon: General Principles 2

Kernels And Convolutions Cont. Convolution: Defn: The convolution of two functions, f and g is given by:

π 1 Z (f ∗ g)(θ) = f(y)g(θ − y) dy (1) 2π −π

⇒ SM f = (DM ∗ f)(θ)

n Def : σM f(θ) := [S0f(θ) + S1f(θ) + ... + SM−1f(θ)]/M

From a previous homework, we also know that FM ∗ f = σM f 4. Gibbs’ Phenomenon: General Principles 2

Kernels And Convolutions Cont. Convolution: Defn: The convolution of two functions, f and g is given by:

π 1 Z (f ∗ g)(θ) = f(y)g(θ − y) dy (1) 2π −π

⇒ SM f = (DM ∗ f)(θ)

n Def : σM f(θ) := [S0f(θ) + S1f(θ) + ... + SM−1f(θ)]/M

From a previous homework, we also know that FM ∗ f = σM f ⇒ FM ∗ f is of sort an averaging of the Dirichlet kernels, or more importantly, the partial Fourier sums. 4. Gibbs’ Phenomenon: General Principles 3

The Problem is Quite General Brocher showed Gibbs’ Phenomenon occurs with any 2π-periodic piecewise- with a jump discontinuity is proportional to height of jump: Square Wave: Overshoot ≈ 0.17898 ⇒ 0.17898 = k(2) ⇒ k = 0.08949 + − ⇒ Overshoot/Undershoot given by ≈ 0.08949(f(xd ) − f(xd ) where xd is point of discontinuity Suggests an overshoot of ≈ 0.08949(2π) ≈ 0.56228 for a maximum height of ≈ 3.70228 Thus, need a way to resolve this for modeling of periodic phenomena to be practical Using Fej´erKernel averages Dirichlet kernels and could therefore be a way of eliminating this phenomenon animation experiment 5. Conclusion 1

Gibbs’ Phenomenon observed in all 2π-periodic functions with a jump discontinuity

In some cases, it is quite basic to show it’s persistence analytically

Causes nastiness in approximations of functions by Fourier series, but is easily remedied with averaging using Fej´erKernel