Skip to content
The Lumenary
First-year graduateGraduate 150 min

Fourier and harmonic analysis

Every reasonable function is a superposition of pure frequencies — but "reasonable", "superposition" and "is" each hide a theorem, and the search for them created much of modern analysis.

Formally verified · 11 LeanComputationally tested · 2 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review
MotivationH

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: einxe^{inx} simply decays like e−n2te^{-n^2 t} 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.

IntuitionH

Characters diagonalise translation

Why exponentials? Translation τaf(x)=f(x−a)\tau_a f(x) = f(x - a) acts on functions, and einxe^{inx} is an eigenvector of every translation at once: τaeinx=e−inaeinx\tau_a e^{inx} = e^{-ina} e^{inx}. 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 inin; convolution becomes multiplication of coefficients.

Three dictionaries follow, and recur throughout the subject:

  • Smoothness ↔ decay. If ff has kk integrable derivatives, ∣f^(n)∣=O(∣n∣−k)|\hat f(n)| = O(|n|^{-k}); jumps produce 1/n1/n decay and the slow, oscillating convergence of the Gibbs phenomenon.
  • Convolution ↔ multiplication. f∗g^=f^ g^\widehat{f * g} = \hat f \, \hat g. Averaging a function against a peaked kernel smooths it, and on the Fourier side multiplies by a factor near 11 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 ∑f^(n)einx\sum \hat f(n) e^{inx} converge to ff? In L2L^2, always (a Hilbert space fact). Uniformly, after averaging (Fejér). Pointwise, the answer is subtle and was only settled in 1966.

DefinitionsH

Coefficients, transforms and kernels

Write T=R/2πZ\mathbb T = \R / 2\pi\Z for the circle, with functions on T\mathbb T identified with 2π2\pi-periodic functions on R\R.

Definition— Fourier coefficients and partial sums

For f∈L1(T)f \in L^1(\mathbb T) and n∈Zn \in \Z, the Fourier coefficient is f^(n)=12π∫−ππf(x)e−inx dx\hat f(n) = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) e^{-inx} \, dx, and the partial sums of the Fourier series are SNf(x)=∑∣n∣≤Nf^(n)einxS_N f(x) = \sum_{|n| \le N} \hat f(n) e^{inx}. The Cesàro (Fejér) means are σNf=1N∑n=0N−1Snf\sigma_N f = \frac1N \sum_{n=0}^{N-1} S_n f.

Definition— convolution and approximate identities

On T\mathbb T, (f∗g)(x)=12π∫−ππf(x−y)g(y) dy(f * g)(x) = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x - y) g(y) \, dy; on R\R, (f∗g)(x)=∫Rf(x−y)g(y) dy(f * g)(x) = \int_\R f(x - y) g(y) \, dy. A family of kernels (KN)(K_N) on T\mathbb T is an approximate identity (a "good kernel") if

  1. 12π∫−ππKN(x) dx=1\frac{1}{2\pi} \int_{-\pi}^{\pi} K_N(x) \, dx = 1 for all NN;
  2. 12π∫−ππ∣KN(x)∣ dx≤M\frac{1}{2\pi} \int_{-\pi}^{\pi} |K_N(x)| \, dx \le M for some MM and all NN;
  3. for every δ>0\delta > 0, ∫δ≤∣x∣≤π∣KN(x)∣ dx→0\int_{\delta \le |x| \le \pi} |K_N(x)| \, dx \to 0 as N→∞N \to \infty.

Definition— Dirichlet and Fejér kernels

DN(x)=∑∣n∣≤Neinx=sin⁡((N+12)x)sin⁡(x/2)D_N(x) = \sum_{|n| \le N} e^{inx} = \dfrac{\sin\big((N + \frac12)x\big)}{\sin(x/2)} and FN(x)=1N∑n=0N−1Dn(x)F_N(x) = \dfrac1N \sum_{n=0}^{N-1} D_n(x). Then SNf=f∗DNS_N f = f * D_N and σNf=f∗FN\sigma_N f = f * F_N.

Definition— Fourier transform and Schwartz space

For f∈L1(R)f \in L^1(\R), the Fourier transform is f^(ξ)=∫Rf(x)e−2πixξ dx\hat f(\xi) = \int_\R f(x) e^{-2\pi i x \xi} \, dx. The Schwartz space S(R)\mathcal S(\R) consists of smooth ff with sup⁡x∣xkf(m)(x)∣<∞\sup_x |x^k f^{(m)}(x)| < \infty for all k,m≥0k, m \ge 0; the Fourier transform maps S(R)\mathcal S(\R) to itself, and f′^(ξ)=2πiξf^(ξ)\widehat{f'}(\xi) = 2\pi i \xi \hat f(\xi), (−2πix)f^(ξ)=(f^)′(ξ)\widehat{(-2\pi i x) f}(\xi) = (\hat f)'(\xi).

With this normalisation of the transform no factors of 2π2\pi appear in the inversion formula f(x)=∫f^(ξ)e2πixξ dξf(x) = \int \hat f(\xi) e^{2\pi i x \xi} \, d\xi or in Plancherel's theorem. Other books use e−ixξe^{-ix\xi} and put 12π\frac{1}{2\pi} or 12π\frac{1}{\sqrt{2\pi}} elsewhere; always check the convention.

Worked examplesH

Worked examples

Example— The square wave and the Gibbs phenomenon

Let f=sign⁡(sin⁡x)f = \operatorname{sign}(\sin x) on T\mathbb T. Since ff is odd, f^(n)=12π∫−ππf(x)e−inx dx=−iπ∫0πsin⁡(nx) dx=−i (1−(−1)n)πn\hat f(n) = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x) e^{-inx} \, dx = \frac{-i}{\pi}\int_0^\pi \sin(nx)\,dx = \frac{-i\,(1 - (-1)^n)}{\pi n}, which is 2πin\frac{2}{\pi i n} for odd nn and 00 for even nn. Pairing nn with −n-n,

S2M−1f(x)=4π∑j=1Msin⁡((2j−1)x)2j−1.S_{2M-1} f(x) = \frac4\pi \sum_{j=1}^{M} \frac{\sin\big((2j - 1)x\big)}{2j - 1}.

At x=π/(2M)x = \pi/(2M), with tj=(2j−1)π/(2M)t_j = (2j-1)\pi/(2M), each term is 4πsin⁡tj2j−1=2π⋅πM⋅sin⁡tjtj\frac{4}{\pi} \frac{\sin t_j}{2j - 1} = \frac2\pi \cdot \frac{\pi}{M} \cdot \frac{\sin t_j}{t_j}, so S2M−1f(π/2M)S_{2M-1} f(\pi/2M) is 2π\frac2\pi times a midpoint Riemann sum for ∫0πsin⁡tt dt\int_0^\pi \frac{\sin t}{t} \, dt:

S2M−1f(π2M)⟶2πSi⁡(π)=1.17898…(M→∞).S_{2M-1} f\Big(\frac{\pi}{2M}\Big) \longrightarrow \frac2\pi \operatorname{Si}(\pi) = 1.17898\ldots \quad (M \to \infty).

The partial sums overshoot the value 11 by about 0.1790.179, which is 8.95%8.95\% of the jump 22, at points ever closer to the jump. The convergence is pointwise everywhere (to 00 at the jump, the average of the one-sided limits) but not uniform near 00: the Gibbs phenomenon.

Example— The Fejér kernel is positive

Let ω=eix\omega = e^{ix}. Expanding the square,

∣∑k=0N−1ωk∣2=∑k,l=0N−1ωk−l=∑∣j∣<N(N−∣j∣) ωj=∑n=0N−1Dn(x),\Big|\sum_{k=0}^{N-1} \omega^k\Big|^2 = \sum_{k, l = 0}^{N-1} \omega^{k - l} = \sum_{|j| < N} (N - |j|) \, \omega^j = \sum_{n=0}^{N-1} D_n(x),

because the frequency jj occurs in DnD_n exactly for n≥∣j∣n \ge |j|, that is, N−∣j∣N - |j| times. Summing the geometric series, ∣∑k<Nωk∣2=∣1−ωN∣2∣1−ω∣2=sin⁡2(Nx/2)sin⁡2(x/2)\big|\sum_{k < N} \omega^k\big|^2 = \frac{|1 - \omega^N|^2}{|1 - \omega|^2} = \frac{\sin^2(Nx/2)}{\sin^2(x/2)}. Hence

FN(x)=1N sin⁡2(Nx/2)sin⁡2(x/2)≥0.F_N(x) = \frac1N \, \frac{\sin^2(Nx/2)}{\sin^2(x/2)} \ge 0.

The Dirichlet kernel, by contrast, oscillates in sign, and 12π∫∣DN∣=4π2log⁡N+O(1)→∞\frac{1}{2\pi} \int |D_N| = \frac{4}{\pi^2} \log N + O(1) \to \infty (the Lebesgue constants).

Example— The Gaussian is its own Fourier transform

Let f(x)=e−πx2f(x) = e^{-\pi x^2} and F=f^F = \hat f. Differentiating under the integral sign (justified by dominated convergence, with dominating function 2π∣x∣e−πx22\pi|x| e^{-\pi x^2}) and integrating by parts,

F′(ξ)=∫e−πx2(−2πix)e−2πixξ dx=i∫(e−πx2)′e−2πixξ dx=−2πξ F(ξ).F'(\xi) = \int e^{-\pi x^2} (-2\pi i x) e^{-2\pi i x \xi} \, dx = i \int \big(e^{-\pi x^2}\big)' e^{-2\pi i x \xi} \, dx = -2\pi \xi \, F(\xi).

So F(ξ)=F(0)e−πξ2F(\xi) = F(0) e^{-\pi \xi^2}, and F(0)=∫e−πx2dx=1F(0) = \int e^{-\pi x^2} dx = 1. Thus f^=f\hat f = f. By scaling, the transform of e−πtx2e^{-\pi t x^2} (t>0t > 0) is t−1/2e−πξ2/tt^{-1/2} e^{-\pi \xi^2/t}: a narrow Gaussian has a wide transform.

Example— Transforms that are not integrable

The indicator 1[−1/2,1/2]\mathbf 1_{[-1/2, 1/2]} has transform sin⁡πξπξ\frac{\sin \pi\xi}{\pi\xi}, which is not in L1(R)L^1(\R). So the Fourier transform does not map L1L^1 into L1L^1, and the inversion formula needs care: it holds in the L2L^2 sense, or pointwise at points of continuity after Cesàro-type summation.

ProofH

Fourier series: Fejér, Parseval and Riemann–Lebesgue

Theorem— Theorem (approximate identities)

If (KN)(K_N) is an approximate identity and ff is continuous on T\mathbb T, then f∗KN→ff * K_N \to f uniformly. If f∈Lp(T)f \in L^p(\mathbb T), 1≤p<∞1 \le p < \infty, then f∗KN→ff * K_N \to f in LpL^p.

Proof

By property 1, (f∗KN)(x)−f(x)=12π∫−ππ(f(x−y)−f(x))KN(y) dy(f * K_N)(x) - f(x) = \frac{1}{2\pi} \int_{-\pi}^{\pi} \big(f(x - y) - f(x)\big) K_N(y) \, dy. Let ε>0\varepsilon > 0. A continuous function on the compact space T\mathbb T is uniformly continuous, so there is δ>0\delta > 0 with ∣f(x−y)−f(x)∣<ε|f(x - y) - f(x)| < \varepsilon whenever ∣y∣<δ|y| < \delta. Splitting the integral,

∣(f∗KN)(x)−f(x)∣≤ε2π∫∣y∣<δ∣KN∣+2∥f∥∞2π∫δ≤∣y∣≤π∣KN∣≤εM+∥f∥∞π∫δ≤∣y∣≤π∣KN∣,|(f * K_N)(x) - f(x)| \le \frac{\varepsilon}{2\pi} \int_{|y| < \delta} |K_N| + \frac{2\|f\|_\infty}{2\pi} \int_{\delta \le |y| \le \pi} |K_N| \le \varepsilon M + \frac{\|f\|_\infty}{\pi} \int_{\delta \le |y| \le \pi} |K_N|,

uniformly in xx, by property 2. By property 3 the last term is <ε< \varepsilon for large NN. For f∈Lpf \in L^p, the same argument applies to y↦∥τyf−f∥py \mapsto \|\tau_y f - f\|_p, which is continuous (approximate ff in LpL^p by continuous functions) and enters via Minkowski's integral inequality.

∎

Theorem— Fejér's theorem (1900)

For every continuous ff on T\mathbb T, σNf→f\sigma_N f \to f uniformly. Consequently trigonometric polynomials are dense in C(T)C(\mathbb T) and in L2(T)L^2(\mathbb T), and a continuous (or integrable) function with all Fourier coefficients zero vanishes (almost everywhere).

Proof

We check that (FN)(F_N) is an approximate identity. Each DnD_n has 12π∫Dn=1\frac{1}{2\pi}\int D_n = 1 (only the constant term survives), so 12π∫FN=1\frac{1}{2\pi}\int F_N = 1; since FN≥0F_N \ge 0, also 12π∫∣FN∣=1\frac{1}{2\pi}\int |F_N| = 1. For δ≤∣x∣≤π\delta \le |x| \le \pi we have sin⁡2(x/2)≥sin⁡2(δ/2)\sin^2(x/2) \ge \sin^2(\delta/2), so FN(x)≤1Nsin⁡2(δ/2)→0F_N(x) \le \frac{1}{N \sin^2(\delta/2)} \to 0 uniformly there. The previous theorem gives uniform convergence. The σNf\sigma_N f are trigonometric polynomials, so these are dense in C(T)C(\mathbb T), which is dense in L2(T)L^2(\mathbb T). If all f^(n)=0\hat f(n) = 0, every σNf=0\sigma_N f = 0, so f=lim⁡σNf=0f = \lim \sigma_N f = 0 (in L1L^1, for integrable ff).

∎

Theorem— Parseval's theorem

The functions en(x)=einxe_n(x) = e^{inx} form an orthonormal basis of L2(T)L^2(\mathbb T) with ⟨f,g⟩=12π∫−ππfgˉ\langle f, g \rangle = \frac{1}{2\pi}\int_{-\pi}^{\pi} f \bar g. Hence for every f∈L2(T)f \in L^2(\mathbb T), SNf→fS_N f \to f in L2L^2 and

∑n∈Z∣f^(n)∣2=12π∫−ππ∣f(x)∣2 dx.\sum_{n \in \Z} |\hat f(n)|^2 = \frac{1}{2\pi} \int_{-\pi}^{\pi} |f(x)|^2 \, dx.

Conversely (Riesz–Fischer) every square-summable sequence (cn)(c_n) is the coefficient sequence of a unique f∈L2(T)f \in L^2(\mathbb T).

Proof

Orthonormality is the computation 12π∫ei(m−n)xdx=δmn\frac{1}{2\pi}\int e^{i(m - n)x} dx = \delta_{mn}, and f^(n)=⟨f,en⟩\hat f(n) = \langle f, e_n \rangle. 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 L2L^2 convergence and Parseval's identity. Riesz–Fischer is the surjectivity of the isometry L2(T)→ℓ2(Z)L^2(\mathbb T) \to \ell^2(\Z), f↦(f^(n))f \mapsto (\hat f(n)), which follows from completeness of L2L^2.

∎

Applied to the square wave, Parseval gives ∑n odd4π2n2=1\sum_{n \text{ odd}} \frac{4}{\pi^2 n^2} = 1, that is, 1+19+125+⋯=π281 + \frac19 + \frac1{25} + \cdots = \frac{\pi^2}{8}, and hence ∑n≥11n2=π26\sum_{n \ge 1} \frac1{n^2} = \frac{\pi^2}{6}.

Theorem— Riemann–Lebesgue lemma

If f∈L1(T)f \in L^1(\mathbb T) then f^(n)→0\hat f(n) \to 0 as ∣n∣→∞|n| \to \infty; if f∈L1(R)f \in L^1(\R) then f^\hat f is continuous and f^(ξ)→0\hat f(\xi) \to 0 as ∣ξ∣→∞|\xi| \to \infty.

Proof

For f∈L2(T)f \in L^2(\mathbb T) this follows from Parseval: the terms of a convergent series tend to 00. In general, ∣f^(n)−g^(n)∣≤12π∥f−g∥1|\hat f(n) - \hat g(n)| \le \frac{1}{2\pi}\|f - g\|_1, and L2L^2 (even trigonometric polynomials) is dense in L1L^1: given ε\varepsilon, choose a trigonometric polynomial gg with ∥f−g∥1<ε\|f - g\|_1 < \varepsilon; then ∣f^(n)∣<ε|\hat f(n)| < \varepsilon once ∣n∣|n| exceeds the degree of gg. On R\R, use step functions, for which f^\hat f is explicit and O(1/∣ξ∣)O(1/|\xi|); continuity follows from dominated convergence.

∎

ProofH

The Fourier transform on the line

Theorem— Fourier inversion and Plancherel for Schwartz functions

For f∈S(R)f \in \mathcal S(\R): (i) f(x)=∫f^(ξ)e2πixξ dξf(x) = \int \hat f(\xi) e^{2\pi i x \xi} \, d\xi for every xx; (ii) ∫∣f^∣2=∫∣f∣2\int |\hat f|^2 = \int |f|^2. The Fourier transform extends uniquely from S(R)\mathcal S(\R) to a unitary operator on L2(R)L^2(\R) (Plancherel, 1910).

Proof

Multiplication formula. For f,g∈S(R)f, g \in \mathcal S(\R), Fubini's theorem (the integrand is absolutely integrable on R2\R^2) gives ∫f(x)g^(x) dx=∬f(x)g(y)e−2πixy dy dx=∫f^(y)g(y) dy\int f(x) \hat g(x) \, dx = \iint f(x) g(y) e^{-2\pi i x y} \, dy \, dx = \int \hat f(y) g(y) \, dy.

Inversion at 00. Take g(ξ)=e−πδξ2g(\xi) = e^{-\pi \delta \xi^2}, whose transform is Kδ(x)=δ−1/2e−πx2/δK_\delta(x) = \delta^{-1/2} e^{-\pi x^2/\delta} by the Gaussian example. The multiplication formula reads ∫f^(ξ)e−πδξ2dξ=∫f(x)Kδ(x) dx\int \hat f(\xi) e^{-\pi\delta\xi^2} d\xi = \int f(x) K_\delta(x) \, dx. As δ→0\delta \to 0 the left side tends to ∫f^\int \hat f by dominated convergence (f^∈S\hat f \in \mathcal S is integrable). The family KδK_\delta has integral 11, is positive, and concentrates at 00 (∫∣x∣≥ηKδ→0\int_{|x| \ge \eta} K_\delta \to 0), so — by the same argument as for approximate identities on T\mathbb T — the right side tends to f(0)f(0). Thus f(0)=∫f^f(0) = \int \hat f. Applying this to f(⋅+x)f(\cdot + x), whose transform is f^(ξ)e2πixξ\hat f(\xi) e^{2\pi i x \xi}, gives (i).

Plancherel. Put g=f^‾g = \overline{\hat f}. By (i), g^(x)=∫f^(ξ)‾e−2πixξdξ=f(x)‾\hat g(x) = \int \overline{\hat f(\xi)} e^{-2\pi i x \xi} d\xi = \overline{f(x)}, so the multiplication formula gives ∫ffˉ=∫f^ f^‾\int f \bar f = \int \hat f \, \overline{\hat f}. Finally S(R)\mathcal S(\R) is dense in L2(R)L^2(\R), so the isometry extends uniquely to L2L^2; its range is closed and contains S(R)=S(R)^\mathcal S(\R) = \widehat{\mathcal S(\R)}, hence is everything.

∎

Theorem— Poisson summation formula

For f∈S(R)f \in \mathcal S(\R) and every x∈Rx \in \R,

∑n∈Zf(x+n)=∑k∈Zf^(k) e2πikx,in particular∑n∈Zf(n)=∑k∈Zf^(k).\sum_{n \in \Z} f(x + n) = \sum_{k \in \Z} \hat f(k) \, e^{2\pi i k x}, \qquad \text{in particular} \qquad \sum_{n \in \Z} f(n) = \sum_{k \in \Z} \hat f(k).

Proof

Because ff and its derivatives decay faster than any power, F(x)=∑nf(x+n)F(x) = \sum_n f(x + n) converges uniformly with all derivatives, so FF is a smooth 11-periodic function. Its Fourier coefficients (on R/Z\R/\Z) are

∫01F(x)e−2πikx dx=∑n∫01f(x+n)e−2πikx dx=∫Rf(y)e−2πiky dy=f^(k),\int_0^1 F(x) e^{-2\pi i k x} \, dx = \sum_n \int_0^1 f(x + n) e^{-2\pi i k x} \, dx = \int_\R f(y) e^{-2\pi i k y} \, dy = \hat f(k),

exchanging sum and integral by uniform convergence and using e−2πikn=1e^{-2\pi i k n} = 1. Since f^\hat f decays rapidly, the Fourier series ∑kf^(k)e2πikx\sum_k \hat f(k) e^{2\pi i k x} converges absolutely and uniformly; its Fejér means converge to the same limit, and by Fejér's theorem they converge to FF. So the series equals F(x)F(x).

∎

Applied to f(x)=e−πtx2f(x) = e^{-\pi t x^2}, Poisson summation gives Jacobi's identity θ(t)=t−1/2θ(1/t)\theta(t) = t^{-1/2} \theta(1/t) for θ(t)=∑ne−πn2t\theta(t) = \sum_n e^{-\pi n^2 t}. Riemann (1859) wrote π−s/2Γ(s/2)ζ(s)=∫0∞θ(t)−12ts/2dtt\pi^{-s/2}\Gamma(s/2)\zeta(s) = \int_0^\infty \frac{\theta(t) - 1}{2} t^{s/2} \frac{dt}{t} and used Jacobi's identity to prove the functional equation ξ(s)=ξ(1−s)\xi(s) = \xi(1 - s) of the zeta function: see analytic number theory.

Theorem— Heisenberg's uncertainty inequality

For f∈S(R)f \in \mathcal S(\R),

(∫Rx2∣f(x)∣2 dx)(∫Rξ2∣f^(ξ)∣2 dξ)≥116π2(∫R∣f∣2)2,\left( \int_\R x^2 |f(x)|^2 \, dx \right) \left( \int_\R \xi^2 |\hat f(\xi)|^2 \, d\xi \right) \ge \frac{1}{16\pi^2} \left( \int_\R |f|^2 \right)^2,

with equality exactly when f(x)=Ae−Bx2f(x) = A e^{-B x^2} with B>0B > 0.

Proof

Integrating by parts (the boundary terms vanish for Schwartz functions),

∫∣f∣2 dx=−∫xddx∣f∣2 dx=−∫x(f′fˉ+ffˉ′) dx≤2∫∣xf(x)∣ ∣f′(x)∣ dx.\int |f|^2 \, dx = -\int x \frac{d}{dx}|f|^2 \, dx = -\int x \big(f' \bar f + f \bar f'\big) \, dx \le 2 \int |x f(x)| \, |f'(x)| \, dx.

By Cauchy–Schwarz the right side is at most 2(∫x2∣f∣2)1/2(∫∣f′∣2)1/22 \big(\int x^2 |f|^2\big)^{1/2} \big(\int |f'|^2\big)^{1/2}. Since f′^(ξ)=2πiξf^(ξ)\widehat{f'}(\xi) = 2\pi i \xi \hat f(\xi), Plancherel gives ∫∣f′∣2=4π2∫ξ2∣f^∣2\int |f'|^2 = 4\pi^2 \int \xi^2 |\hat f|^2. Squaring yields the inequality. Equality in Cauchy–Schwarz forces f′=−2Bxff' = -2Bxf for a constant BB, real and positive by the equality in the first step and integrability, so ff is a Gaussian; Gaussians do give equality.

∎

In quantum mechanics a particle's position density is ∣f∣2|f|^2 and its momentum density is ∣f^∣2|\hat f|^2 (in units with p=hξp = h\xi); the theorem says the product of the standard deviations of position and momentum is at least h/(4π)=ℏ/2h/(4\pi) = \hbar/2. This is a theorem of Fourier analysis, applied to a physical model.

ExplanationH

Pointwise convergence: the honest picture

Pointwise convergence of SNf(x)S_N f(x) is delicate, because the Dirichlet kernel is not an approximate identity. What is known:

  • Positive results for nice functions. If ff is piecewise C1C^1, then SNf(x)→12(f(x+)+f(x−))S_N f(x) \to \frac12\big(f(x^+) + f(x^-)\big) everywhere (Dirichlet, 1829), uniformly on closed intervals avoiding jumps. If ff is Hölder continuous, or of bounded variation and continuous, SNf→fS_N f \to f 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 f↦SNf(0)f \mapsto S_N f(0) on the Banach space C(T)C(\mathbb T) have norms 12π∥DN∥1→∞\frac{1}{2\pi}\|D_N\|_1 \to \infty, so by the uniform boundedness principle they cannot be pointwise bounded. Kahane and Katznelson (1966) showed that for every null set E⊂TE \subset \mathbb T there is a continuous ff whose Fourier series diverges at every point of EE.
  • L1L^1 is hopeless. Kolmogorov (1923) found f∈L1(T)f \in L^1(\mathbb T) whose Fourier series diverges almost everywhere, and (1926) one that diverges everywhere.
  • L2L^2 is fine. Lusin conjectured (1915) and Carleson proved (1966) that the Fourier series of every f∈L2(T)f \in L^2(\mathbb T) converges to ff almost everywhere; Hunt (1968) extended this to LpL^p, p>1p > 1. The proof is among the hardest in classical analysis; it controls the maximal operator sup⁡N∣SNf∣\sup_N |S_N f| by decomposing time–frequency space into tiles.
  • Averaging rescues everything. For f∈L1f \in L^1, the Fejér means converge to ff in L1L^1 and almost everywhere (at every Lebesgue point), and uniformly for continuous ff.

So the right summary is not "Fourier series converge" but: in L2L^2, always; after averaging, always; pointwise, almost everywhere exactly in the range p>1p > 1, with the Gibbs overshoot near jumps never going away.

ExplanationH

Harmonic analysis on groups

The three settings above are one theory. For a locally compact abelian group GG, a character is a continuous homomorphism χ:G→S1\chi : G \to \mathbb S^1; the characters form the dual group G^\widehat G, and the Fourier transform is f^(χ)=∫Gf(x)χ(x)‾ dx\hat f(\chi) = \int_G f(x) \overline{\chi(x)} \, dx with respect to Haar measure. Pontryagin duality (1934) says G^^≅G\widehat{\widehat G} \cong G, and Plancherel holds: with suitably normalised Haar measures, f↦f^f \mapsto \hat f is unitary from L2(G)L^2(G) to L2(G^)L^2(\widehat G).

GGG^\widehat GFourier analysis
T=R/2πZ\mathbb T = \R/2\pi\ZZ\Z (χn=einx\chi_n = e^{inx})Fourier series
Z\ZT\mathbb TFourier series read backwards (discrete-time signals)
R\RR\R (χξ=e2πixξ\chi_\xi = e^{2\pi i x \xi})the Fourier transform
Z/N\Z/NZ/N\Z/Nthe discrete Fourier transform, computed by the FFT

Orthogonality of characters on Z/N\Z/N is the geometric-series identity ∑k<Nzk=0\sum_{k < N} z^k = 0 for an NN-th root of unity z≠1z \ne 1 (formalised below). For compact non-abelian groups, characters are replaced by irreducible representations: the Peter–Weyl theorem (1927) decomposes L2(G)L^2(G) 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 SL2(R)SL_2(\R) was developed by Gelfand, Bargmann and above all Harish-Chandra, and leads to the theory of automorphic forms.

Formal mathematicsF

Fourier analysis in Lean and Mathlib

The finite model first: orthogonality of the characters of Z/N\Z/N, proved from the geometric series.

roots_of_unity_sumLean 4Proved here from basic factsFormally verified
/-- **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)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor

Mathlib works on AddCircle T =R/TZ= \R / T\Z with Haar measure normalised to total mass 11, so its coefficients are f^(n)=1T∫0Tf(x)e−2πinx/Tdx\hat f(n) = \frac1T \int_0^T f(x) e^{-2\pi i n x/T} dx. The exponentials are orthonormal (and, by Stone–Weierstrass rather than Fejér, a Hilbert basis), and Parseval's identity holds:

orthonormal_exponentialsLean 4Applies a library theoremFormally verified
/-- **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
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor
parsevalLean 4Applies a library theoremFormally verified
/-- **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 f
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor

From Parseval we derive the Riemann–Lebesgue lemma for L2L^2 functions, exactly as in the proof above:

fourier_coeff_tendsto_zeroLean 4Proved here from basic factsFormally verified
/-- **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 hnorm
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor

On R\R, Mathlib writes 𝐞 t for e2πite^{2\pi i t} and 𝓕 for the transform f^(ξ)=∫f(x)e−2πixξdx\hat f(\xi) = \int f(x) e^{-2\pi i x\xi} dx, the convention of this lesson. The trivial bound ∣f^(ξ)∣≤∥f∥1|\hat f(\xi)| \le \|f\|_1, proved directly; the Riemann–Lebesgue lemma; Plancherel on L2(R)L^2(\R); and the self-dual Gaussian:

fourier_boundLean 4Proved here from basic factsFormally verified
/-- **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
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor
riemann_lebesgueLean 4Applies a library theoremFormally verified
/-- **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
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor
plancherelLean 4Applies a library theoremFormally verified
/-- **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
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor
gaussian_self_dualLean 4Applies a library theoremFormally verified
/-- **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 h
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor

Poisson summation for Schwartz functions, the theta functional equation that Riemann used, and ζ(2)=π2/6\zeta(2) = \pi^2/6, which Mathlib proves with Fourier series of Bernoulli polynomials:

poisson_summationLean 4Applies a library theoremFormally verified
/-- **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
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor
theta_functional_equationLean 4Applies a library theoremFormally verified
/-- **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 τ
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor
baselLean 4Applies a library theoremFormally verified
/-- **`∑ 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_two
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/HarmonicAnalysis.leanTry it in the Lean web editor

Not 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).

ComputationC

Computing overshoots, averages and theta

The first experiment samples the partial sums of the square wave near the jump: the maximum stays at about 1.1791.179 for N=9,49,199,999N = 9, 49, 199, 999, matching 2πSi⁡(π)\frac2\pi \operatorname{Si}(\pi), while the Fejér means never exceed 11. It also computes the exact L2L^2 error of SNS_N from Parseval and watches ∑k oddk−2\sum_{k \text{ odd}} k^{-2} approach π2/8\pi^2/8.

Gibbs overshoot, Fejer means and ParsevalPythonNumerical approximationComputationally tested
"""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()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The second checks Jacobi's identity θ(t)=t−1/2θ(1/t)\theta(t) = t^{-1/2}\theta(1/t) to machine precision, and computes the uncertainty ratio (∫x2∣f∣2)(∫ξ2∣f^∣2)/(∥f∥24/16π2)\big(\int x^2|f|^2\big)\big(\int \xi^2 |\hat f|^2\big) \big/ \big(\|f\|_2^4/16\pi^2\big) for three functions with known transforms: 11 for the Gaussian, 22 for e−∣x∣e^{-|x|} and 6/56/5 for a tent.

Theta, Poisson summation and the uncertainty principlePythonNumerical approximationComputationally tested
"""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()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

These are numerical confirmations of theorems proved above, on finitely many cases; they cannot replace the proofs, but they make the constants concrete.

Explore

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 NN: the Dirichlet kernel DND_N (whose convolution gives SNfS_N f) has large negative lobes, while the Fejér kernel FNF_N is positive and concentrates at 00 — 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

Exercises

1. Fourier and harmonic analysis

Warm-upHuman

Let f(x)=3+4cos⁡(2x)−2sin⁡(5x)f(x) = 3 + 4\cos(2x) - 2\sin(5x) on T\mathbb T. Compute ∑n∈Z∣f^(n)∣2\displaystyle \sum_{n \in \Z} |\hat f(n)|^2, with f^(n)=12π∫−ππf(x)e−inx dx\hat f(n) = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x) e^{-inx}\,dx.

2. Fourier and harmonic analysis

CoreHuman

Which property of an approximate identity does the Dirichlet kernel DND_N fail, and why does that matter?

Choose one

3. Fourier and harmonic analysis

CoreHuman

For the square wave f=sign⁡(sin⁡x)f = \operatorname{sign}(\sin x), what happens to max⁡xSNf(x)\max_x S_N f(x) as N→∞N \to \infty?

Choose one

4. Fourier and harmonic analysis

StretchHuman

The function f(x)=e−2π∣x∣f(x) = e^{-2\pi|x|} has Fourier transform f^(ξ)=1π(1+ξ2)\hat f(\xi) = \dfrac{1}{\pi(1 + \xi^2)}, and Poisson summation holds for it. What is ∑k∈Z11+k2\displaystyle\sum_{k \in \Z} \frac{1}{1 + k^2}?

Choose one

5. Fourier and harmonic analysis

CoreHuman

In the proof of the Heisenberg inequality we reach ∫∣f∣2≤2(∫x2∣f∣2)1/2(∫∣f′∣2)1/2\int|f|^2 \le 2\left(\int x^2|f|^2\right)^{1/2}\left(\int|f'|^2\right)^{1/2}. Which result converts ∫∣f′∣2\int |f'|^2 into a statement about f^\hat f?

Choose one

6. Fourier and harmonic analysis

Warm-upFormal

Which Lean statement correctly expresses the orthogonality of the characters of Z/N\Z/N as "the sum of the powers of a non-trivial NN-th root of unity is 00"?

Choose one

7. Fourier and harmonic analysis

CoreHuman

Let f∈L1(R)f \in L^1(\R). Which statements are always true? Select all that apply.

Choose all that apply

8. Fourier and harmonic analysis

CoreComputational

Write dft(a) returning the discrete Fourier transform Ak=∑j=0N−1aje−2πijk/NA_k = \sum_{j=0}^{N-1} a_j e^{-2\pi i jk/N}, k=0,…,N−1k = 0, \dots, N-1, of a list a of NN numbers (use cmath). The tests check Parseval's identity for Z/N\Z/N: ∑k∣Ak∣2=N∑j∣aj∣2\sum_k |A_k|^2 = N\sum_j |a_j|^2.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
Common misconceptionsH

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 L2L^2 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 2πSi⁡(π)−1≈0.179\frac2\pi \operatorname{Si}(\pi) - 1 \approx 0.179 times half the jump — about 9%9\% of the jump — however many terms are taken; it only moves closer to the jump. This is compatible with L2L^2 convergence (the region of overshoot has shrinking width) and with pointwise convergence (each fixed x≠0x \ne 0 is eventually outside it), but not with uniform convergence, which is impossible anyway since the limit is discontinuous.

Misconception

"The Fourier transform maps L1L^1 functions to L1L^1 functions." It maps L1L^1 to bounded continuous functions vanishing at infinity, but the transform of 1[−1/2,1/2]\mathbf 1_{[-1/2,1/2]} is sin⁡πξπξ∉L1\frac{\sin \pi\xi}{\pi\xi} \notin L^1. The spaces that are mapped to themselves are L2L^2 (Plancherel) and S\mathcal S; on LpL^p for 1<p<21 < p < 2 the transform maps into Lp′L^{p'} (Hausdorff–Young).

Misconception

"L2L^2 convergence implies pointwise convergence." L2L^2 convergence says nothing about any particular point; Carleson's theorem, which gives a.e. convergence of SNfS_N f for f∈L2f \in L^2, is a deep separate theorem, and it would fail for an arbitrary rearrangement or for general orthonormal bases.

ViewpointsH

Many ways of seeing

Algebra— Characters, representations and the group algebra

For a finite abelian group GG, the characters form a basis of the space of functions on GG that simultaneously diagonalises all translation operators, and the Fourier transform is the isomorphism of algebras from (C[G],∗)(\C[G], *) to (CG^,⋅)(\C^{\widehat G}, \cdot): convolution becomes pointwise multiplication. For non-abelian finite groups, Wedderburn's theorem gives C[G]≅∏πEnd⁡(Vπ)\C[G] \cong \prod_\pi \operatorname{End}(V_\pi) over the irreducible representations, the non-commutative Fourier transform of representation theory. Pontryagin duality is the topological version: G↦G^G \mapsto \widehat G is a contravariant self-equivalence of the category of locally compact abelian groups, exchanging compact and discrete groups (T^=Z\widehat{\mathbb T} = \Z) and fixing R\R and Z/N\Z/N.

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 ζ(s)\zeta(s); in Tate's thesis (1950), Fourier analysis on the adeles AQ\mathbb A_\Q, a self-dual locally compact ring, proves the functional equations of all Hecke LL-functions at once. Weyl's criterion (1916) turns equidistribution into Fourier analysis: a sequence xnx_n is equidistributed modulo 11 iff 1N∑n<Ne2πikxn→0\frac1N \sum_{n < N} e^{2\pi i k x_n} \to 0 for every k≠0k \ne 0; for xn=nαx_n = n\alpha with α\alpha irrational this is a geometric series, a fact developed in ergodic theory. The Hardy–Littlewood circle method writes the number of representations of nn 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 MM the Laplacian has an orthonormal basis of eigenfunctions Δφk=−λkφk\Delta \varphi_k = -\lambda_k \varphi_k, 0=λ0≤λ1≤⋯→∞0 = \lambda_0 \le \lambda_1 \le \cdots \to \infty — 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 λk≤λ\lambda_k \le \lambda grows like cnvol⁡(M)λn/2c_n \operatorname{vol}(M) \lambda^{n/2}. 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 Rn/Λ\R^n/\Lambda to the lengths of vectors in Λ\Lambda — 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 φX(t)=E[eitX]\varphi_X(t) = \mathbb E[e^{itX}]. Independence becomes multiplication, φX+Y=φXφY\varphi_{X + Y} = \varphi_X \varphi_Y, because the law of X+YX + Y 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 φSn/n(t)=φ(t/n)n→e−t2/2\varphi_{S_n/\sqrt n}(t) = \varphi(t/\sqrt n)^n \to e^{-t^2/2} — 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 φ(0)=1\varphi(0) = 1. 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 Δx Δp≥ℏ/2\Delta x \, \Delta p \ge \hbar/2 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 NN costs N2N^2 operations naively. Cooley and Tukey (1965) rediscovered a divide-and-conquer algorithm — known to Gauss around 1805 — that factors the DFT for N=2mN = 2^m into mm stages of butterflies, costing O(Nlog⁡N)O(N \log N). It made digital signal processing, spectral methods for PDEs, fast multiplication of large integers (Schönhage–Strassen, and Harvey–van der Hoeven's O(nlog⁡n)O(n \log n) algorithm of 2019) and modern imaging possible. Mathematically the FFT is the factorisation of the character table of Z/2m\Z/2^m along the chain of subgroups Z/2⊂Z/4⊂⋯\Z/2 \subset \Z/4 \subset \cdots.

History & global context

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 L2L^2 theory; Michel Plancherel (1910) the L2L^2 Fourier transform.
  • Andrey Kolmogorov (1923, 1926) found divergent L1L^1 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 L2L^2, and Richard Hunt (1968) for LpL^p. 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

Further reading

  • Elias M. Stein and Rami Shakarchi, Fourier Analysis: An Introduction (2003) — Fejér, Parseval, the transform on R\R, 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 T\mathbb T and R\R, 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.