The Heat Equation
Learning objectives
- State the heat equation and interpret the diffusivity
- Solve the heat equation on with zero boundary by separation of variables
- Read the solution as a Fourier sine series whose modes decay at rate
- Contrast diffusion (smoothing, infinite propagation speed) with wave propagation
The heat equation is the canonical diffusion equation: it describes heat in a metal bar, ink spreading in water, the smoothed-out density profile of a random walk, and (after a Wick rotation) option prices in the Black-Scholes model. The cleanest way to solve it on a finite interval is separation of variables, assume , substitute, and watch the PDE split into two ODEs. The spatial ODE turns out to be the harmonic-oscillator equation whose solutions are sines; the temporal ODE is exponential decay. The result is a Fourier sine series in multiplied mode-by-mode by an exponentially decaying time factor.
The equation
The heat equation in one space dimension is:
Here is the temperature (or any diffusing scalar) and is the thermal diffusivity. Larger means faster diffusion. The PDE is parabolic, linear, homogeneous, and second order in , first order in .
A complete problem specifies: initial condition and boundary conditions, typically Dirichlet (ends held at zero temperature) on the interval [0, L].
Separation of variables
Assume a separated solution . Substituting into gives
Divide both sides by :
The left side depends only on ; the right only on . For them to be equal, both must equal a constant, call it . Two ODEs drop out:
- with (from the boundary conditions)
The spatial problem is a Sturm-Liouville eigenvalue problem. Its non-trivial solutions exist only for with eigenfunctions for . The time ODE gives .
The general solution
By linearity, sums of separated solutions are solutions:
The coefficients are determined from the initial condition : setting gives a Fourier sine series for , so
Plot the initial profile on [0, L = \pi]. The two-mode solution is . By , the mode has shrunk by , so the profile is essentially the mode alone, the fast modes are wiped out and only the slowest mode remains.
Physical reading: smoothing and decay rates
Each Fourier mode of decays at rate , which grows as . Higher harmonics (faster spatial oscillation) decay much faster. After a short time only the slowest mode is visible, this is why heat diffusion smooths any initial profile: sharp wiggles are high-frequency, and the equation kills them first.
The heat equation has infinite propagation speed: any initial disturbance is felt everywhere instantaneously (though exponentially small far away). Contrast with the wave equation in the next section, where information travels at finite speed .
- Black-Scholes option pricing: The Black-Scholes PDE for the price of a European call is, after a change of variables, exactly the heat equation. The "implied volatility" parameter sits in the role of the diffusivity . Quants run finite-difference solvers on the heat equation millions of times per day to price derivatives.
- Cooling of CPUs and EV battery packs: The temperature profile in a chip heatsink or a battery cell during charging satisfies a 3D heat equation. Engineers solve this numerically (FEM, finite-volume) to design cooling that prevents thermal runaway.
- Image diffusion / anisotropic smoothing: Gaussian blur is exactly heat-equation diffusion of pixel intensities for a finite amount of "time". Modern variants (Perona-Malik) use a nonlinear diffusion that preserves edges while smoothing flat regions, a key technique in classical computer vision before deep learning.
- Brownian motion / random walks: The probability density of a Brownian particle at time satisfies the heat equation with . This is the diffusion limit of the random walk: many tiny independent kicks add up to a Gaussian that spreads according to the heat equation.
Pause and think: If you start with (only the 7th harmonic excited), what does look like at any later time? Why does only one mode survive?
Try it
- For on [0, \pi] with , list the spatial eigenvalues and the decay rate of each mode.
- Compare the decay rates of the and modes in the heat equation on [0, \pi]. By how much does mode 5 decay between and ?
- If on [0, \pi] with zero boundary, write explicitly.
- What is for the heat equation on [0, L] with zero boundary, regardless of initial condition?
- Show that if and both solve with the same zero boundary, then does too. (Linearity / superposition.)
A trap to watch for
The heat equation is not time-reversible: solving forward smooths, but trying to solve backward in time (the "back-heat" or anti-heat equation) is catastrophically ill-posed. Tiny high-frequency noise in your "final" condition explodes by factors of when you run time backwards. This is why thermodynamics has an arrow of time, mathematically encoded in the parabolic structure of the heat equation. If a problem asks you to recover the initial profile from a final profile, the right answer is "without regularisation, this cannot be done reliably."
What you now know
You can solve the heat equation on a finite interval with Dirichlet boundary by separation of variables, recognise the result as a Fourier sine series with exponentially decaying time factors, and read the qualitative behavior (smoothing, decay to zero) from the decay rates . The next section keeps the -derivative second order but takes the -derivative second order as well, the wave equation, whose physics is propagation rather than diffusion.
Mark section complete →
References
- Garrity, T. (2002). All the Mathematics You Missed: But Need to Know for Graduate School. Cambridge University Press, ch. 14.
- Evans, L. C. (2010). Partial Differential Equations (2nd ed.). AMS, ch. 2 (heat equation).
- Strauss, W. A. (2007). Partial Differential Equations: An Introduction (2nd ed.). Wiley, ch. 3.
- John, F. (1991). Partial Differential Equations (4th ed.). Springer, ch. 7.
- Hull, J. C. (2017). Options, Futures, and Other Derivatives (10th ed.). Pearson, ch. 15 (Black-Scholes and the heat equation).