6.6 The heat equation and Laplace’s equation

The wave equation, separation of variables, characteristics — the previous two lessons have built up the hyperbolic picture of PDEs, the one acoustics lives in. To finish the chapter we cover the two other canonical second-order linear PDEs: the heat equation (parabolic) and Laplace’s equation (elliptic). They are less central to the Sound book but appear repeatedly across the bookshelf — in thermal absorption, in the steady acoustic potential of an incompressible flow, in the diffusion of cochlear-amplifier energy along the basilar membrane — so a reader should leave Foundations 6 knowing how each is set up, what kind of data it demands, and why its behaviour is so qualitatively different from a wave equation.

The heat equation

The 1-D heat equation is

ut  =  D2ux2,\frac{\partial u}{\partial t} \;=\; D\, \frac{\partial^2 u}{\partial x^2},

with D>0D > 0 the diffusivity. The equation arises whenever a quantity is conserved (mass, energy, charge) and its flux is proportional to the gradient of the quantity itself — Fourier’s law of heat conduction, Fick’s law for chemical diffusion, Ohm’s law for current. The one time derivative on the left (compared to two in the wave equation) is what changes the entire character of the solutions: instead of propagation at finite speed, the heat equation produces immediate, everywhere smoothing.

u(x, t = 0.00)
initial:

The heat equation has *one* time derivative and *two* spatial derivatives. Sharp features diffuse and smooth out. Information *does not propagate at finite speed* — every initial point affects every other instantaneously (with exponentially small amplitude). Contrast the wave equation, which preserves shape.

Pick an initial profile and a diffusivity. The field smooths out and decays toward zero. Three features deserve attention:

Separation of variables for heat

The same algorithm from 6.3 — with the boundary conditions from 6.4 and the mode-sum machinery from 6.5 — carries through with one change: the time ODE is now first order rather than second order.

Worked example: every step, no shortcuts

The problem. A rod of length LL has its endpoints held at zero temperature and is given an initial temperature profile u(x,0)=f(x)u(x, 0) = f(x). The temperature obeys

ut  =  D2ux2,0<x<L,t>0,\frac{\partial u}{\partial t} \;=\; D\, \frac{\partial^2 u}{\partial x^2}, \qquad 0 < x < L, \quad t > 0,

with boundary conditions u(0,t)=u(L,t)=0u(0, t) = u(L, t) = 0 for all tt.

Step 1 — Product ansatz. Try

u(x,t)  =  X(x)T(t).u(x, t) \;=\; X(x)\, T(t).

Compute the partial derivatives:

ut  =  X(x)T(t),2ux2  =  X(x)T(t).\frac{\partial u}{\partial t} \;=\; X(x)\, T'(t), \qquad \frac{\partial^2 u}{\partial x^2} \;=\; X''(x)\, T(t).

Substituting:

X(x)T(t)  =  DX(x)T(t).X(x)\, T'(t) \;=\; D\, X''(x)\, T(t).

Step 2 — Divide by DX(x)T(t)D\, X(x)\, T(t) and separate.

T(t)DT(t)  =  X(x)X(x).\frac{T'(t)}{D\, T(t)} \;=\; \frac{X''(x)}{X(x)}.

The left depends only on tt; the right depends only on xx. Both must equal a common constant; call it k2-k^2:

T(t)DT(t)  =  X(x)X(x)  =  k2.\frac{T'(t)}{D\, T(t)} \;=\; \frac{X''(x)}{X(x)} \;=\; -k^2.

The PDE has decoupled into two ODEs:

X(x)  +  k2X(x)  =  0,T(t)  +  Dk2T(t)  =  0.X''(x) \;+\; k^2\, X(x) \;=\; 0, \qquad T'(t) \;+\; D k^2\, T(t) \;=\; 0.

Notice the spatial ODE is exactly the same as in the wave-equation case. Only the time ODE has changed — it is now first order, not second order, because the heat equation has one time derivative rather than two.

Step 3 — Solve the spatial ODE with its boundary conditions. The equation X+k2X=0X'' + k^2 X = 0 with X(0)=X(L)=0X(0) = X(L) = 0 is the clamped-string problem from 6.3. Same algebra, same conclusion: allowed wavenumbers

kn  =  nπL,n=1,2,3,,k_n \;=\; \frac{n \pi}{L}, \qquad n = 1, 2, 3, \ldots,

with mode shapes

Xn(x)  =  sin ⁣(nπxL).X_n(x) \;=\; \sin\!\left(\frac{n \pi x}{L}\right).

Step 4 — Solve the time ODE for each mode. For each knk_n, the time equation is

Tn(t)  +  Dkn2Tn(t)  =  0,T'_n(t) \;+\; D k_n^2\, T_n(t) \;=\; 0,

a first-order linear ODE with constant coefficient — exponential decay from 5.2. The solution is

Tn(t)  =  AneDkn2t.T_n(t) \;=\; A_n\, e^{-D k_n^2\, t}.

Each mode decays at a rate Dkn2D k_n^2 that grows quadratically with mode number. The fundamental (n=1n = 1) decays slowest; high-nn modes vanish quickly.

Step 5 — Build the general solution. By linearity, any sum of the separated solutions also satisfies the PDE and the boundary conditions:

u(x,t)  =  n=1Ansin ⁣(nπxL)eD(nπ/L)2t.u(x, t) \;=\; \sum_{n=1}^\infty A_n\, \sin\!\left(\frac{n \pi x}{L}\right) e^{-D (n \pi / L)^2\, t}.

There is only one set of free coefficients {An}\{A_n\}, because the time ODE is first order — exactly the bookkeeping from 5.1. The heat equation needs one initial function, not two.

Step 6 — Apply the initial condition. From u(x,0)=f(x)u(x, 0) = f(x):

f(x)  =  n=1Ansin ⁣(nπxL).f(x) \;=\; \sum_{n=1}^\infty A_n\, \sin\!\left(\frac{n \pi x}{L}\right).

The coefficients are extracted by Fourier projection onto the mode basis (6.5):

An  =  2L0Lf(x)sin ⁣(nπxL)dx.A_n \;=\; \frac{2}{L} \int_0^L f(x)\, \sin\!\left(\frac{n \pi x}{L}\right) dx.

Step 7 — Final answer.

  u(x,t)  =  n=1Ansin ⁣(nπxL)eD(nπ/L)2t,An=2L0Lf(x)sin ⁣(nπxL)dx.  \boxed{\;u(x, t) \;=\; \sum_{n=1}^\infty A_n\, \sin\!\left(\frac{n \pi x}{L}\right) e^{-D (n \pi / L)^2\, t}, \quad A_n = \frac{2}{L} \int_0^L f(x) \sin\!\left(\frac{n \pi x}{L}\right) dx.\;}

Step 8 — Sanity-check.

  1. Boundary conditions. Every term has sin(nπx/L)\sin(n \pi x / L), which vanishes at x=0x = 0 and x=Lx = L. ✓
  2. Initial condition. At t=0t = 0, every exponential is e0=1e^0 = 1, so u(x,0)=Ansin(nπx/L)=f(x)u(x, 0) = \sum A_n \sin(n\pi x / L) = f(x). ✓
  3. Long-time behaviour. As tt \to \infty, every term has eDkn2t0e^{-D k_n^2 t} \to 0, so u(x,t)0u(x, t) \to 0 uniformly. The rod equilibrates to the temperature its boundaries are held at, as physics demands. ✓
  4. PDE. For each nn: t[eDkn2t]=Dkn2eDkn2t\partial_t [e^{-D k_n^2 t}] = -D k_n^2 e^{-D k_n^2 t} and x2[sin(knx)]=kn2sin(knx)\partial_x^2 [\sin(k_n x)] = -k_n^2 \sin(k_n x). So tun=Dx2un\partial_t u_n = D \partial_x^2 u_n term by term. ✓

Comparison with the wave-equation case. The two final formulas, side by side:

Wave equationHeat equation
General solutionnsin(knx)[Ancos(ωnt)+Bnsin(ωnt)]\sum_n \sin(k_n x)\,[A_n \cos(\omega_n t) + B_n \sin(\omega_n t)]nAnsin(knx)eDkn2t\sum_n A_n \sin(k_n x)\, e^{-D k_n^2 t}
Time evolutionoscillatoryexponentially decaying
Number of initial functions2 (ff and gg)1 (ff)
Long-time fatepersists foreverrelaxes to zero

The spatial ladder is the same in both — same modes, same orthogonality, same Fourier-projection step. Only the time evolution of each mode has changed.

Three quick contrasts with the wave equation

The wave equation and the heat equation share a spatial mode structure but evolve those modes very differently. The most useful contrasts:

FeatureWave utt=c2uxxu_{tt} = c^2 u_{xx}Heat ut=Duxxu_t = D u_{xx}
Order in ttsecondfirst
Initial datau(x,0)u(x, 0) and ut(x,0)u_t(x, 0)u(x,0)u(x, 0) alone
Each mode’s time evolutioncos(ωnt),sin(ωnt)\cos(\omega_n t), \sin(\omega_n t) — oscillatoryeDkn2te^{-D k_n^2 t} — decaying
Signal speedfinite, ccinfinite (formal); no characteristics
Time reversibilityyesno — information is lost
Long-term fatepersists indefinitely (modulo damping)relaxes to zero (or to a steady state)

Both equations are linear and superposable — that’s what made the same separation-of-variables algorithm work for both.

Laplace’s equation

Set the time derivative in the heat equation to zero. What survives is

2u  =  0,\nabla^2 u \;=\; 0,

Laplace’s equation. The 2-D version reads x2u+y2u=0\partial_x^2 u + \partial_y^2 u = 0. There is no time. The equation describes a steady state — the configuration a system relaxes to after all transients have died.

Laplace’s equation is everywhere. The gravitational potential in vacuum, the electrostatic potential in a charge-free region, the temperature distribution in a thermally-equilibrated body, the velocity potential of an incompressible irrotational flow — all are harmonic functions, satisfying 2u=0\nabla^2 u = 0 on the relevant domain.

The defining feature is that Laplace’s equation takes no initial conditions — the absence of a time derivative means there is no “starting moment.” The solution is determined entirely by the boundary data. Specify uu (or nu\partial_n u) on the boundary of a domain and the interior values are fixed, uniquely.

top = 1.00bottom = 0.00left = 0.00right = 0.00

Laplace's equation ∇²φ = 0 has no time evolution and no source term. The boundary values alone *uniquely determine* the interior — this is the defining property of *elliptic* PDEs. The interactive solves by Jacobi iteration; the solution is the steady-state temperature distribution on a rectangular plate held at the four edge temperatures.

A rectangular plate with each of its four edges held at a chosen temperature. The interior is computed by Jacobi relaxation — iteratively replacing each interior cell with the average of its four neighbours, which is exactly the discrete form of Laplace’s equation. (Foundations 10.4 develops the algorithm and its convergence rate.) Slide the four edge temperatures and watch the interior reorganise. Notice that every interior point depends on every boundary point: change one edge and the entire interior shifts. There is no causal cone here, no domain of dependence — elliptic PDEs are globally determined.

Mean value and maximum principles

Two deep geometric facts about Laplace’s equation, both of which fall out of the equation itself:

Mean value property. The value of a harmonic function at a point equals its average over any sphere (or in 2-D, circle) centred at that point. Symbolically: u(r0)=1SrSrudSu(\mathbf{r}_0) = \frac{1}{|S_r|} \int_{S_r} u\, dS for any radius rr small enough to fit inside the domain. This is exactly the discrete Jacobi-relaxation rule made continuous — the interactive’s relaxation algorithm is iterating the mean value property until convergence.

Maximum principle. A harmonic function on a bounded domain attains its maximum and minimum on the boundary, not in the interior. (Strictly: unless the function is constant.) Combined with the mean value property, this gives uniqueness: given boundary data, there is exactly one harmonic function with those values, since any two would have a difference that is harmonic and zero on the boundary, hence zero everywhere by the maximum principle.

These properties are why elliptic PDEs feel “rigid.” Once you commit to boundary values, you have committed to the entire interior.

Separation of variables for Laplace

Separation of variables works on Laplace’s equation too, on rectangular geometries. The 2-D case x2u+y2u=0\partial_x^2 u + \partial_y^2 u = 0 with u=X(x)Y(y)u = X(x) Y(y) gives

X(x)X(x)  +  Y(y)Y(y)  =  0XX  =  YY  =  k2.\frac{X''(x)}{X(x)} \;+\; \frac{Y''(y)}{Y(y)} \;=\; 0 \quad\Longrightarrow\quad \frac{X''}{X} \;=\; -\frac{Y''}{Y} \;=\; -k^2.

The spatial ODEs are X+k2X=0X'' + k^2 X = 0 (sinusoids in xx) and Yk2Y=0Y'' - k^2 Y = 0 (exponentials in yy). The general solution is a sum of products sin(knx)[ancosh(kny)+bnsinh(kny)]\sin(k_n x)\, [a_n \cosh(k_n y) + b_n \sinh(k_n y)], with knk_n quantised by the xx-boundary conditions and the yy-coefficients fixed by the yy-boundary conditions. The reader who works through this gets a Fourier-style boundary value formula very similar in spirit to the wave-equation result of 5.3.

The same trick generalises to cylindrical and spherical geometries, where the spatial ODEs are no longer sinusoidal but involve Bessel functions, Legendre polynomials, and spherical Bessel functions. These appear in Sound 6.2 — Spherical waves and Sound 6.3 — Cylindrical waves. We pointed in 5.4 to the variable-coefficient ODEs that produce those functions; here is where they originate, as the radial parts of separated solutions to Laplace’s and Helmholtz’s equations.

The history — Fourier's heat equation and a rejected memoir

Joseph Fourier wrote the heat equation tu=D2u\partial_t u = D \nabla^2 u in his 1807 memoir to the French Academy of Sciences, Sur la propagation de la chaleur dans les corps solides. To solve it on a bounded interval, he proposed expanding the initial temperature as a sum of sinusoidal modes — what we now call a Fourier series — and showing that each mode decayed independently with rate Dk2D k^2.

The memoir was rejected. Lagrange, on the review panel, objected that “arbitrary functions” could not in general be expressed as such a sum, and the mathematics of convergence wasn’t rigorous enough to settle the question. Fourier rewrote, expanded, and resubmitted; the work was published as Théorie analytique de la chaleur in 1822. By then it was already influencing all of mathematics: the analytical machinery built to make Fourier’s claims rigorous — Cauchy’s theory of convergence, Riemann’s theory of integration, Cantor’s set theory, Lebesgue’s measure theory — became the foundation of modern analysis. The same machinery underwrites every PDE technique in this chapter and the Fourier methods of Foundations 7.

The irony is that the heat equation, derived by Fourier as the physical motivation for the series, ended up far less famous in physics than the Fourier transform that came out of the analytic theory built to validate his solution. Generations of physics students meet Fourier methods without ever learning that he was trying to solve the heat-diffusion problem.

Looking forward to two more linear PDEs

Two more linear PDEs sit just beyond the canonical three and earn their own lessons. They use the same machinery developed so far in the chapter — separation of variables, eigenvalue problems, mode sums — but the physics they describe stretches the chapter into fresh territory.

What we use it for

The cash value of this chapter, across the bookshelf:

The canonical three PDEs — hyperbolic, parabolic, elliptic — each have their own causal structure, but they share the spatial machinery laid out earlier in the chapter. The next two lessons take that spatial machinery and apply it to one more elliptic equation that arises from the wave equation (6.7), and to one parabolic-looking equation whose imaginary time coefficient gives it oscillatory rather than dissipative behaviour (6.8).