Skip to content
The Lumenary
Advanced undergraduateUndergraduate 120 min

Partial differential equations and Fourier series

Heat spreading through a rod, a plucked string, the shape of a soap film — three equations, one idea. Split the solution into pure frequencies, then ask the hard question of whether the pieces add back up.

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

Three equations that run the world

Heat a metal rod at its middle and hold its ends in ice water. How does the temperature evolve? Pluck a string on a kora in Bamako, a sitar in Varanasi or a guitar in Seville: why does it sound a note and its overtones, and nothing in between? Dip a bent wire loop into soapy water: what shape does the film take? Each question is answered by a partial differential equation (PDE) — an equation linking the rates of change of a function of several variables:

ut=k uxx    (heat),utt=c2uxx    (wave),uxx+uyy=0    (Laplace).u_t = k\,u_{xx} \;\;\text{(heat)}, \qquad u_{tt} = c^2 u_{xx} \;\;\text{(wave)}, \qquad u_{xx} + u_{yy} = 0 \;\;\text{(Laplace)}.

In 1807 Joseph Fourier claimed something outrageous about the first one. Every initial temperature profile, he said, even one with corners and jumps, can be written as a sum of sine waves, and each sine wave simply decays at its own rate. The leading analysts of the day, Lagrange among them, did not believe that a discontinuous function could be a sum of smooth ones. Making sense of Fourier's claim took a century and created much of modern analysis: the Riemann and Lebesgue integrals, uniform convergence, set theory (Cantor began with the uniqueness of trigonometric series), and Hilbert spaces.

Today Fourier's idea is everywhere. MP3 audio and JPEG images store a signal by its frequency content, an MRI scanner measures the Fourier transform of your body's tissue directly, and quantum mechanics computes atomic energy levels as the frequencies of a wave equation. This lesson solves the three classical equations on an interval and develops the theory of Fourier series that makes the solutions rigorous. It also proves that the solutions are unique.

IntuitionH

Pure tones, and averages

Heat flows from hot to cold at a rate proportional to the temperature gradient (Fourier's law). In a thin rod, the heat in a small piece [x,x+Δx][x, x + \Delta x] changes by the flux in at one end minus the flux out at the other. Dividing by Δx\Delta x and letting Δx→0\Delta x \to 0 gives ut=kuxxu_t = k u_{xx}. The sign tells the story: where the temperature profile is curved upwards (uxx>0u_{xx} > 0, a cold dip), the temperature rises. Heat flattens bumps.

Sine waves are the natural modes. If the initial profile is sin⁡(nx)\sin(nx), the solution keeps its shape and just shrinks: u=e−kn2tsin⁡(nx)u = e^{-kn^2t}\sin(nx). The decay rate grows like n2n^2, so wiggly components die almost instantly and the profile quickly smooths out. If the initial profile is a sum of sines, each one decays independently, because the equation is linear. So everything hinges on Fourier's claim that every reasonable profile is such a sum.

Waves keep their shape and travel. A string's displacement satisfies utt=c2uxxu_{tt} = c^2 u_{xx} (Newton's law for each small piece, with tension τ\tau and density ρ\rho, c2=τ/ρc^2 = \tau/\rho). Any shape ff moving right at speed cc, u=f(x−ct)u = f(x - ct), is a solution, and so is any shape moving left.

Harmonic functions — solutions of Laplace's equation — are steady states of heat flow. They have no bumps at all: the value at each point equals the average over any circle around it. So a harmonic function cannot have a maximum inside its domain.

0π
Separation of variables on a string fixed at both ends: the first three modes $\sin x$, $\sin 2x$, $\sin 3x$ on $[0, \pi]$. Each oscillates (wave equation) or decays (heat equation) at its own rate, $n$ or $n^2$, without changing shape. A general solution is a superposition of them.
DefinitionsH

Definitions

Definition— the three classical equations

For u=u(t,x)u = u(t, x) (or u(x,y)u(x, y)) and constants k,c>0k, c > 0: the heat equation ut=k uxxu_t = k\,u_{xx}, the wave equation utt=c2uxxu_{tt} = c^2 u_{xx}, and Laplace's equation Δu=uxx+uyy=0\Delta u = u_{xx} + u_{yy} = 0. A solution of Laplace's equation is harmonic. All three are linear: sums and multiples of solutions are solutions (the superposition principle).

A problem consists of an equation plus side conditions. On a rod [0,L][0, L] we impose initial conditions — u(0,x)=φ(x)u(0, x) = \varphi(x) for heat, and also ut(0,x)=ψ(x)u_t(0, x) = \psi(x) for waves — and boundary conditions such as the Dirichlet conditions u(t,0)=u(t,L)=0u(t, 0) = u(t, L) = 0. Following Hadamard (1902), a problem is well posed if a solution exists, is unique, and depends continuously on the data.

Definition— Fourier series

Let ff be 2π2\pi-periodic and Riemann integrable on [−π,π][-\pi, \pi]. Its Fourier coefficients are

f^(n)=cn=12π∫−ππf(x) e−inx dx(n∈Z),\hat f(n) = c_n = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)\,e^{-inx}\,dx \quad (n \in \Z),

and its Fourier series is ∑n∈Zcneinx\sum_{n \in \Z} c_n e^{inx}, with partial sums SNf(x)=∑∣n∣≤NcneinxS_N f(x) = \sum_{|n| \le N} c_n e^{inx}. For real ff this is a02+∑n≥1(ancos⁡nx+bnsin⁡nx)\frac{a_0}{2} + \sum_{n \ge 1}(a_n \cos nx + b_n \sin nx) with an=1π∫−ππf(x)cos⁡nx dxa_n = \frac1\pi \int_{-\pi}^{\pi} f(x) \cos nx\,dx and bn=1π∫−ππf(x)sin⁡nx dxb_n = \frac1\pi\int_{-\pi}^{\pi} f(x)\sin nx\,dx.

Definition— Fourier sine series on [0, L]

For ff integrable on [0,L][0, L], the sine coefficients are bn=2L∫0Lf(x)sin⁡nπxL dxb_n = \frac{2}{L}\int_0^L f(x)\sin\frac{n\pi x}{L}\,dx and the sine series is ∑n≥1bnsin⁡nπxL\sum_{n \ge 1} b_n \sin\frac{n\pi x}{L}. It is the full Fourier series of the odd 2L2L-periodic extension of ff.

Definition— inner product and L² norm

For complex-valued integrable functions on [−π,π][-\pi, \pi], put ⟨f,g⟩=12π∫−ππf(x)g(x)‾ dx\langle f, g \rangle = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)\overline{g(x)}\,dx and ∥f∥2=⟨f,f⟩1/2\|f\|_2 = \langle f, f\rangle^{1/2}. The functions en(x)=einxe_n(x) = e^{inx} are orthonormal: ⟨em,en⟩=1\langle e_m, e_n\rangle = 1 if m=nm = n and 00 otherwise, and cn=⟨f,en⟩c_n = \langle f, e_n\rangle.

A function on [a,b][a, b] is piecewise C1C^1 if it is continuously differentiable except at finitely many points, where ff and f′f' have one-sided limits.

Worked examplesH

Worked examples

Example— The square wave

Let f=sign⁡(sin⁡x)f = \operatorname{sign}(\sin x): f=1f = 1 on (0,π)(0, \pi) and −1-1 on (−π,0)(-\pi, 0). It is odd, so an=0a_n = 0, and

bn=2π∫0πsin⁡nx dx=2π⋅1−(−1)nn={4πnn odd,0n even.b_n = \frac{2}{\pi}\int_0^\pi \sin nx\,dx = \frac{2}{\pi}\cdot\frac{1 - (-1)^n}{n} = \begin{cases} \frac{4}{\pi n} & n \text{ odd}, \\ 0 & n \text{ even}. \end{cases}

So f∼4π(sin⁡x+sin⁡3x3+sin⁡5x5+⋯ )f \sim \frac{4}{\pi}\left(\sin x + \frac{\sin 3x}{3} + \frac{\sin 5x}{5} + \cdots\right). At x=π/2x = \pi/2 this gives Leibniz's series π4=1−13+15−⋯\frac\pi4 = 1 - \frac13 + \frac15 - \cdots.

Example— The sawtooth and the triangle

For f(x)=xf(x) = x on (−π,π)(-\pi, \pi), integration by parts gives bn=2(−1)n+1nb_n = \frac{2(-1)^{n+1}}{n}, so x∼2(sin⁡x−sin⁡2x2+sin⁡3x3−⋯ )x \sim 2\left(\sin x - \frac{\sin 2x}{2} + \frac{\sin 3x}{3} - \cdots\right). The coefficients decay like 1/n1/n: the periodic extension jumps at ±π\pm\pi. For the continuous triangle wave f(x)=∣x∣f(x) = |x|, a0=πa_0 = \pi and an=−4πn2a_n = -\frac{4}{\pi n^2} for odd nn (zero for even n≥2n \ge 2). The coefficients decay like 1/n21/n^2, one power faster, because one more derivative is continuous. Smoothness of ff is decay of f^\hat f.

Example— The heat equation with initial profile x(π − x)

On [0,π][0, \pi], φ(x)=x(π−x)\varphi(x) = x(\pi - x) has sine coefficients bn=2π∫0πx(π−x)sin⁡nx dx=4(1−(−1)n)πn3b_n = \frac{2}{\pi}\int_0^\pi x(\pi - x)\sin nx\,dx = \frac{4(1 - (-1)^n)}{\pi n^3}, that is 8πn3\frac{8}{\pi n^3} for odd nn. So

u(t,x)=8π∑n odde−n2tsin⁡nxn3.u(t, x) = \frac{8}{\pi}\sum_{n \text{ odd}} \frac{e^{-n^2 t}\sin nx}{n^3}.

By t=1t = 1 the second term is e−8/27≈10−5e^{-8}/27 \approx 10^{-5} times the first: the profile is essentially 8πe−tsin⁡x\frac{8}{\pi}e^{-t}\sin x.

Example— An ill-posed problem (Hadamard)

Pose Laplace's equation as an initial-value problem: uxx+uyy=0u_{xx} + u_{yy} = 0 for y>0y > 0 with u(x,0)=0u(x, 0) = 0 and uy(x,0)=sin⁡nxnu_y(x, 0) = \frac{\sin nx}{n}. The solution is un=sin⁡nxsinh⁡nyn2u_n = \frac{\sin nx \sinh ny}{n^2}. As n→∞n \to \infty the data tend to 00 uniformly, but at y=1y = 1 the solution has size sinh⁡nn2→∞\frac{\sinh n}{n^2} \to \infty. Tiny changes in the data cause enormous changes in the solution, so the problem is not well posed — even though a solution exists and is unique. Laplace's equation wants boundary data, not initial data.

ProofH

Separation of variables

We solve the heat equation on [0,π][0, \pi] with u(t,0)=u(t,π)=0u(t, 0) = u(t, \pi) = 0 and u(0,x)=φ(x)u(0, x) = \varphi(x). (Rescaling xx handles any interval [0,L][0, L].)

Step 1: separated solutions. Look for u=T(t)X(x)u = T(t)X(x). Then T′X=kTX′′T'X = kTX'', so T′kT=X′′X\frac{T'}{kT} = \frac{X''}{X} wherever these are defined. The left side depends only on tt and the right only on xx, so both equal a constant −λ-\lambda. The problem X′′=−λXX'' = -\lambda X with X(0)=X(π)=0X(0) = X(\pi) = 0 has a non-zero solution only when λ=n2\lambda = n^2, n=1,2,…n = 1, 2, \dots, with X=sin⁡nxX = \sin nx. (For λ≤0\lambda \le 0 the solutions are A+BxA + Bx or combinations of e±−λxe^{\pm\sqrt{-\lambda}x}, and the boundary conditions force them to vanish; for λ>0\lambda > 0, X=Acos⁡λx+Bsin⁡λxX = A\cos\sqrt\lambda x + B\sin\sqrt\lambda x, and X(0)=0X(0) = 0, X(π)=0X(\pi) = 0 force A=0A = 0 and λ∈Z\sqrt\lambda \in \Z.) Then T=e−kn2tT = e^{-kn^2t}.

Step 2: superposition. Formally, u(t,x)=∑n≥1bne−kn2tsin⁡nxu(t, x) = \sum_{n \ge 1} b_n e^{-kn^2t}\sin nx with bnb_n the sine coefficients of φ\varphi, so that u(0,x)=φ(x)u(0, x) = \varphi(x).

Theorem— Theorem 1 (the series solves the heat equation)

Let φ\varphi be integrable on [0,π][0, \pi] with sine coefficients bnb_n. Then u(t,x)=∑n≥1bne−kn2tsin⁡nxu(t, x) = \sum_{n \ge 1} b_n e^{-kn^2t}\sin nx converges for t>0t > 0, together with all its derivatives, uniformly on [t0,∞)×[0,π][t_0, \infty) \times [0, \pi] for each t0>0t_0 > 0. The function uu is infinitely differentiable for t>0t > 0, satisfies ut=kuxxu_t = k u_{xx} and u(t,0)=u(t,π)=0u(t, 0) = u(t, \pi) = 0, and if φ\varphi is continuous and piecewise C1C^1 with φ(0)=φ(π)=0\varphi(0) = \varphi(\pi) = 0, then u(t,x)→φ(x)u(t, x) \to \varphi(x) uniformly as t→0+t \to 0^+.

Proof

∣bn∣≤2π∫0π∣φ∣=:B|b_n| \le \frac2\pi\int_0^\pi|\varphi| =: B. A derivative ∂ti∂xj\partial_t^i\partial_x^j of the nn-th term is bounded by B(kn2)inje−kn2t0B (kn^2)^i n^j e^{-kn^2t_0} for t≥t0t \ge t_0, and ∑nn2i+je−kn2t0<∞\sum_n n^{2i + j}e^{-kn^2t_0} < \infty. By the Weierstrass M-test every differentiated series converges uniformly, so (by the theorem on derivatives of uniform limits in real analysis) we may differentiate term by term. Each term solves the equation and the boundary conditions, so uu does too. For the last claim, the hypotheses give ∑∣bn∣<∞\sum|b_n| < \infty (Theorem 4 below, applied to the odd extension of φ\varphi, which is continuous and piecewise C1C^1). Then ∣u(t,x)−φ(x)∣≤∑n∣bn∣(1−e−kn2t)|u(t, x) - \varphi(x)| \le \sum_n |b_n|(1 - e^{-kn^2t}), which tends to 00 uniformly by dominated convergence for series (or directly: split the sum at a large NN).

∎

Theorem 1 shows the smoothing effect of the heat equation. Even a discontinuous initial profile becomes infinitely differentiable instantly. Running time backwards is the opposite. The backward heat equation multiplies the nn-th mode by e+kn2te^{+kn^2t}, which explodes, so it is ill posed: you cannot un-mix milk from coffee.

The vibrating string. The same method for utt=c2uxxu_{tt} = c^2u_{xx} on [0,π][0, \pi] with fixed ends gives T′′=−c2n2TT'' = -c^2n^2T, so

u(t,x)=∑n≥1(ancos⁡nct+bnsin⁡nct)sin⁡nx,u(t, x) = \sum_{n \ge 1}\big(a_n\cos nct + b_n\sin nct\big)\sin nx,

with ana_n the sine coefficients of u(0,⋅)u(0, \cdot) and nc bnnc\,b_n those of ut(0,⋅)u_t(0, \cdot). The nn-th mode vibrates at frequency nn times the fundamental: the harmonic series of overtones that gives a string its timbre. Here nothing decays, so convergence requires smoother data, and on the whole line d'Alembert's formula below is cleaner.

ProofH

Fourier series: Bessel, Parseval and convergence

Theorem— Theorem 2 (Bessel's inequality; best approximation)

For ff integrable on [−π,π][-\pi, \pi] and every NN: ∥f−SNf∥22=∥f∥22−∑∣n∣≤N∣cn∣2\|f - S_Nf\|_2^2 = \|f\|_2^2 - \sum_{|n| \le N}|c_n|^2. Hence ∑n∈Z∣cn∣2≤∥f∥22\sum_{n \in \Z}|c_n|^2 \le \|f\|_2^2, and in particular cn→0c_n \to 0 (the Riemann–Lebesgue lemma for square-integrable ff). Moreover SNfS_Nf is the closest trigonometric polynomial of degree ≤N\le N to ff in the L2L^2 norm.

Proof

By orthonormality, ⟨f−SNf,en⟩=cn−cn=0\langle f - S_Nf, e_n\rangle = c_n - c_n = 0 for ∣n∣≤N|n| \le N, so f−SNff - S_Nf is orthogonal to every trigonometric polynomial PP of degree ≤N\le N. Pythagoras gives ∥f−P∥22=∥f−SNf∥22+∥SNf−P∥22≥∥f−SNf∥22\|f - P\|_2^2 = \|f - S_Nf\|_2^2 + \|S_Nf - P\|_2^2 \ge \|f - S_Nf\|_2^2 (best approximation). Taking P=0P = 0: ∥f∥22=∥f−SNf∥22+∥SNf∥22\|f\|_2^2 = \|f - S_Nf\|_2^2 + \|S_Nf\|_2^2, and ∥SNf∥22=∑∣n∣≤N∣cn∣2\|S_Nf\|_2^2 = \sum_{|n|\le N}|c_n|^2.

∎

Theorem— Theorem 3 (Parseval; stated)

For every square-integrable ff on [−π,π][-\pi, \pi], ∥f−SNf∥2→0\|f - S_Nf\|_2 \to 0, and therefore

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

By Theorem 2, Parseval is equivalent to the density of trigonometric polynomials in L2L^2. For continuous ff, density follows from Fejér's theorem: the averages σNf=1N+1∑m=0NSmf\sigma_N f = \frac{1}{N+1}\sum_{m=0}^N S_mf converge to ff uniformly, because they are convolutions with the positive kernel FN(t)=1N+1(sin⁡((N+1)t/2)sin⁡(t/2))2F_N(t) = \frac{1}{N+1}\left(\frac{\sin((N+1)t/2)}{\sin(t/2)}\right)^2, which concentrates at 00. Continuous functions are in turn dense in L2L^2. Full proofs are in Stein and Shakarchi (2003), chapters 2–3, and Mathlib proves the Hilbert-space version (see the formal section).

Example— Basel from Parseval

For f(x)=xf(x) = x, ∣cn∣=∣bn∣/2=1∣n∣|c_n| = |b_n|/2 = \frac1{|n|} for n≠0n \ne 0, and 12π∫−ππx2 dx=π23\frac{1}{2\pi}\int_{-\pi}^{\pi}x^2\,dx = \frac{\pi^2}{3}. Parseval gives 2∑n≥11n2=π232\sum_{n\ge1}\frac{1}{n^2} = \frac{\pi^2}{3}, that is, ∑n≥11n2=π26\sum_{n\ge1}\frac{1}{n^2} = \frac{\pi^2}{6}, Euler's 1734 answer to the Basel problem.

L2L^2 convergence says nothing about any particular point. Pointwise convergence needs the Dirichlet kernel: substituting the coefficients into SNfS_Nf and summing the geometric series gives

SNf(x)=12π∫−ππf(x−t) DN(t) dt,DN(t)=∑∣n∣≤Neint=sin⁡((N+12)t)sin⁡(t/2),S_Nf(x) = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x - t)\,D_N(t)\,dt, \qquad D_N(t) = \sum_{|n|\le N}e^{int} = \frac{\sin\big((N + \frac12)t\big)}{\sin(t/2)},

with 12π∫−ππDN=1\frac{1}{2\pi}\int_{-\pi}^\pi D_N = 1.

Theorem— Theorem 4 (Dirichlet; uniform convergence)

Let ff be 2π2\pi-periodic and integrable.

(a) If ff is differentiable at xx (or merely Lipschitz near xx), then SNf(x)→f(x)S_Nf(x) \to f(x).

(b) If ff is piecewise C1C^1, then SNf(x)→12(f(x+)+f(x−))S_Nf(x) \to \frac12\big(f(x^+) + f(x^-)\big) at every xx.

(c) If ff is continuous and piecewise C1C^1, then ∑n∣cn∣<∞\sum_n|c_n| < \infty, and SNf→fS_Nf \to f uniformly.

Proof

(a) Since 12π∫DN=1\frac{1}{2\pi}\int D_N = 1,

SNf(x)−f(x)=12π∫−ππg(t)sin⁡((N+12)t) dt,g(t)=f(x−t)−f(x)sin⁡(t/2).S_Nf(x) - f(x) = \frac{1}{2\pi}\int_{-\pi}^{\pi}g(t)\sin\big((N + \tfrac12)t\big)\,dt, \qquad g(t) = \frac{f(x - t) - f(x)}{\sin(t/2)}.

Near t=0t = 0, ∣f(x−t)−f(x)∣≤C∣t∣|f(x - t) - f(x)| \le C|t| and ∣sin⁡(t/2)∣≥∣t∣/π|\sin(t/2)| \ge |t|/\pi, so gg is bounded, hence square integrable. Expand sin⁡((N+12)t)=sin⁡Ntcos⁡t2+cos⁡Ntsin⁡t2\sin((N + \frac12)t) = \sin Nt\cos\frac t2 + \cos Nt\sin\frac t2. The integral becomes a combination of Fourier coefficients of the square-integrable functions g(t)cos⁡t2g(t)\cos\frac t2 and g(t)sin⁡t2g(t)\sin\frac t2, which tend to 00 by the Riemann–Lebesgue lemma (Theorem 2).

(b) Split the integral into t>0t > 0 and t<0t < 0. Since DND_N is even, 12π∫0πDN=12\frac{1}{2\pi}\int_0^\pi D_N = \frac12. Repeat (a) on each half with f(x∓)f(x^\mp) in place of f(x)f(x), using the one-sided Lipschitz bounds that piecewise C1C^1 provides.

(c) Integration by parts (valid because ff is continuous and periodic) gives f′^(n)=in cn\widehat{f'}(n) = in\,c_n. By Cauchy–Schwarz and Bessel for f′f',

∑n≠0∣cn∣=∑n≠0∣f′^(n)∣∣n∣≤(∑n≠01n2)1/2(∑n∣f′^(n)∣2)1/2<∞.\sum_{n \ne 0}|c_n| = \sum_{n\ne0}\frac{|\widehat{f'}(n)|}{|n|} \le \Big(\sum_{n\ne0}\frac1{n^2}\Big)^{1/2}\Big(\sum_n|\widehat{f'}(n)|^2\Big)^{1/2} < \infty.

By the M-test, SNfS_Nf converges uniformly to some continuous gg, and by (a) g=fg = f.

∎

The Gibbs phenomenon. Near a jump, convergence cannot be uniform: a uniform limit of continuous functions is continuous. But the failure has a precise, universal size. For the square wave, SnS_n (with nn non-zero terms) has derivative 4π∑j=1ncos⁡((2j−1)x)=2πsin⁡2nxsin⁡x\frac{4}{\pi}\sum_{j=1}^n\cos((2j - 1)x) = \frac{2}{\pi}\frac{\sin 2nx}{\sin x}. So its first maximum to the right of 00 is at x=π2nx = \frac{\pi}{2n}, where, with tj=(2j−1)π2nt_j = \frac{(2j - 1)\pi}{2n},

Sn(π2n)=4π∑j=1nsin⁡tj2j−1=2π∑j=1nπn⋅sin⁡tjtj  ⟶  2π∫0πsin⁡tt dt=2πSi(π)≈1.17898,S_n\Big(\frac{\pi}{2n}\Big) = \frac{4}{\pi}\sum_{j=1}^{n}\frac{\sin t_j}{2j - 1} = \frac{2}{\pi}\sum_{j=1}^n\frac{\pi}{n}\cdot\frac{\sin t_j}{t_j} \;\longrightarrow\; \frac{2}{\pi}\int_0^\pi\frac{\sin t}{t}\,dt = \frac{2}{\pi}\mathrm{Si}(\pi) \approx 1.17898,

because the middle sum is a midpoint Riemann sum. The partial sums overshoot the value 11 by about 9%9\% of the jump 22, ever closer to the discontinuity, and the overshoot never shrinks. Every jump discontinuity of a piecewise C1C^1 function shows the same proportional overshoot.

What can go wrong. Continuity alone is not enough for pointwise convergence. Paul du Bois-Reymond (1873) constructed a continuous periodic function whose Fourier series diverges at a point, and Kolmogorov (1926) found an integrable function whose Fourier series diverges everywhere. In the positive direction, Lennart Carleson (1966) proved that the Fourier series of every square-integrable function converges almost everywhere — one of the deepest theorems of twentieth-century analysis.

Term-by-term differentiation can fail. Differentiating x=2∑(−1)n+1sin⁡nxnx = 2\sum(-1)^{n+1}\frac{\sin nx}{n} term by term gives 2∑(−1)n+1cos⁡nx2\sum(-1)^{n+1}\cos nx, whose terms do not even tend to 00. The problem is the jump of the periodic sawtooth at ±π\pm\pi. For a continuous, piecewise C1C^1 periodic function, f′^(n)=in cn\widehat{f'}(n) = in\,c_n, so the differentiated series is the Fourier series of f′f'. That series converges to f′f' wherever Theorem 4 applies to f′f'.

ProofH

d'Alembert's formula

Theorem— Theorem 5 (d'Alembert)

Every C2C^2 solution of utt=c2uxxu_{tt} = c^2u_{xx} on R2\R^2 has the form u(t,x)=F(x−ct)+G(x+ct)u(t, x) = F(x - ct) + G(x + ct) with F,G∈C2(R)F, G \in C^2(\R). The solution with u(0,x)=φ(x)u(0, x) = \varphi(x) and ut(0,x)=ψ(x)u_t(0, x) = \psi(x) (φ∈C2\varphi \in C^2, ψ∈C1\psi \in C^1) is unique and given by

u(t,x)=φ(x−ct)+φ(x+ct)2+12c∫x−ctx+ctψ(s) ds.u(t, x) = \frac{\varphi(x - ct) + \varphi(x + ct)}{2} + \frac{1}{2c}\int_{x - ct}^{x + ct}\psi(s)\,ds.

Proof

Change to characteristic coordinates ξ=x−ct\xi = x - ct, η=x+ct\eta = x + ct, and write u(t,x)=w(ξ,η)u(t, x) = w(\xi, \eta). The chain rule gives ux=wξ+wηu_x = w_\xi + w_\eta, ut=c(wη−wξ)u_t = c(w_\eta - w_\xi), and

utt−c2uxx=c2(wξξ−2wξη+wηη)−c2(wξξ+2wξη+wηη)=−4c2wξη.u_{tt} - c^2u_{xx} = c^2(w_{\xi\xi} - 2w_{\xi\eta} + w_{\eta\eta}) - c^2(w_{\xi\xi} + 2w_{\xi\eta} + w_{\eta\eta}) = -4c^2 w_{\xi\eta}.

So wξη=0w_{\xi\eta} = 0. Then wξw_\xi does not depend on η\eta, say wξ=F′(ξ)w_\xi = F'(\xi), and w−F(ξ)w - F(\xi) has zero ξ\xi-derivative, so it is a function G(η)G(\eta). Conversely, every such sum solves the equation (proved in Lean below).

For the initial values: F+G=φF + G = \varphi and c(G′−F′)=ψc(G' - F') = \psi. Integrating the second, G−F=1c∫0xψ+CG - F = \frac1c\int_0^x\psi + C. Solving, F(x)=12φ(x)−12c∫0xψ−C2F(x) = \frac12\varphi(x) - \frac1{2c}\int_0^x\psi - \frac C2 and G(x)=12φ(x)+12c∫0xψ+C2G(x) = \frac12\varphi(x) + \frac1{2c}\int_0^x\psi + \frac C2. Substituting gives the formula, and since F,GF, G were forced, the solution is unique.

∎

The formula shows two physical facts. Finite speed of propagation: u(t,x)u(t, x) depends only on the data in [x−ct,x+ct][x - ct, x + ct], the domain of dependence, so disturbances travel at speed exactly cc. And no smoothing: a corner in φ\varphi travels along the lines x±ctx \pm ct forever, unlike for the heat equation.

ProofH

Maximum principles and energy

Theorem— Theorem 6 (weak maximum principle for the heat equation)

Let uu be continuous on the rectangle R=[0,T]×[0,L]R = [0, T] \times [0, L], with ut,uxxu_t, u_{xx} continuous for 0<t≤T0 < t \le T, 0<x<L0 < x < L, and ut=kuxxu_t = ku_{xx} there. Then the maximum of uu over RR is attained on the parabolic boundary Γ\Gamma: the bottom t=0t = 0 or the sides x=0x = 0, x=Lx = L.

Proof

Let M=max⁡ΓuM = \max_\Gamma u, and for ε>0\varepsilon > 0 put v=u+εx2v = u + \varepsilon x^2, so that vt−kvxx=−2kε<0v_t - kv_{xx} = -2k\varepsilon < 0 inside. Suppose vv attains its maximum over RR at a point (t0,x0)(t_0, x_0) not on Γ\Gamma, so 0<t0≤T0 < t_0 \le T and 0<x0<L0 < x_0 < L. In the xx-direction this is an interior maximum, so vxx(t0,x0)≤0v_{xx}(t_0, x_0) \le 0. In the tt-direction it is a maximum at an interior point or at the top edge t0=Tt_0 = T, so vt(t0,x0)≥0v_t(t_0, x_0) \ge 0. Then vt−kvxx≥0v_t - kv_{xx} \ge 0, a contradiction. So max⁡Rv=max⁡Γv≤M+εL2\max_R v = \max_\Gamma v \le M + \varepsilon L^2, hence u≤v≤M+εL2u \le v \le M + \varepsilon L^2 on RR. Let ε→0\varepsilon \to 0.

∎

(Without the εx2\varepsilon x^2 trick the argument fails: at an interior maximum of uu we only get ut≥0≥kuxxu_t \ge 0 \ge ku_{xx}, which is consistent with ut=kuxxu_t = ku_{xx}.)

Theorem— Corollary 7 (uniqueness and stability for the heat equation)

The Dirichlet problem ut=kuxxu_t = ku_{xx} on (0,T]×(0,L)(0, T] \times (0, L), u(0,x)=φ(x)u(0, x) = \varphi(x), u(t,0)=g(t)u(t, 0) = g(t), u(t,L)=h(t)u(t, L) = h(t) has at most one solution continuous on RR. If u1,u2u_1, u_2 solve it with initial data φ1,φ2\varphi_1, \varphi_2 and the same boundary data, then max⁡R∣u1−u2∣≤max⁡∣φ1−φ2∣\max_R|u_1 - u_2| \le \max|\varphi_1 - \varphi_2|.

Proof

w=u1−u2w = u_1 - u_2 solves the heat equation with zero boundary data. Apply Theorem 6 to ww and to −w-w.

∎

The energy method gives uniqueness by integration instead.

Theorem— Theorem 8 (energy identities)

(a) If ww is a smooth solution of wt=kwxxw_t = kw_{xx} on [0,L][0, L] with w(t,0)=w(t,L)=0w(t, 0) = w(t, L) = 0, then E(t)=∫0Lw2 dxE(t) = \int_0^Lw^2\,dx is non-increasing. (b) If ww is a smooth solution of wtt=c2wxxw_{tt} = c^2w_{xx} with the same boundary conditions, then E(t)=12∫0L(wt2+c2wx2) dxE(t) = \frac12\int_0^L\big(w_t^2 + c^2w_x^2\big)\,dx is constant. Consequently both Dirichlet problems have at most one smooth solution.

Proof

(a) E′(t)=2∫0Lwwt=2k∫0Lwwxx=2k[wwx]0L−2k∫0Lwx2=−2k∫0Lwx2≤0E'(t) = 2\int_0^Lww_t = 2k\int_0^Lww_{xx} = 2k\big[ww_x\big]_0^L - 2k\int_0^Lw_x^2 = -2k\int_0^Lw_x^2 \le 0. The boundary term vanishes because w=0w = 0 at both ends.

(b) E′(t)=∫0L(wtwtt+c2wxwxt)=c2∫0L(wtwxx+wxwxt)=c2[wtwx]0L=0E'(t) = \int_0^L(w_tw_{tt} + c^2w_xw_{xt}) = c^2\int_0^L(w_tw_{xx} + w_xw_{xt}) = c^2\big[w_tw_x\big]_0^L = 0, because wt=0w_t = 0 at the fixed ends.

For uniqueness, the difference of two solutions has zero initial data, so E(0)=0E(0) = 0. In (a) this gives E≡0E \equiv 0 and w≡0w \equiv 0. In (b) it gives wt=wx=0w_t = w_x = 0, so ww is constant, hence 00.

∎

For Laplace's equation the corresponding facts are the mean value property and the maximum principle.

Theorem— Theorem 9 (harmonic functions)

Let uu be harmonic (C2C^2 with Δu=0\Delta u = 0) on an open set U⊆R2U \subseteq \R^2. (a) If the closed disc B(p,r)‾\overline{B(p, r)} lies in UU, then u(p)=12π∫02πu(p+reiθ) dθu(p) = \frac{1}{2\pi}\int_0^{2\pi}u(p + re^{i\theta})\,d\theta. (b) If UU is connected and uu attains its maximum at a point of UU, then uu is constant. Hence on a bounded domain, a harmonic function continuous up to the boundary attains its maximum and minimum on the boundary, and the Dirichlet problem for Δu=0\Delta u = 0 has at most one solution.

Proof

(a) Let m(s)=12π∫02πu(p+seiθ) dθm(s) = \frac{1}{2\pi}\int_0^{2\pi}u(p + se^{i\theta})\,d\theta. Differentiating under the integral, m′(s)=12π∫02π∇u⋅eiθ dθ=12πs∮∣z−p∣=s∂u∂n dℓm'(s) = \frac{1}{2\pi}\int_0^{2\pi}\nabla u \cdot e^{i\theta}\,d\theta = \frac{1}{2\pi s}\oint_{|z-p|=s}\frac{\partial u}{\partial n}\,d\ell. By the divergence theorem this equals 12πs∬B(p,s)Δu=0\frac{1}{2\pi s}\iint_{B(p,s)}\Delta u = 0. So mm is constant, and m(s)→u(p)m(s) \to u(p) as s→0s \to 0 by continuity.

(b) The set where uu equals its maximum MM is closed in UU. It is also open: if u(p)=Mu(p) = M, the mean value property on every small circle around pp forces u=Mu = M on those circles (an average of values ≤M\le M equals MM only if all are MM, by continuity). By connectedness it is all of UU. For uniqueness, apply this to the difference of two solutions and its negative.

∎

Formal mathematicsF

PDEs and Fourier series in Lean and Mathlib

Mathlib has a substantial theory of Fourier series on the circle R/TZ\R/T\Z (the type AddCircle T) but, at this version, no library of partial differential equations. So the PDE results below are proved directly, by computing derivatives with the chain rule. Partial derivatives are written as ordinary derivatives of one-variable slices: utu_t at (t,x)(t, x) is deriv (fun s => u s x) t.

The separated solutions really solve their equations, and satisfy the boundary conditions:

heat_modeLean 4Proved here from basic factsFormally verified
/-- **A separated solution of the heat equation.** `u(t, x) = e^{-k n² t} sin(n x)` satisfies
`u_t = k u_xx`: differentiating in `t` brings down `-k n²`, and differentiating twice in `x`
brings down `-n²`. Both sides equal `-k n² e^{-k n² t} sin(n x)`. -/
theorem heat_mode (k n t x : ℝ) :
    deriv (fun s => exp (-k * n ^ 2 * s) * sin (n * x)) t =
      k * deriv (fun y => deriv (fun z => exp (-k * n ^ 2 * t) * sin (n * z)) y) x := by
  -- First and second derivatives in `x`.
  have hx1 : ∀ y, HasDerivAt (fun z => exp (-k * n ^ 2 * t) * sin (n * z))
      (exp (-k * n ^ 2 * t) * (cos (n * y) * n)) y := fun y =>
    (((hasDerivAt_id' y).const_mul n).sin.congr_deriv (by simp)).const_mul _
  have hfun : deriv (fun z => exp (-k * n ^ 2 * t) * sin (n * z)) =
      fun y => exp (-k * n ^ 2 * t) * (cos (n * y) * n) := funext fun y => (hx1 y).deriv
  have hx2 : HasDerivAt (fun y => exp (-k * n ^ 2 * t) * (cos (n * y) * n))
      (exp (-k * n ^ 2 * t) * (-sin (n * x) * n * n)) x := by
    have := ((((hasDerivAt_id' x).const_mul n).cos).mul_const n).const_mul (exp (-k * n ^ 2 * t))
    convert this using 1; ring
  -- The derivative in `t`.
  have ht : HasDerivAt (fun s => exp (-k * n ^ 2 * s) * sin (n * x))
      (exp (-k * n ^ 2 * t) * (-k * n ^ 2) * sin (n * x)) t := by
    have := (((hasDerivAt_id' t).const_mul (-k * n ^ 2)).exp).mul_const (sin (n * x))
    convert this using 1; ring
  rw [ht.deriv, hfun, hx2.deriv]
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
heat_mode_boundaryLean 4Proved here from basic factsFormally verified
/-- The heat mode `e^{-k n² t} sin(n x)` with `n` a natural number vanishes at both ends of
`[0, π]`, so it satisfies the Dirichlet boundary conditions `u(t, 0) = u(t, π) = 0` for all `t`.
(This is why the separation constants are `n²` with `n = 1, 2, 3, …`.) -/
theorem heat_mode_boundary (k t : ℝ) (n : ℕ) :
    exp (-k * (n : ℝ) ^ 2 * t) * sin (n * 0) = 0 ∧
      exp (-k * (n : ℝ) ^ 2 * t) * sin (n * π) = 0 := by
  constructor
  · simp
  · rw [sin_nat_mul_pi, mul_zero]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
laplace_modeLean 4Proved here from basic factsFormally verified
/-- **A separated solution of Laplace's equation.** `u(x, y) = e^{n y} sin(n x)` is harmonic:
`u_xx = -n² u` and `u_yy = n² u`, so `u_xx + u_yy = 0`. -/
theorem laplace_mode (n x y : ℝ) :
    deriv (fun a => deriv (fun b => exp (n * y) * sin (n * b)) a) x +
      deriv (fun a => deriv (fun b => exp (n * b) * sin (n * x)) a) y = 0 := by
  have h1 : deriv (fun b => exp (n * y) * sin (n * b)) = fun a => exp (n * y) * (cos (n * a) * n) :=
    funext fun a => ((((hasDerivAt_id' a).const_mul n).sin.congr_deriv (by simp)).const_mul _).deriv
  have h2 : deriv (fun b => exp (n * b) * sin (n * x)) = fun a => exp (n * a) * n * sin (n * x) := by
    funext a
    have := (((hasDerivAt_id' a).const_mul n).exp).mul_const (sin (n * x))
    rw [this.deriv]; ring
  have h3 : HasDerivAt (fun a => exp (n * y) * (cos (n * a) * n))
      (exp (n * y) * (-sin (n * x) * n * n)) x := by
    have := ((((hasDerivAt_id' x).const_mul n).cos).mul_const n).const_mul (exp (n * y))
    convert this using 1; ring
  have h4 : HasDerivAt (fun a => exp (n * a) * n * sin (n * x))
      (exp (n * y) * n * n * sin (n * x)) y := by
    have := ((((hasDerivAt_id' y).const_mul n).exp).mul_const n).mul_const (sin (n * x))
    convert this using 1; ring
  rw [h1, h2, h3.deriv, h4.deriv]
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor

d'Alembert's travelling waves solve the wave equation (the easy half of Theorem 5):

dalembert_solvesLean 4Proved here from basic factsFormally verified
/-- **d'Alembert's travelling waves solve the wave equation.** If `f` and `g` are twice
differentiable, then `u(t, x) = f(x - c t) + g(x + c t)` satisfies `u_tt = c² u_xx`. By the chain
rule `u_t = -c f'(x - c t) + c g'(x + c t)` and `u_tt = c² f''(x - c t) + c² g''(x + c t)`, while
`u_xx = f''(x - c t) + g''(x + c t)`. (The converse — every C² solution has this form — is proved
in the lesson by changing to the characteristic coordinates `x ± c t`.) -/
theorem dalembert_solves {f g : ℝ → ℝ} (hf : Differentiable ℝ f) (hf' : Differentiable ℝ (deriv f))
    (hg : Differentiable ℝ g) (hg' : Differentiable ℝ (deriv g)) (c t x : ℝ) :
    deriv (fun s => deriv (fun r => f (x - c * r) + g (x + c * r)) s) t =
      c ^ 2 * deriv (fun y => deriv (fun z => f (z - c * t) + g (z + c * t)) y) x := by
  -- Inner derivatives.
  have hin : ∀ s : ℝ, HasDerivAt (fun r => x - c * r) (-c) s := fun s => by
    simpa using ((hasDerivAt_id' s).const_mul c).const_sub x
  have hin' : ∀ s : ℝ, HasDerivAt (fun r => x + c * r) c s := fun s => by
    simpa using ((hasDerivAt_id' s).const_mul c).const_add x
  have ht1 : deriv (fun r => f (x - c * r) + g (x + c * r)) =
      fun s => deriv f (x - c * s) * (-c) + deriv g (x + c * s) * c := by
    funext s
    exact (((hf _).hasDerivAt.comp s (hin s)).add ((hg _).hasDerivAt.comp s (hin' s))).deriv
  have ht2 : HasDerivAt (fun s => deriv f (x - c * s) * (-c) + deriv g (x + c * s) * c)
      (deriv (deriv f) (x - c * t) * (-c) * (-c) + deriv (deriv g) (x + c * t) * c * c) t :=
    (((hf' _).hasDerivAt.comp t (hin t)).mul_const (-c)).add
      (((hg' _).hasDerivAt.comp t (hin' t)).mul_const c)
  have hsh : ∀ y : ℝ, HasDerivAt (fun z => z - c * t) 1 y := fun y => (hasDerivAt_id' y).sub_const _
  have hsh' : ∀ y : ℝ, HasDerivAt (fun z => z + c * t) 1 y := fun y => (hasDerivAt_id' y).add_const _
  have hx1 : deriv (fun z => f (z - c * t) + g (z + c * t)) =
      fun y => deriv f (y - c * t) + deriv g (y + c * t) := by
    funext y
    have := ((hf _).hasDerivAt.comp y (hsh y)).add ((hg _).hasDerivAt.comp y (hsh' y))
    rw [mul_one, mul_one] at this
    exact this.deriv
  have hx2 : HasDerivAt (fun y => deriv f (y - c * t) + deriv g (y + c * t))
      (deriv (deriv f) (x - c * t) + deriv (deriv g) (x + c * t)) x := by
    have := ((hf' _).hasDerivAt.comp x (hsh x)).add ((hg' _).hasDerivAt.comp x (hsh' x))
    rw [mul_one, mul_one] at this
    exact this
  rw [ht1, ht2.deriv, hx1, hx2.deriv]
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor

Orthogonality of the sine modes, from an explicit antiderivative and the second fundamental theorem of calculus:

sin_orthogonalLean 4Proved here from basic factsFormally verified
/-- **Orthogonality of sines on `[0, π]`.** For distinct natural numbers `m ≠ n`,
`∫₀^π sin(m x) sin(n x) dx = 0`. Proof: `sin a sin b = (cos(a - b) - cos(a + b))/2`, which has the
antiderivative `sin((m - n)x)/(2(m - n)) - sin((m + n)x)/(2(m + n))`; this vanishes at `0` and at
`π` because `sin(k π) = 0` for every integer `k`. This is what lets us read off Fourier sine
coefficients by integrating against `sin(n x)`. -/
theorem sin_orthogonal {m n : ℕ} (hmn : m ≠ n) :
    ∫ x in (0 : ℝ)..π, sin (m * x) * sin (n * x) = 0 := by
  have hd : (m : ℝ) - n ≠ 0 := sub_ne_zero.mpr (by exact_mod_cast hmn)
  have hs : (m : ℝ) + n ≠ 0 := by
    have : (0 : ℝ) < m + n := by
      rcases Nat.eq_zero_or_pos m with h | h
      · subst h; have : 0 < n := Nat.pos_of_ne_zero (Ne.symm hmn); simp; exact_mod_cast this
      · have : (0 : ℝ) < m := by exact_mod_cast h
        positivity
    exact this.ne'
  have hderiv : ∀ x ∈ Set.uIcc (0 : ℝ) π, HasDerivAt
      (fun x => sin ((m - n) * x) / (2 * (m - n)) - sin ((m + n) * x) / (2 * (m + n)))
      (sin (m * x) * sin (n * x)) x := by
    intro x _
    have h1 := (((hasDerivAt_id' x).const_mul ((m : ℝ) - n)).sin).div_const (2 * ((m : ℝ) - n))
    have h2 := (((hasDerivAt_id' x).const_mul ((m : ℝ) + n)).sin).div_const (2 * ((m : ℝ) + n))
    refine (h1.sub h2).congr_deriv ?_
    rw [show ((m : ℝ) - n) * x = (m * x) - (n * x) by ring,
      show ((m : ℝ) + n) * x = (m * x) + (n * x) by ring, cos_sub, cos_add]
    field_simp
    ring
  have hcont : Continuous fun x : ℝ => sin (m * x) * sin (n * x) := by fun_prop
  rw [intervalIntegral.integral_eq_sub_of_hasDerivAt hderiv (hcont.intervalIntegrable _ _)]
  have hk1 : sin (((m : ℝ) - n) * π) = 0 := by
    have := sin_int_mul_pi ((m : ℤ) - n); push_cast at this; exact this
  have hk2 : sin (((m : ℝ) + n) * π) = 0 := by
    have := sin_nat_mul_pi (m + n); push_cast at this; exact this
  simp [hk1, hk2]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor

A discrete analogue of the maximum principle (Theorem 6): the explicit finite-difference scheme, its convex-combination property when r=k Δt/Δx2≤12r = k\,\Delta t/\Delta x^2 \le \frac12, the resulting stability for all time, and the explosion of the sawtooth mode when r=1r = 1. These are the facts behind the computation section.

heatStepLean 4Formally verified
/-- One step of the explicit scheme for `u_t = k u_xx` on a grid of spacing `Δx` with time step
`Δt`: the new value at site `j` is `r u_{j-1} + (1 - 2r) u_j + r u_{j+1}`, where
`r = k Δt / Δx²`. (Sites are indexed by `ℤ`, an unbounded rod; boundary conditions are treated in
the lesson.) -/
def heatStep (r : ℝ) (u : ℤ → ℝ) : ℤ → ℝ :=
  fun j => r * u (j - 1) + (1 - 2 * r) * u j + r * u (j + 1)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
heatStep_boundedLean 4Proved here from basic factsFormally verified
/-- **Discrete maximum principle, one step.** If `0 ≤ r ≤ 1/2`, the new value is a *convex
combination* of three old values (the weights `r, 1 - 2r, r` are non-negative and sum to `1`), so
if all old values lie in `[m, M]`, so do all new ones. -/
theorem heatStep_bounded {r m M : ℝ} (hr0 : 0 ≤ r) (hr1 : r ≤ 1 / 2) {u : ℤ → ℝ}
    (hu : ∀ j, m ≤ u j ∧ u j ≤ M) (j : ℤ) : m ≤ heatStep r u j ∧ heatStep r u j ≤ M := by
  have hw : 0 ≤ 1 - 2 * r := by linarith
  obtain ⟨a1, a2⟩ := hu (j - 1)
  obtain ⟨b1, b2⟩ := hu j
  obtain ⟨c1, c2⟩ := hu (j + 1)
  simp only [heatStep]
  constructor
  · nlinarith [mul_le_mul_of_nonneg_left a1 hr0, mul_le_mul_of_nonneg_left b1 hw,
      mul_le_mul_of_nonneg_left c1 hr0]
  · nlinarith [mul_le_mul_of_nonneg_left a2 hr0, mul_le_mul_of_nonneg_left b2 hw,
      mul_le_mul_of_nonneg_left c2 hr0]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
heat_iterate_boundedLean 4Proved here from basic factsFormally verified
/-- **Discrete maximum principle, all time.** With `0 ≤ r ≤ 1/2`, after any number of steps the
solution stays between the minimum and maximum of the initial data. In particular the scheme is
*stable* in the maximum norm: errors in the data are never amplified. Induction on the number of
steps, using `heatStep_bounded`. -/
theorem heat_iterate_bounded {r m M : ℝ} (hr0 : 0 ≤ r) (hr1 : r ≤ 1 / 2) {u : ℤ → ℝ}
    (hu : ∀ j, m ≤ u j ∧ u j ≤ M) (steps : ℕ) (j : ℤ) :
    m ≤ (heatStep r)^[steps] u j ∧ (heatStep r)^[steps] u j ≤ M := by
  induction steps generalizing j with
  | zero => exact hu j
  | succ s ih =>
    rw [Function.iterate_succ_apply']
    exact heatStep_bounded hr0 hr1 ih j
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
heat_step_unstableLean 4Proved here from basic factsFormally verified
/-- **Instability when `r > 1/2`.** With `r = 1`, the sawtooth `u_j = (-1)^j` is multiplied by
`1 - 4r = -3` at every step, so after `N` steps it has grown by `3^N`: rounding errors of this
shape explode. In general this mode is multiplied by `1 - 4r`, which has absolute value at most
`1` exactly when `0 ≤ r ≤ 1/2` (von Neumann's stability condition). -/
theorem heat_step_unstable (j : ℤ) :
    heatStep 1 (fun i => (-1 : ℝ) ^ i) j = -3 * (-1 : ℝ) ^ j := by
  simp only [heatStep]
  rw [zpow_sub_one₀ (by norm_num), zpow_add_one₀ (by norm_num)]
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor

Mathlib's Fourier theory, for the circle R/TZ\R/T\Z with normalised Haar measure (for T=2πT = 2\pi this is the measure dx2π\frac{dx}{2\pi} of the lesson). It covers the orthonormal exponentials, L2L^2 convergence (the exponentials form a Hilbert basis), Parseval's identity (Theorem 3), uniform convergence for absolutely summable coefficients (the mechanism of Theorem 4(c)), and the Basel sum:

fourier_orthonormalLean 4Applies a library theoremFormally verified
/-- **The exponentials `e_n(x) = e^{2π i n x / T}` are orthonormal in `L²` of the circle
`ℝ/Tℤ`** (with normalised Haar measure). This applies Mathlib's `orthonormal_fourier`. -/
theorem fourier_orthonormal (T : ℝ) [Fact (0 < T)] :
    Orthonormal ℂ (@fourierLp T _ 2 _) :=
  orthonormal_fourier
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
fourier_series_l2Lean 4Applies a library theoremFormally verified
/-- **Fourier series converge in `L²`.** For every square-integrable `f` on the circle,
`∑ₙ f̂(n) eₙ = f` with convergence in the `L²` norm: the exponentials form a Hilbert basis.
This applies Mathlib's `hasSum_fourier_series_L2`. -/
theorem fourier_series_l2 (T : ℝ) [Fact (0 < T)] (f : Lp ℂ 2 (@AddCircle.haarAddCircle T _)) :
    HasSum (fun i => fourierCoeff f i • fourierLp 2 i) f :=
  hasSum_fourier_series_L2 f
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
parsevalLean 4Applies a library theoremFormally verified
/-- **Parseval's identity**: `∑ₙ |f̂(n)|² = ∫ |f|²` (normalised measure on the circle). This
applies Mathlib's `tsum_sq_fourierCoeff`. -/
theorem parseval (T : ℝ) [Fact (0 < T)] (f : Lp ℂ 2 (@AddCircle.haarAddCircle T _)) :
    ∑' i : ℤ, ‖fourierCoeff f i‖ ^ 2 = ∫ t, ‖f t‖ ^ 2 ∂AddCircle.haarAddCircle :=
  tsum_sq_fourierCoeff f
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
fourier_uniformLean 4Applies a library theoremFormally verified
/-- **Absolutely summable coefficients give uniform convergence.** If `f` is continuous on the
circle and `∑ |f̂(n)| < ∞` (summability in `ℂ`), then the Fourier series converges to `f` in the
sup norm of `C(ℝ/Tℤ, ℂ)`, hence uniformly and at every point. This applies Mathlib's
`hasSum_fourier_series_of_summable`. -/
theorem fourier_uniform (T : ℝ) [Fact (0 < T)] (f : C(AddCircle T, ℂ))
    (h : Summable (fourierCoeff f)) :
    HasSum (fun i => fourierCoeff f i • fourier i) f :=
  hasSum_fourier_series_of_summable h
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor
baselLean 4Applies a library theoremFormally verified
/-- **Basel problem**: `∑_{n ≥ 1} 1/n² = π²/6`. The lesson derives it from Parseval's identity for
the sawtooth `f(x) = x` on `(-π, π)`; Mathlib proves it (`hasSum_zeta_two`) via Bernoulli
polynomials and Fourier series. (The `n = 0` term is `1/0 = 0` in Lean's conventions.) -/
theorem basel : HasSum (fun n : ℕ => (1 : ℝ) / (n : ℝ) ^ 2) (π ^ 2 / 6) :=
  hasSum_zeta_two
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/PdeIntro.leanTry it in the Lean web editor

What is and is not formalised. Proved here: that the heat, Laplace and d'Alembert solutions satisfy their equations and boundary conditions, the orthogonality of sines on [0,π][0, \pi], and the discrete maximum principle with its stability threshold. Cited from Mathlib: orthonormality, L2L^2 convergence, Parseval, uniform convergence for summable coefficients, and Basel. Not formalised: Theorem 1's term-by-term differentiation, Dirichlet's pointwise theorem, the Gibbs constant, the converse half of d'Alembert's theorem, the continuous maximum principles, the energy identities and the mean value property.

ComputationC

Overshoots, sums and schemes

The first program measures the two faces of Fourier convergence. On one side, the partial sums of the square wave, evaluated exactly at their first peak x=π2nx = \frac{\pi}{2n}, settle at 1.17898…1.17898\ldots rather than 11. On the other, Parseval's identity for the sawtooth produces ∑1/n2\sum 1/n^2, whose partial sums approach π2/6\pi^2/6 with error almost exactly 1/N1/N.

Fourier series: Gibbs overshoot and Parseval's identityPythonNumerical approximationComputationally tested
"""Fourier series: the Gibbs overshoot and Parseval's identity, measured.

The square wave sign(sin x) has Fourier series (4/pi) * sum over odd k of
sin(kx)/k. Its partial sum with n non-zero terms, S_n, has derivative
(2/pi) sin(2nx)/sin(x), so its first maximum to the right of the jump at 0 is
at x = pi/(2n), exactly. We evaluate S_n there: the peak does not shrink to 1
but tends to (2/pi) Si(pi) = 1.17898..., an overshoot of about 9% of the jump.
At x = 0 every partial sum is 0, the average of the one-sided limits, as
Dirichlet's theorem predicts. Then Parseval's identity for the sawtooth
f(x) = x on (-pi, pi), whose sine coefficients are 2(-1)^(n+1)/n, gives
sum 1/n^2 = pi^2/6; we watch the partial sums close in, with error ~ 1/N.

Evidence: numerical (floating point, Simpson's rule for Si(pi)), with the
locations of the maxima and the Parseval formula derived exactly.
"""

import math

def square_partial(x, n):
    """S_n(x) = (4/pi) * sum_{j=1..n} sin((2j-1)x)/(2j-1)."""
    return 4 / math.pi * sum(math.sin((2 * j - 1) * x) / (2 * j - 1)
                             for j in range(1, n + 1))

def first_peak(n):
    """Value of S_n at its first maximum to the right of 0, x = pi/(2n)."""
    return square_partial(math.pi / (2 * n), n)

def sine_integral(x, steps=2000):
    """Si(x) = integral of sin(t)/t from 0 to x, by Simpson's rule."""
    if steps % 2:
        raise ValueError("steps must be even")
    f = lambda t: 1.0 if t == 0 else math.sin(t) / t
    h = x / steps
    s = f(0) + f(x)
    s += 4 * sum(f((2 * i - 1) * h) for i in range(1, steps // 2 + 1))
    s += 2 * sum(f(2 * i * h) for i in range(1, steps // 2))
    return s * h / 3

def gibbs_limit():
    """(2/pi) Si(pi), the limit of the first peaks."""
    return 2 / math.pi * sine_integral(math.pi)

def sawtooth_coefficient(n):
    """b_n = (1/pi) * integral of x sin(nx) over (-pi, pi) = 2(-1)^(n+1)/n."""
    return 2 * (-1) ** (n + 1) / n

def parseval_partial(N):
    """(1/4) * sum_{n<=N} b_n^2, which Parseval says tends to pi^2/6."""
    return sum(sawtooth_coefficient(n) ** 2 for n in range(1, N + 1)) / 4

def main():
    g = gibbs_limit()
    print("Square wave sign(sin x): peak of S_n at x = pi/(2n)")
    print("     n      peak    S_n(0)   S_n(pi/2)")
    for n in [1, 5, 10, 50, 200, 1000]:
        print(f"{n:6d}   {first_peak(n):.5f}   {square_partial(0.0, n):+.1f}"
              f"   {square_partial(math.pi / 2, n):.5f}")
    print(f"limit (2/pi) Si(pi) = {g:.5f}: overshoot {100 * (g - 1) / 2:.2f}%"
          " of the jump")
    print("The peak moves towards the jump but never shrinks: the convergence")
    print("is pointwise, not uniform, near a discontinuity.")
    print()
    print("Parseval for f(x) = x on (-pi, pi): sum 1/n^2 = pi^2/6")
    print("      N    partial sum      error   N * error")
    for N in [10, 100, 1000, 10000]:
        err = math.pi ** 2 / 6 - parseval_partial(N)
        print(f"{N:7d}   {parseval_partial(N):.9f}   {err:.2e}   {N * err:.4f}")
    print()
    print("Epistemic status: numerical evidence. The peak locations and the")
    print("coefficients are derived exactly; the values are floating-point")
    print("and Si(pi) comes from Simpson's rule. Finitely many n cannot prove")
    print("the limits; the Gibbs constant and Parseval's identity are proved")
    print("in the lesson and its references.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Notice that Sn(0)=0S_n(0) = 0 for every nn, the average of the one-sided limits ±1\pm 1, as Theorem 4(b) predicts. The values at π/2\pi/2 converge to 11, slowly and with oscillation, because the coefficients only decay like 1/n1/n. All of this is numerical evidence about finitely many nn. The limits are theorems.

The second program solves the heat equation twice: by the Fourier sine series of the third example, and by the explicit finite-difference scheme, which replaces utu_t and uxxu_{xx} by difference quotients on a grid. With r=Δt/Δx2≤12r = \Delta t/\Delta x^2 \le \frac12 every new value is a weighted average of old ones, and the scheme obeys a discrete maximum principle — proved in Lean above. With r=0.6r = 0.6 the grid's most oscillatory mode is multiplied by about 1−4r=−1.41 - 4r = -1.4 per step, and the computation explodes.

Heat equation: series solution versus finite differencesPythonNumerical approximationComputationally tested
"""The heat equation on a computer: series solution versus finite differences.

We solve u_t = u_xx on [0, pi] with u = 0 at both ends and u(0, x) = x(pi - x).
Separation of variables gives the exact solution
    u(t, x) = sum over odd n of (8 / (pi n^3)) exp(-n^2 t) sin(n x).
The explicit scheme replaces u_t and u_xx by difference quotients:
    u_j <- r u_(j-1) + (1 - 2r) u_j + r u_(j+1),  r = dt / dx^2.
For r <= 1/2 each new value is an average of old ones (discrete maximum
principle), the scheme is stable, and its error shrinks like dx^2. For
r > 1/2 the highest grid mode is multiplied by about 1 - 4r < -1 per step and
the computation explodes. Evidence: numerical; the series is summed to 200
terms (truncation error below 1e-6).
"""

import math

def exact(t, x, terms=200):
    """Fourier sine series solution for initial data x(pi - x)."""
    return sum(8 / (math.pi * n ** 3) * math.exp(-n * n * t) * math.sin(n * x)
               for n in range(1, 2 * terms, 2))

def step(u, r):
    """One explicit step with fixed zero boundary values u[0] = u[-1] = 0."""
    new = [0.0] * len(u)
    for j in range(1, len(u) - 1):
        new[j] = r * u[j - 1] + (1 - 2 * r) * u[j] + r * u[j + 1]
    return new

def solve(intervals, r, t_end):
    """Run the scheme to (about) t_end; return (grid, values, t, max seen)."""
    dx = math.pi / intervals
    dt = r * dx * dx
    steps = max(1, round(t_end / dt))
    xs = [j * dx for j in range(intervals + 1)]
    u = [x * (math.pi - x) for x in xs]
    u[-1] = 0.0
    top = max(u)
    for _ in range(steps):
        u = step(u, r)
        top = max(top, max(u))
    return xs, u, steps * dt, top

def max_error(intervals, r, t_end):
    """Largest |scheme - exact| over the grid at the final time."""
    xs, u, t, _ = solve(intervals, r, t_end)
    return max(abs(a - exact(t, x)) for x, a in zip(xs, u))

def main():
    peak0 = (math.pi / 2) ** 2
    print("u_t = u_xx on [0, pi], u(0, x) = x(pi - x), compared at t = 0.5")
    print("  r     max error (20 intervals)   largest value ever / initial max")
    for r in [0.25, 0.4, 0.5, 0.6]:
        _, _, _, top = solve(20, r, 0.5)
        print(f" {r:4.2f}   {max_error(20, r, 0.5):24.3e}   {top / peak0:18.3g}")
    print()
    print("Refining the grid with r = 0.4 fixed (error should fall ~ dx^2):")
    prev = None
    for n in [10, 20, 40]:
        e = max_error(n, 0.4, 0.5)
        ratio = "" if prev is None else f"   ratio {prev / e:.2f}"
        print(f"  {n:3d} intervals: max error {e:.3e}{ratio}")
        prev = e
    print()
    print("Epistemic status: numerical experiment. The series solution and the")
    print("stability threshold r = 1/2 are proved in the lesson (the discrete")
    print("maximum principle is also checked in Lean); the table only shows")
    print("them at work for one initial condition and a few grids.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

With r=0.4r = 0.4 fixed, halving Δx\Delta x divides the error by about 44: the scheme is second-order accurate in space. The stability condition r≤12r \le \frac12 is severe — halving Δx\Delta x forces four times as many time steps. That is why implicit schemes, which have no such restriction, are used in practice, as discussed in numerical analysis.

Explore

Explore: heat, harmonics and travelling waves

Heat smooths. The curve is the initial temperature x(π−x)x(\pi - x); the other is the first four terms of the series solution at time tt. Move tt: the higher modes, with decay rates 9,25,499, 25, 49, vanish almost at once, and the profile becomes a pure, shrinking sine.

The heat equation on [0, π]

Move the sliders and trace along the curves to read off values.

  • u(0, x) = x(π − x)
  • u(t, x), four terms
  • u(0, x) = x(π − x): y = 2.1416
  • u(t, x), four terms: y = 1.9427

Fourier series and the Gibbs overshoot. Add terms to the square-wave series. The partial sums converge at every point, but the spike next to each jump only gets narrower, never shorter: about 9%9\% of the jump, for ever.

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.

Travelling waves. d'Alembert's solution with initial bump e−x2e^{-x^2} and zero initial velocity splits into two half-height bumps moving apart at speed 11. Corners would travel just the same — there is no smoothing.

d'Alembert: u = ½φ(x − t) + ½φ(x + t)

Move the sliders and trace along the curves to read off values.

  • u(t, x)
  • u(t, x): y = 0.3679

Modes of a string. The nn-th standing wave sin⁡(nx)cos⁡(nt)\sin(nx)\cos(nt) on [0,π][0, \pi]: n−1n - 1 points (nodes) never move, and the time period is 2π/n2\pi/n.

Standing waves on a string

Move the sliders and trace along the curves to read off values.

  • y = sin(n·x)·cos(n·t)
  • y = 0.9093
Exercises

Exercises

1. Partial differential equations and Fourier series

Warm-upHuman

Which function solves the heat equation ut=uxxu_t = u_{xx}?

Choose one

2. Partial differential equations and Fourier series

Warm-upHuman

Let f(x)=3sin⁡x−5sin⁡4xf(x) = 3\sin x - 5\sin 4x on [0,π][0, \pi]. What is its Fourier sine coefficient b4=2π∫0πf(x)sin⁡4x dxb_4 = \frac{2}{\pi}\int_0^\pi f(x)\sin 4x\,dx?

3. Partial differential equations and Fourier series

CoreHuman

Solve utt=4uxxu_{tt} = 4u_{xx} on R\R with u(0,x)=x2u(0, x) = x^2 and ut(0,x)=0u_t(0, x) = 0. What is u(1,0)u(1, 0)?

4. Partial differential equations and Fourier series

CoreHuman

Let SNS_N be the partial sums of the Fourier series of the square wave f=sign⁡(sin⁡x)f = \operatorname{sign}(\sin x). Which statements are true? Choose all that apply.

Choose all that apply

5. Partial differential equations and Fourier series

CoreHuman

In the proof of the weak maximum principle (Theorem 6), why do we work with v=u+εx2v = u + \varepsilon x^2 rather than with uu itself?

Choose one

6. Partial differential equations and Fourier series

CoreFormal

Let u : ℝ → ℝ → ℝ take time first, u t x. Which Lean statement says that u satisfies the heat equation u_t = k u_xx at the point (t, x)?

Choose one

7. Partial differential equations and Fourier series

CoreHuman

Apply Parseval's identity to the square wave f=sign⁡(sin⁡x)f = \operatorname{sign}(\sin x), whose sine coefficients are bn=4πnb_n = \frac{4}{\pi n} for odd nn and 00 for even nn. In the real form, Parseval reads 1π∫−ππf2 dx=a022+∑n≥1(an2+bn2)\frac1\pi\int_{-\pi}^{\pi} f^2\,dx = \frac{a_0^2}{2} + \sum_{n\ge1}(a_n^2 + b_n^2). You get ∑n odd1n2=π2k\displaystyle\sum_{n \text{ odd}}\frac{1}{n^2} = \frac{\pi^2}{k}. What is kk?

8. Partial differential equations and Fourier series

CoreComputational

Write sine_coefficients(f, N, M) returning the list [b_1, ..., b_N] of Fourier sine coefficients bn=2π∫0πf(x)sin⁡(nx) dxb_n = \frac{2}{\pi}\int_0^\pi f(x)\sin(nx)\,dx of f on [0,π][0, \pi], each computed by the midpoint rule with M subintervals.

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

9. Partial differential equations and Fourier series

StretchHuman

On (−π,π)(-\pi, \pi), x=2∑n≥1(−1)n+1sin⁡nxnx = 2\sum_{n\ge1}(-1)^{n+1}\frac{\sin nx}{n} and x2=π23+4∑n≥1(−1)ncos⁡nxn2x^2 = \frac{\pi^2}{3} + 4\sum_{n\ge1}(-1)^n\frac{\cos nx}{n^2}. Which statements are true? Choose all that apply.

Choose all that apply

10. Partial differential equations and Fourier series

StretchHuman

For n≥1n \ge 1, un(x,y)=sin⁡(nx)sinh⁡(ny)n2u_n(x, y) = \dfrac{\sin(nx)\sinh(ny)}{n^2} solves Laplace's equation with un(x,0)=0u_n(x, 0) = 0 and ∂yun(x,0)=sin⁡nxn\partial_y u_n(x, 0) = \dfrac{\sin nx}{n}. Which conclusion is correct?

Choose one
Common misconceptionsH

Common misconceptions

Misconception

"The Fourier series of a continuous function converges to it at every point." False: du Bois-Reymond (1873) found a continuous periodic function whose Fourier series diverges at a point, and later constructions make it diverge on any prescribed set of measure zero. What is true: convergence at every point where ff is differentiable, or Lipschitz, or where Dini's condition holds (Theorem 4); uniform convergence for continuous piecewise C1C^1 functions; uniform convergence of the Fejér averages for every continuous function; and almost-everywhere convergence for square-integrable functions (Carleson).

Misconception

"A Fourier series can always be differentiated term by term." The sawtooth x=2∑(−1)n+1sin⁡nxnx = 2\sum(-1)^{n+1}\frac{\sin nx}{n} differentiates to a series whose terms do not tend to 00. Term-by-term differentiation is justified when the function is continuous and piecewise C1C^1 as a periodic function (no jump where the period wraps around), or when the differentiated series converges uniformly. In Theorem 1 the factor e−kn2te^{-kn^2t} provides exactly that.

Misconception

"Convergence in L2L^2 means convergence at each point." L2L^2 convergence controls an average of ∣f−SNf∣2|f - S_Nf|^2. It allows small sets of bad points, such as the Gibbs spikes, whose width shrinks while their height does not. Conversely, pointwise convergence does not imply L2L^2 convergence for general sequences of functions.

Misconception

"If a solution exists and is unique, the problem is fine." Hadamard's example — Laplace's equation with initial data — has unique solutions that do not depend continuously on the data. The backward heat equation is another example. In a computation, data always carry small errors, so continuous dependence is not optional.

Misconception

"Separation of variables finds all solutions." It finds the separated ones. That their superpositions give every solution needs two more facts: the completeness of the sine functions (Parseval) and the uniqueness theorems of the last section.

ViewpointsH

Many ways of seeing

Analysis— An orthonormal basis of a Hilbert space

The space L2(−π,π)L^2(-\pi, \pi) of square-integrable functions, with ⟨f,g⟩=12π∫fgˉ\langle f, g\rangle = \frac{1}{2\pi}\int f\bar g, is a Hilbert space: an inner product space that is complete (the Riesz–Fischer theorem, which needs the Lebesgue integral). The exponentials einxe^{inx} form an orthonormal basis, and the map f↦(f^(n))n∈Zf \mapsto (\hat f(n))_{n\in\Z} is an isometric isomorphism onto ℓ2(Z)\ell^2(\Z) — Parseval's identity. Separation of variables is the spectral theorem in disguise: sin⁡nx\sin nx are the eigenfunctions of the self-adjoint operator −d2dx2-\frac{d^2}{dx^2} with Dirichlet conditions, with eigenvalues n2n^2, and the heat equation is solved by e−tk(−d2/dx2)e^{-tk(-d^2/dx^2)}. See functional analysis and harmonic analysis.

Physics— Heat, strings and quantum energy levels

Fourier derived the heat equation from conservation of energy and his law of conduction, and the wave equation comes from Newton's second law for a string. The eigenvalue problem −X′′=λX-X'' = \lambda X reappears as the time-independent Schrödinger equation −ℏ22mX′′=EX-\frac{\hbar^2}{2m}X'' = EX for a particle in a box [0,π][0, \pi]. Its energy levels En=ℏ2n22mE_n = \frac{\hbar^2 n^2}{2m} are the separation constants of this lesson, and quantisation is the boundary condition. Physical intuition also suggests theorems: conservation of energy for the string is Theorem 8(b), and "heat never makes a new hot spot" is Theorem 6. See quantum mechanics.

Geometry— Can one hear the shape of a drum?

On a bounded domain Ω⊂R2\Omega \subset \R^2 (a drum), the Dirichlet eigenvalues 0<λ1<λ2≤⋯0 < \lambda_1 < \lambda_2 \le \cdots of −Δ-\Delta are the squares of the frequencies the drum can sound. Weyl's law (1911) says that the number of eigenvalues below λ\lambda is asymptotic to area⁡(Ω)4πλ\frac{\operatorname{area}(\Omega)}{4\pi}\lambda, so the sound determines the area. Mark Kac asked in 1966 whether it determines the shape. The answer is no: Gordon, Webb and Wolpert (1992) found two different polygons with exactly the same eigenvalues. On a Riemannian manifold the same questions lead to the heat kernel, whose short-time expansion encodes curvature, and to the heat-equation proof of the Atiyah–Singer index theorem.

Probability— Heat is the average of random walks

With r=12r = \frac12, the explicit scheme reads ujnew=12(uj−1+uj+1)u_j^{\text{new}} = \frac12(u_{j-1} + u_{j+1}): the new temperature is the expected old temperature seen by a walker who steps left or right with probability 12\frac12. In the limit, the solution of ut=12uxxu_t = \frac12u_{xx} on R\R is u(t,x)=E[φ(x+Bt)]u(t, x) = \mathbb E[\varphi(x + B_t)], with BtB_t a Brownian motion. The heat kernel 12πte−x2/2t\frac{1}{\sqrt{2\pi t}}e^{-x^2/2t} is the normal density of variance tt. Harmonic functions become exit probabilities: the solution of the Dirichlet problem on Ω\Omega at pp is the expected boundary value at the point where a Brownian path from pp first leaves Ω\Omega (Kakutani, 1944). The mean value property is the symmetry of Brownian motion. See stochastic processes.

Algebra— Characters of the circle group

The functions en(x)=einxe_n(x) = e^{inx} are exactly the continuous homomorphisms from the circle group R/2πZ\R/2\pi\Z to the unit circle in C\C: en(x+y)=en(x)en(y)e_n(x + y) = e_n(x)e_n(y). They are its characters, and Fourier analysis is the representation theory of this abelian group. Translation f↦f(⋅−a)f \mapsto f(\cdot - a) multiplies f^(n)\hat f(n) by e−inae^{-ina}, and differentiation multiplies it by inin. So every translation-invariant linear operator — differential operators with constant coefficients, convolutions — becomes diagonal, and that is why Fourier series solve constant-coefficient PDEs. Replacing the circle by a finite cyclic group gives the discrete Fourier transform, computed by the fast Fourier transform. A compact non-abelian group gives the Peter–Weyl theorem.

History & global context

History and global context

  • Vibrating strings. Jean le Rond d'Alembert derived and solved the wave equation in 1747. Leonhard Euler and Daniel Bernoulli (1753) argued over whether every solution is a superposition of sine modes, a debate that turned on what a "function" is.
  • Heat. Joseph Fourier submitted his memoir on heat conduction to the Paris Academy in 1807 and published Théorie analytique de la chaleur in 1822. His claim that arbitrary functions are sums of sines was resisted, but his solutions worked.
  • Rigour. Peter Gustav Lejeune Dirichlet proved the first convergence theorem in 1829. Bernhard Riemann's 1854 habilitation on trigonometric series introduced the Riemann integral and the localisation principle. Georg Cantor's work on the uniqueness of trigonometric series (1870s) led him to set theory. Paul du Bois-Reymond published his divergent example in 1873.
  • Gibbs. The overshoot was found by Henry Wilbraham in 1848, rediscovered by J. Willard Gibbs in 1898–1899 after the physicist Albert Michelson's harmonic analyser showed it, and named after Gibbs by Maxime Bôcher (1906).
  • The twentieth century. Lipót Fejér proved his theorem in 1900, aged twenty. Andrey Kolmogorov found divergent Fourier series of integrable functions (1923, 1926), and Lennart Carleson proved almost-everywhere convergence for L2L^2 (1966). On the PDE side, Sofia Kovalevskaya's 1875 thesis gave the Cauchy–Kovalevskaya existence theorem for analytic data, and Jacques Hadamard (1902) introduced well-posedness. Modern PDE theory builds on Sobolev spaces and weak solutions (Sergei Sobolev and Laurent Schwartz in the 1930s–1950s, Olga Ladyzhenskaya and many others); see the modern theory of PDEs.
Further reading

Further reading

  • Walter A. Strauss, Partial Differential Equations: An Introduction (1992; 2nd edition 2008) — the standard first course; separation of variables, maximum principles and energy methods as here.
  • Elias M. Stein and Rami Shakarchi, Fourier Analysis: An Introduction (2003) — rigorous Fourier series, Fejér, Parseval and applications to PDEs.
  • T. W. Körner, Fourier Analysis (1988) — a wonderful collection of short chapters on the mathematics and its history.
  • Lawrence C. Evans, Partial Differential Equations (1998; 2nd edition 2010) — the next step: weak solutions and Sobolev spaces.