Fourier's audacious claim
In 1807 Joseph Fourier told the Paris Academy that the temperature in a heated bar could be computed by writing any initial temperature profile as a sum of sines and cosines, each of which evolves independently: simply decays like under the heat equation. Lagrange objected that a discontinuous function could not possibly be a sum of smooth waves. Both were partly right, and settling the dispute took a century: Dirichlet's convergence theorem (1829), Riemann's integral (1854), Cantor's set theory (born from the study of sets where trigonometric series may misbehave), and Lebesgue's integral and the Riesz–Fischer theorem (1902–1907) all came out of it.
Today Fourier analysis is everywhere: it diagonalises every translation-invariant linear operation (differential operators, filters, convolutions), it is how MRI scanners and phone networks work, it proves theorems about primes, and its uncertainty principle is a law of physics. Harmonic analysis is the general theory: decompose functions on a group into characters, and study how size, smoothness and localisation on one side are reflected on the other.
Characters diagonalise translation
Why exponentials? Translation acts on functions, and is an eigenvector of every translation at once: . So any operator that commutes with translations — differentiation, the heat flow, convolution with a fixed kernel — is diagonal in the basis of exponentials. Differentiation becomes multiplication by ; convolution becomes multiplication of coefficients.
Three dictionaries follow, and recur throughout the subject:
- Smoothness ↔ decay. If has integrable derivatives, ; jumps produce decay and the slow, oscillating convergence of the Gibbs phenomenon.
- Convolution ↔ multiplication. . Averaging a function against a peaked kernel smooths it, and on the Fourier side multiplies by a factor near at low frequencies.
- Localisation ↔ spread. A function concentrated near a point has a Fourier transform spread over many frequencies, and conversely. The Heisenberg inequality quantifies this, and the Gaussian is the perfect compromise.
The deep difficulties are about limits: in what sense does converge to ? In , always (a Hilbert space fact). Uniformly, after averaging (Fejér). Pointwise, the answer is subtle and was only settled in 1966.
Coefficients, transforms and kernels
Write for the circle, with functions on identified with -periodic functions on .
Definition— Fourier coefficients and partial sums
For and , the Fourier coefficient is , and the partial sums of the Fourier series are . The Cesàro (Fejér) means are .
Definition— convolution and approximate identities
On , ; on , . A family of kernels on is an approximate identity (a "good kernel") if
- for all ;
- for some and all ;
- for every , as .
Definition— Dirichlet and Fejér kernels
and . Then and .
Definition— Fourier transform and Schwartz space
For , the Fourier transform is . The Schwartz space consists of smooth with for all ; the Fourier transform maps to itself, and , .
With this normalisation of the transform no factors of appear in the inversion formula or in Plancherel's theorem. Other books use and put or elsewhere; always check the convention.
Worked examples
Example— The square wave and the Gibbs phenomenon
Let on . Since is odd, , which is for odd and for even . Pairing with ,
At , with , each term is , so is times a midpoint Riemann sum for :
The partial sums overshoot the value by about , which is of the jump , at points ever closer to the jump. The convergence is pointwise everywhere (to at the jump, the average of the one-sided limits) but not uniform near : the Gibbs phenomenon.
Example— The Fejér kernel is positive
Let . Expanding the square,
because the frequency occurs in exactly for , that is, times. Summing the geometric series, . Hence
The Dirichlet kernel, by contrast, oscillates in sign, and (the Lebesgue constants).
Example— The Gaussian is its own Fourier transform
Let and . Differentiating under the integral sign (justified by dominated convergence, with dominating function ) and integrating by parts,
So , and . Thus . By scaling, the transform of () is : a narrow Gaussian has a wide transform.
Example— Transforms that are not integrable
The indicator has transform , which is not in . So the Fourier transform does not map into , and the inversion formula needs care: it holds in the sense, or pointwise at points of continuity after Cesàro-type summation.
Fourier series: Fejér, Parseval and Riemann–Lebesgue
Theorem— Theorem (approximate identities)
If is an approximate identity and is continuous on , then uniformly. If , , then in .
Proof
By property 1, . Let . A continuous function on the compact space is uniformly continuous, so there is with whenever . Splitting the integral,
uniformly in , by property 2. By property 3 the last term is for large . For , the same argument applies to , which is continuous (approximate in by continuous functions) and enters via Minkowski's integral inequality.
∎
Theorem— Fejér's theorem (1900)
For every continuous on , uniformly. Consequently trigonometric polynomials are dense in and in , and a continuous (or integrable) function with all Fourier coefficients zero vanishes (almost everywhere).
Proof
We check that is an approximate identity. Each has (only the constant term survives), so ; since , also . For we have , so uniformly there. The previous theorem gives uniform convergence. The are trigonometric polynomials, so these are dense in , which is dense in . If all , every , so (in , for integrable ).
∎
Theorem— Parseval's theorem
The functions form an orthonormal basis of with . Hence for every , in and
Conversely (Riesz–Fischer) every square-summable sequence is the coefficient sequence of a unique .
Proof
Orthonormality is the computation , and . By Fejér's theorem their span is dense, so they form an orthonormal basis, and the theorem on orthonormal bases from functional analysis gives convergence and Parseval's identity. Riesz–Fischer is the surjectivity of the isometry , , which follows from completeness of .
∎
Applied to the square wave, Parseval gives , that is, , and hence .
Theorem— Riemann–Lebesgue lemma
If then as ; if then is continuous and as .
Proof
For this follows from Parseval: the terms of a convergent series tend to . In general, , and (even trigonometric polynomials) is dense in : given , choose a trigonometric polynomial with ; then once exceeds the degree of . On , use step functions, for which is explicit and ; continuity follows from dominated convergence.
∎
The Fourier transform on the line
Theorem— Fourier inversion and Plancherel for Schwartz functions
For : (i) for every ; (ii) . The Fourier transform extends uniquely from to a unitary operator on (Plancherel, 1910).
Proof
Multiplication formula. For , Fubini's theorem (the integrand is absolutely integrable on ) gives .
Inversion at . Take , whose transform is by the Gaussian example. The multiplication formula reads . As the left side tends to by dominated convergence ( is integrable). The family has integral , is positive, and concentrates at (), so — by the same argument as for approximate identities on — the right side tends to . Thus . Applying this to , whose transform is , gives (i).
Plancherel. Put . By (i), , so the multiplication formula gives . Finally is dense in , so the isometry extends uniquely to ; its range is closed and contains , hence is everything.
∎
Theorem— Poisson summation formula
For and every ,
Proof
Because and its derivatives decay faster than any power, converges uniformly with all derivatives, so is a smooth -periodic function. Its Fourier coefficients (on ) are
exchanging sum and integral by uniform convergence and using . Since decays rapidly, the Fourier series converges absolutely and uniformly; its Fejér means converge to the same limit, and by Fejér's theorem they converge to . So the series equals .
∎
Applied to , Poisson summation gives Jacobi's identity for . Riemann (1859) wrote and used Jacobi's identity to prove the functional equation of the zeta function: see analytic number theory.
Theorem— Heisenberg's uncertainty inequality
For ,
with equality exactly when with .
Proof
Integrating by parts (the boundary terms vanish for Schwartz functions),
By Cauchy–Schwarz the right side is at most . Since , Plancherel gives . Squaring yields the inequality. Equality in Cauchy–Schwarz forces for a constant , real and positive by the equality in the first step and integrability, so is a Gaussian; Gaussians do give equality.
∎
In quantum mechanics a particle's position density is and its momentum density is (in units with ); the theorem says the product of the standard deviations of position and momentum is at least . This is a theorem of Fourier analysis, applied to a physical model.
Pointwise convergence: the honest picture
Pointwise convergence of is delicate, because the Dirichlet kernel is not an approximate identity. What is known:
- Positive results for nice functions. If is piecewise , then everywhere (Dirichlet, 1829), uniformly on closed intervals avoiding jumps. If is Hölder continuous, or of bounded variation and continuous, uniformly (Dini–Lipschitz, Jordan).
- Continuity is not enough. du Bois-Reymond (1873) constructed a continuous function whose Fourier series diverges at a point. A quick existence proof: the functionals on the Banach space have norms , so by the uniform boundedness principle they cannot be pointwise bounded. Kahane and Katznelson (1966) showed that for every null set there is a continuous whose Fourier series diverges at every point of .
- is hopeless. Kolmogorov (1923) found whose Fourier series diverges almost everywhere, and (1926) one that diverges everywhere.
- is fine. Lusin conjectured (1915) and Carleson proved (1966) that the Fourier series of every converges to almost everywhere; Hunt (1968) extended this to , . The proof is among the hardest in classical analysis; it controls the maximal operator by decomposing time–frequency space into tiles.
- Averaging rescues everything. For , the Fejér means converge to in and almost everywhere (at every Lebesgue point), and uniformly for continuous .
So the right summary is not "Fourier series converge" but: in , always; after averaging, always; pointwise, almost everywhere exactly in the range , with the Gibbs overshoot near jumps never going away.
Harmonic analysis on groups
The three settings above are one theory. For a locally compact abelian group , a character is a continuous homomorphism ; the characters form the dual group , and the Fourier transform is with respect to Haar measure. Pontryagin duality (1934) says , and Plancherel holds: with suitably normalised Haar measures, is unitary from to .
| Fourier analysis | ||
|---|---|---|
| () | Fourier series | |
| Fourier series read backwards (discrete-time signals) | ||
| () | the Fourier transform | |
| the discrete Fourier transform, computed by the FFT |
Orthogonality of characters on is the geometric-series identity for an -th root of unity (formalised below). For compact non-abelian groups, characters are replaced by irreducible representations: the Peter–Weyl theorem (1927) decomposes into matrix coefficients, and for the rotation group acting on the sphere it yields spherical harmonics. Harmonic analysis on non-compact Lie groups such as was developed by Gelfand, Bargmann and above all Harish-Chandra, and leads to the theory of automorphic forms.
Fourier analysis in Lean and Mathlib
The finite model first: orthogonality of the characters of , proved from the geometric series.
/-- **Orthogonality of characters on `ℤ/N`.** If `z^N = 1` and `z ≠ 1`, then
`1 + z + ⋯ + z^{N-1} = 0`. Proof: `(∑ zᵏ)(z − 1) = z^N − 1 = 0` and `z − 1 ≠ 0`. With
`z = e^{2πi(m−n)/N}` this says the discrete exponentials are orthogonal — the finite model of
Fourier series and the basis of the fast Fourier transform. -/
theorem roots_of_unity_sum {z : ℂ} {N : ℕ} (hz : z ^ N = 1) (hz1 : z ≠ 1) :
∑ k ∈ Finset.range N, z ^ k = 0 := by
have h : (∑ k ∈ Finset.range N, z ^ k) * (z - 1) = 0 := by
rw [geom_sum_mul, hz, sub_self]
exact (mul_eq_zero.mp h).resolve_right (sub_ne_zero.mpr hz1)Mathlib works on AddCircle T with Haar measure normalised to total mass , so its coefficients are . The exponentials are orthonormal (and, by Stone–Weierstrass rather than Fejér, a Hilbert basis), and Parseval's identity holds:
/-- **The exponentials are orthonormal** in `L²` of the circle `ℝ/Tℤ` with normalised Haar
measure: `⟪eₘ, eₙ⟫ = δₘₙ` for `eₙ(x) = e^{2πinx/T}`. This is Mathlib's `orthonormal_fourier`;
`span_fourierLp_closure_eq_top` adds that their span is dense, so they form a Hilbert basis. -/
theorem orthonormal_exponentials (T : ℝ) [Fact (0 < T)] :
Orthonormal ℂ (fun n : ℤ => fourierLp (T := T) 2 n) :=
orthonormal_fourier/-- **Parseval's identity.** For `f ∈ L²(ℝ/Tℤ)`, `∑ₙ |f̂(n)|² = ∫ |f|²` (normalised measure).
This is Mathlib's `hasSum_sq_fourierCoeff`, a consequence of the exponentials forming a Hilbert
basis. -/
theorem parseval (T : ℝ) [Fact (0 < T)] (f : Lp ℂ 2 (@AddCircle.haarAddCircle T _)) :
HasSum (fun n : ℤ => ‖fourierCoeff f n‖ ^ 2)
(∫ t : AddCircle T, ‖f t‖ ^ 2 ∂AddCircle.haarAddCircle) :=
hasSum_sq_fourierCoeff fFrom Parseval we derive the Riemann–Lebesgue lemma for functions, exactly as in the proof above:
/-- **Riemann–Lebesgue lemma for `L²` functions on the circle**, from Parseval: the series
`∑ |f̂(n)|²` converges, so its terms tend to `0` (along the cofinite filter, i.e. as `|n| → ∞`),
and hence so do the coefficients `f̂(n) = √(|f̂(n)|²)`. -/
theorem fourier_coeff_tendsto_zero (T : ℝ) [Fact (0 < T)]
(f : Lp ℂ 2 (@AddCircle.haarAddCircle T _)) :
Tendsto (fun n : ℤ => fourierCoeff f n) cofinite (𝓝 0) := by
have hsq : Tendsto (fun n : ℤ => ‖fourierCoeff f n‖ ^ 2) cofinite (𝓝 0) :=
(parseval T f).summable.tendsto_cofinite_zero
have hnorm : Tendsto (fun n : ℤ => ‖fourierCoeff f n‖) cofinite (𝓝 0) := by
have h := (Real.continuous_sqrt.tendsto 0).comp hsq
rw [Real.sqrt_zero] at h
refine h.congr fun n => ?_
simp only [Function.comp_apply, Real.sqrt_sq (norm_nonneg _)]
exact tendsto_zero_iff_norm_tendsto_zero.mpr hnormOn , Mathlib writes 𝐞 t for and 𝓕 for the transform , the convention of this lesson. The trivial bound , proved directly; the Riemann–Lebesgue lemma; Plancherel on ; and the self-dual Gaussian:
/-- **The Fourier transform is bounded from `L¹` to `L^∞`:** `|f̂(ξ)| ≤ ∫ |f|` for every `ξ`,
because `|∫ g| ≤ ∫ |g|` and the character `e^{−2πixξ}` has modulus `1`. (For non-integrable `f`
both sides are `0` under Lean's convention for the Bochner integral.) -/
theorem fourier_bound (f : ℝ → ℂ) (ξ : ℝ) :
‖∫ x : ℝ, 𝐞 (-(ξ * x)) • f x‖ ≤ ∫ x : ℝ, ‖f x‖ := by
calc ‖∫ x : ℝ, 𝐞 (-(ξ * x)) • f x‖ ≤ ∫ x : ℝ, ‖𝐞 (-(ξ * x)) • f x‖ :=
norm_integral_le_integral_norm _
_ = ∫ x : ℝ, ‖f x‖ := by
congr 1
ext x
simp/-- **Riemann–Lebesgue lemma** on `ℝ`: for integrable `f`, `f̂(ξ) = ∫ e^{−2πixξ} f(x) dx → 0`
as `|ξ| → ∞`. This applies Mathlib's `tendsto_integral_exp_inner_smul_cocompact` (stated on any
finite-dimensional real inner product space; for `ℝ` the cocompact filter is `|ξ| → ∞`). -/
theorem riemann_lebesgue (f : ℝ → ℂ) :
Tendsto (fun ξ : ℝ => ∫ x : ℝ, 𝐞 (-(ξ * x)) • f x) (cocompact ℝ) (𝓝 0) := by
simpa using tendsto_integral_exp_inner_smul_cocompact f/-- **Plancherel's theorem.** The Fourier transform, defined on `L¹ ∩ L²` and extended by
continuity, is an isometry of `L²(ℝ)`: `‖𝓕 f‖₂ = ‖f‖₂` (indeed a unitary map, with inverse the
conjugate transform). This is Mathlib's `MeasureTheory.Lp.norm_fourier_eq`. -/
theorem plancherel (f : Lp (α := ℝ) ℂ 2) : ‖𝓕 f‖ = ‖f‖ :=
Lp.norm_fourier_eq f/-- **The Gaussian `e^{−πx²}` is its own Fourier transform**, with the normalisation
`f̂(ξ) = ∫ f(x) e^{−2πixξ} dx`. Obtained from Mathlib's `fourier_gaussian_pi`, which computes the
transform of `e^{−πbx²}` for `Re b > 0`, by setting `b = 1` and simplifying `1/1^{1/2} = 1`. -/
theorem gaussian_self_dual :
(𝓕 fun x : ℝ => cexp (-π * x ^ 2)) = fun ξ : ℝ => cexp (-π * ξ ^ 2) := by
have h := fourier_gaussian_pi (b := 1) (by simp)
simpa using hPoisson summation for Schwartz functions, the theta functional equation that Riemann used, and , which Mathlib proves with Fourier series of Bernoulli polynomials:
/-- **Poisson summation formula.** For a Schwartz function `f` on `ℝ`,
`∑ₙ f(x + n) = ∑ₖ f̂(k) e^{2πikx}`; at `x = 0`, `∑ f(n) = ∑ f̂(k)`. The left side is a
`1`-periodic function whose Fourier coefficients are the `f̂(k)`. This is Mathlib's
`SchwartzMap.tsum_eq_tsum_fourier`. -/
theorem poisson_summation (f : SchwartzMap ℝ ℂ) (x : ℝ) :
∑' n : ℤ, f (x + n) = ∑' k : ℤ, 𝓕 f k * fourier k (x : UnitAddCircle) :=
SchwartzMap.tsum_eq_tsum_fourier f x/-- **Jacobi's theta functional equation** `θ(−1/τ) = (−iτ)^{1/2} θ(τ)` for
`θ(τ) = ∑ₙ e^{πin²τ}` on the upper half-plane — Poisson summation applied to a Gaussian. Riemann
derived the functional equation of `ζ(s)` from it. This is Mathlib's `jacobiTheta_S_smul`. -/
theorem theta_functional_equation (τ : UpperHalfPlane) :
jacobiTheta ↑(ModularGroup.S • τ) = (-I * τ) ^ (1 / 2 : ℂ) * jacobiTheta τ :=
jacobiTheta_S_smul τ/-- **`∑ 1/n² = π²/6`**, which Mathlib proves with Fourier series (Parseval applied to Bernoulli
polynomials). The `n = 0` term is `1/0 = 0` in Lean's conventions. This is Mathlib's
`hasSum_zeta_two`. -/
theorem basel : HasSum (fun n : ℕ => (1 : ℝ) / (n : ℝ) ^ 2) (π ^ 2 / 6) :=
hasSum_zeta_twoNot formalised (here or, as far as we know, in Mathlib): Fejér's theorem and approximate identities on the circle in this form (Mathlib has related results for convolutions with bump functions), the Gibbs phenomenon, the Heisenberg inequality, Carleson's theorem, and Pontryagin duality for general locally compact abelian groups (Mathlib has the Pontryagin dual group and duality for finite abelian groups).
Computing overshoots, averages and theta
The first experiment samples the partial sums of the square wave near the jump: the maximum stays at about for , matching , while the Fejér means never exceed . It also computes the exact error of from Parseval and watches approach .
"""Gibbs overshoot, Fejer's cure and Parseval, for the square wave.
The square wave f = sign(sin x) has Fourier series (4/pi) sum over odd k of
sin(k x)/k. Its partial sums S_N overshoot the jump at 0 by about 9% of the
jump however large N is (the Gibbs phenomenon, limit (2/pi) Si(pi)). The
Fejer means (averages of S_0, ..., S_N) never exceed 1, because the Fejer
kernel is a positive approximate identity. Parseval's identity gives the
exact L^2 error of S_N and the sum 1 + 1/9 + 1/25 + ... = pi^2/8.
"""
import math
import numpy as np
def partial_sum(n, x):
"""S_n(x) for the square wave: (4/pi) * sum of sin(kx)/k, odd k <= n."""
x = np.asarray(x, dtype=float)
total = np.zeros_like(x)
for k in range(1, n + 1, 2):
total += np.sin(k * x) / k
return 4 / math.pi * total
def fejer_mean(n, x):
"""sigma_n(x) = (S_0 + S_1 + ... + S_n)(x) / (n + 1)."""
x = np.asarray(x, dtype=float)
current = np.zeros_like(x)
total = np.zeros_like(x)
for m in range(n + 1):
if m % 2 == 1:
current = current + 4 / math.pi * np.sin(m * x) / m
total += current
return total / (n + 1)
def sine_integral(t, steps=2000):
"""Si(t) = integral of sin(u)/u from 0 to t, by Simpson's rule."""
if steps % 2:
steps += 1
h = t / steps
def g(u):
return 1.0 if u == 0 else math.sin(u) / u
s = g(0) + g(t)
s += sum((4 if i % 2 else 2) * g(i * h) for i in range(1, steps))
return s * h / 3
def l2_error_squared(n):
"""(1/pi) * integral of (f - S_n)^2 over (-pi, pi), by Parseval:
2 minus the sum of (4/(pi k))^2 over odd k <= n."""
return 2 - sum((4 / (math.pi * k)) ** 2 for k in range(1, n + 1, 2))
def odd_reciprocal_squares(n):
"""1 + 1/9 + 1/25 + ... over odd k <= n."""
return sum(1 / k ** 2 for k in range(1, n + 1, 2))
def main():
grid = np.linspace(1e-6, math.pi / 2, 20001)
gibbs = 2 / math.pi * sine_integral(math.pi)
print("Square wave sign(sin x): jump of size 2 at x = 0")
print(f"Gibbs limit (2/pi) Si(pi) = {gibbs:.6f}")
print(f"{'N':>5} {'max S_N':>10} {'overshoot/jump':>15} {'max Fejer':>10}")
for n in [9, 49, 199, 999]:
top = float(np.max(partial_sum(n, grid)))
fej = float(np.max(fejer_mean(n, grid)))
print(f"{n:>5} {top:>10.6f} {(top - 1) / 2:>15.4f} {fej:>10.6f}")
print("The overshoot does not shrink; it moves towards the jump.")
print("The Fejer means stay below sup |f| = 1 (positive kernel).")
print()
print("Parseval: L^2 error of S_N, and sum over odd k of 1/k^2")
for n in [1, 9, 99, 999]:
print(f" N = {n:>3}: error^2 = {l2_error_squared(n):.6f},"
f" partial sum = {odd_reciprocal_squares(n):.6f}")
print(f" pi^2/8 = {math.pi ** 2 / 8:.6f}")
print()
print("Epistemic status: numerical evidence. Maxima are sampled on a grid of")
print("20001 points and Si(pi) is computed by Simpson's rule; finitely many N")
print("are shown. That the overshoot tends to (2/pi) Si(pi) - 1 and that")
print("Fejer means of continuous functions converge uniformly are theorems")
print("proved in the lesson, not consequences of this table.")
if __name__ == "__main__":
main()The second checks Jacobi's identity to machine precision, and computes the uncertainty ratio for three functions with known transforms: for the Gaussian, for and for a tent.
"""Poisson summation for the Gaussian, and the uncertainty principle.
Poisson summation applied to exp(-pi t x^2) gives Jacobi's identity
theta(t) = t^(-1/2) theta(1/t) for theta(t) = sum over n of exp(-pi n^2 t).
We check it numerically for several t. Then we compute the Heisenberg
uncertainty ratio (int x^2 |f|^2)(int xi^2 |f^|^2) / (||f||^4 / 16 pi^2) for
three functions with known Fourier transforms: it equals 1 for the Gaussian
and exceeds 1 otherwise, as the uncertainty inequality predicts.
"""
import math
import numpy as np
def theta(t, terms=60):
"""theta(t) = sum over |n| <= terms of exp(-pi n^2 t), for t > 0."""
if t <= 0:
raise ValueError("t must be positive")
n = np.arange(-terms, terms + 1)
return float(np.sum(np.exp(-math.pi * n.astype(float) ** 2 * t)))
def trapezoid(values, grid):
"""Trapezoidal rule on a uniform grid."""
h = grid[1] - grid[0]
return float(h * (np.sum(values) - 0.5 * (values[0] + values[-1])))
#: Functions f with their Fourier transforms f^(xi) = int f(x) e^(-2 pi i x xi) dx.
EXAMPLES = {
"Gaussian exp(-pi x^2)": (
lambda x: np.exp(-math.pi * x ** 2),
lambda s: np.exp(-math.pi * s ** 2),
),
"exp(-|x|)": (
lambda x: np.exp(-np.abs(x)),
lambda s: 2 / (1 + 4 * math.pi ** 2 * s ** 2),
),
"tent max(1 - |x|, 0)": (
lambda x: np.maximum(1 - np.abs(x), 0),
lambda s: np.sinc(s) ** 2,
),
}
def uncertainty_ratio(f, fhat, half_width=400.0, points=400001):
"""(int x^2 f^2)(int xi^2 fhat^2) divided by ||f||_2^4 / (16 pi^2)."""
grid = np.linspace(-half_width, half_width, points)
fx, fs = f(grid), fhat(grid)
spread_x = trapezoid(grid ** 2 * fx ** 2, grid)
spread_s = trapezoid(grid ** 2 * fs ** 2, grid)
norm_sq = trapezoid(fx ** 2, grid)
return spread_x * spread_s / (norm_sq ** 2 / (16 * math.pi ** 2))
def main():
print("Jacobi: theta(t) = t^(-1/2) theta(1/t), theta(t) = sum exp(-pi n^2 t)")
for t in [0.1, 0.5, 1.0, 2.0, 7.0]:
lhs, rhs = theta(t), theta(1 / t) / math.sqrt(t)
print(f" t = {t:>4}: {lhs:.15f} {rhs:.15f} diff {abs(lhs - rhs):.1e}")
print(" (at t = 0.1 the left side needs many terms; the right side, few)")
print()
print("Uncertainty: (int x^2|f|^2)(int xi^2|f^|^2) >= ||f||^4 / (16 pi^2)")
for name, (f, fhat) in EXAMPLES.items():
print(f" {name:<22} ratio = {uncertainty_ratio(f, fhat):.4f}")
print(" Exact values: 1, 2 and 6/5. Equality holds only for Gaussians.")
print()
print("Epistemic status: numerical. Jacobi's identity is a theorem (Poisson")
print("summation); here it is confirmed to about 1e-15 for five values of t.")
print("The ratios are trapezoidal approximations on [-400, 400] (slowly")
print("decaying transforms lose a little mass, about 1e-3); the inequality")
print("itself, ratio >= 1, is proved in the lesson.")
if __name__ == "__main__":
main()These are numerical confirmations of theorems proved above, on finitely many cases; they cannot replace the proofs, but they make the constants concrete.
Explore: partial sums and kernels
Build the square wave from sines and watch the overshoot near the jump. Increase the number of terms: the bump gets narrower, but its height does not shrink.
Fourier series
Add sine waves one at a time to build a square, sawtooth or triangle wave.
- target wave f(x)
- partial sum with N terms
- highest peak of the partial sum
SN(x) = (4/π) NΣk=1 sin((2k − 1)x) / (2k − 1)
f(x) = 1 for 0 < x < π and −1 for −π < x < 0, repeating with period 2π.
Highest peak of the partial sum ≈ 1.1798: an overshoot of 0.1798, which is 9.0 % of the jump 2.
As N grows the overshoot does not shrink to 0: it tends to about 8.95 % of the jump, while the wiggle gets narrower and closer to the jump. This is the Gibbs phenomenon.
The kernels themselves explain the difference between partial sums and Fejér means. Move : the Dirichlet kernel (whose convolution gives ) has large negative lobes, while the Fejér kernel is positive and concentrates at — an approximate identity.
Dirichlet and Fejér kernels
Move the sliders and trace along the curves to read off values.
- Dirichlet D_N
- Fejér F_N
- Dirichlet D_N: y = 0.4487
- Fejér F_N: y = 0.0144
Exercises
1. Fourier and harmonic analysis
Warm-upHumanLet on . Compute , with .
2. Fourier and harmonic analysis
CoreHumanWhich property of an approximate identity does the Dirichlet kernel fail, and why does that matter?
3. Fourier and harmonic analysis
CoreHumanFor the square wave , what happens to as ?
4. Fourier and harmonic analysis
StretchHumanThe function has Fourier transform , and Poisson summation holds for it. What is ?
5. Fourier and harmonic analysis
CoreHumanIn the proof of the Heisenberg inequality we reach . Which result converts into a statement about ?
6. Fourier and harmonic analysis
Warm-upFormalWhich Lean statement correctly expresses the orthogonality of the characters of as "the sum of the powers of a non-trivial -th root of unity is "?
7. Fourier and harmonic analysis
CoreHumanLet . Which statements are always true? Select all that apply.
8. Fourier and harmonic analysis
CoreComputationalWrite dft(a) returning the discrete Fourier transform , , of a list a of numbers (use cmath). The tests check Parseval's identity for : .
Common misconceptions
Misconception
"The Fourier series of a continuous function converges to it at every point." False: du Bois-Reymond's continuous function has a Fourier series diverging at a point, and for any null set there is a continuous function diverging on it. What is true: the Fejér means converge uniformly, the partial sums converge in and (Carleson) almost everywhere, and for Hölder continuous functions the partial sums converge uniformly.
Misconception
"With enough terms the Gibbs overshoot disappears." The overshoot of the partial sums near a jump tends to times half the jump — about of the jump — however many terms are taken; it only moves closer to the jump. This is compatible with convergence (the region of overshoot has shrinking width) and with pointwise convergence (each fixed is eventually outside it), but not with uniform convergence, which is impossible anyway since the limit is discontinuous.
Misconception
"The Fourier transform maps functions to functions." It maps to bounded continuous functions vanishing at infinity, but the transform of is . The spaces that are mapped to themselves are (Plancherel) and ; on for the transform maps into (Hausdorff–Young).
Misconception
" convergence implies pointwise convergence." convergence says nothing about any particular point; Carleson's theorem, which gives a.e. convergence of for , is a deep separate theorem, and it would fail for an arbitrary rearrangement or for general orthonormal bases.
Many ways of seeing
Algebra— Characters, representations and the group algebra
For a finite abelian group , the characters form a basis of the space of functions on that simultaneously diagonalises all translation operators, and the Fourier transform is the isomorphism of algebras from to : convolution becomes pointwise multiplication. For non-abelian finite groups, Wedderburn's theorem gives over the irreducible representations, the non-commutative Fourier transform of representation theory. Pontryagin duality is the topological version: is a contravariant self-equivalence of the category of locally compact abelian groups, exchanging compact and discrete groups () and fixing and .
Number theory— Theta, zeta and equidistribution
Poisson summation is a bridge between a lattice and its dual. Applied to Gaussians it gives Jacobi's theta identity and hence Riemann's functional equation for ; in Tate's thesis (1950), Fourier analysis on the adeles , a self-dual locally compact ring, proves the functional equations of all Hecke -functions at once. Weyl's criterion (1916) turns equidistribution into Fourier analysis: a sequence is equidistributed modulo iff for every ; for with irrational this is a geometric series, a fact developed in ergodic theory. The Hardy–Littlewood circle method writes the number of representations of as a sum of primes or powers as a Fourier coefficient and estimates it by splitting the circle into major and minor arcs.
Geometry— Hearing the shape of a drum
On a compact Riemannian manifold the Laplacian has an orthonormal basis of eigenfunctions , — Fourier series are the case of the circle, and spherical harmonics the case of the sphere. Spectral geometry asks what the spectrum knows about the geometry. Weyl's law (1911) recovers the volume: the number of grows like . Kac asked (1966) whether one can "hear the shape of a drum"; Milnor (1964) had already found two non-isometric 16-dimensional flat tori with the same spectrum — Poisson summation relates the Laplace spectrum of a flat torus to the lengths of vectors in — and Gordon, Webb and Wolpert (1992) found isospectral non-congruent planar drums.
Probability— Characteristic functions
The Fourier transform of a probability distribution is its characteristic function . Independence becomes multiplication, , because the law of is the convolution of the laws. Lévy's continuity theorem says that convergence in distribution is equivalent to pointwise convergence of characteristic functions, and the central limit theorem becomes the computation — the Gaussian, the fixed point of the Fourier transform, appears as the universal limit. Bochner's theorem characterises characteristic functions as the continuous positive-definite functions with . See measure-theoretic probability.
Physics— Waves, uncertainty and diffraction
Fourier's own application was heat flow, and every linear wave phenomenon is decomposed into frequencies: the overtones of a vibrating string are its Fourier modes, and the far-field diffraction pattern of light through an aperture is (up to scaling) the squared modulus of the Fourier transform of the aperture — X-ray crystallography reads off a crystal's lattice through Poisson summation. In quantum mechanics position and momentum representations of a state are Fourier transforms of each other, and the Heisenberg relation is the theorem proved above, applied to the model; see quantum mechanics. The physics motivated the mathematics, but the inequality is a theorem about functions, with no physical assumptions.
Computation— The fast Fourier transform
The discrete Fourier transform of a vector of length costs operations naively. Cooley and Tukey (1965) rediscovered a divide-and-conquer algorithm — known to Gauss around 1805 — that factors the DFT for into stages of butterflies, costing . It made digital signal processing, spectral methods for PDEs, fast multiplication of large integers (Schönhage–Strassen, and Harvey–van der Hoeven's algorithm of 2019) and modern imaging possible. Mathematically the FFT is the factorisation of the character table of along the chain of subgroups .
History and context
- In the 1750s Daniel Bernoulli, Jean d'Alembert and Leonhard Euler argued over whether the vibrating string could be represented by trigonometric series. Joseph Fourier (1807; Théorie analytique de la chaleur, 1822) asserted that arbitrary functions could, and computed the coefficients.
- Peter Gustav Lejeune Dirichlet (1829) gave the first rigorous convergence theorem; Bernhard Riemann (1854) defined his integral to study trigonometric series and proved the Riemann–Lebesgue lemma for his integral; Georg Cantor (1870s) studied sets of uniqueness for trigonometric series, which led him to infinite sets and ordinals; Paul du Bois-Reymond (1873) found a continuous function with a divergent Fourier series.
- Henry Wilbraham (1848) and J. Willard Gibbs (1899) described the overshoot; Lipót Fejér (1900, while still a student) proved Cesàro summability; Henri Lebesgue, Frigyes Riesz and Ernst Fischer gave the theory; Michel Plancherel (1910) the Fourier transform.
- Andrey Kolmogorov (1923, 1926) found divergent Fourier series; Norbert Wiener developed generalised harmonic analysis and Tauberian theorems (1930s); Lev Pontryagin (1934) and Egbert van Kampen proved duality for locally compact abelian groups, with André Weil placing Fourier analysis on general locally compact groups.
- Lennart Carleson (1966) proved almost-everywhere convergence for , and Richard Hunt (1968) for . The Calderón–Zygmund theory of singular integrals (Alberto Calderón and Antoni Zygmund, 1950s), Elias Stein's school, and Charles Fefferman's work shaped modern harmonic analysis; Harish-Chandra built harmonic analysis on semisimple Lie groups.
Further reading
- Elias M. Stein and Rami Shakarchi, Fourier Analysis: An Introduction (2003) — Fejér, Parseval, the transform on , Poisson summation, finite Fourier analysis; the proofs above follow its Chapters 2–5.
- Yitzhak Katznelson, An Introduction to Harmonic Analysis (1968; 3rd ed. 2004) — the classical theory on and , including divergence results.
- T. W. Körner, Fourier Analysis (1988) — a wide-ranging, historically rich tour of applications.
- Loukas Grafakos, Classical Fourier Analysis (2008; 3rd ed. 2014) — the graduate reference, including a proof of Carleson's theorem.
- Gerald B. Folland, A Course in Abstract Harmonic Analysis (1995) — Haar measure, Pontryagin duality and Peter–Weyl.
- Antoni Zygmund, Trigonometric Series (1935; 3rd ed. 2002) — the encyclopaedic classic.