The Heat (Diffusion) Equation
Take any conserved stuff — heat, dissolved dye, the probability of finding a jittering particle — and let it flow down its own gradient. Two ideas, stacked, give one equation. The first is bookkeeping: whatever leaves a small region must show up as flux through its walls, the continuity law . The second is a constitutive guess, older than either Fourier or Fick: the flux points downhill and is proportional to the steepness, . Put them together and the flux drops out, leaving — the heat, or diffusion, equation. Here is a temperature, a concentration, or a probability density; is the diffusivity, measured in , and its very units already whisper the punchline: length squared per time, so distance spreads as the square root of time. In the classification of second-order PDEs this is the canonical parabolic case — its discriminant vanishes — and that single algebraic fact fixes its whole personality. It runs one way in time, needs exactly one initial condition, smooths its data instantly, and cannot be un-run. It sits between the elliptic Laplace equation (pure steady states) and the hyperbolic wave equation (reversible, finite-speed, two initial conditions). Two solution strategies dominate below: on the open line the Fourier transform diagonalizes and hands us a Gaussian heat kernel — the fundamental solution; on a bounded domain separation of variables turns the PDE into a Sturm–Liouville eigenproblem whose modes decay exponentially. Both tell one story — fine structure dies first, the whole relaxing toward the harmonic steady state the boundaries demand.
- The heat or diffusion equation is the prototypical parabolic PDE: it describes the irreversible relaxation of a temperature, concentration, or probability density toward equilibrium.
- It is first order in time and second order in space, so one initial condition plus boundary data make it well-posed forward in time; running it backward is ill-posed.
- On the open line the fundamental solution is the Gaussian heat kernel, whose width spreads as — diffusion length grows like the square root of time, never linearly.
- On finite domains, separation of variables gives eigenfunction expansions whose modes decay as , so high-spatial-frequency wiggles are erased first.
- Solutions turn instantly smooth (infinite signal speed), conserve total quantity under insulated walls, and obey a maximum principle — no new interior hot spots appear.
- One equation unifies Fourier's law of conduction, Fick's law of diffusion, and the Fokker–Planck dynamics of a free Brownian particle.
- Key idea: A conserved quantity carried by a gradient-driven flux relaxes by smoothing — damps each spatial Fourier mode at rate , so fine structure dies fastest and the diffusion length grows as .
Where this lives today
The heat equation refuses to stay in the furnace. In deep learning it has become the engine of the most powerful generative models yet built: score-based diffusion models (Sohl-Dickstein 2015, Ho 2020) run a diffusion process forward to turn an image into pure Gaussian noise, then learn to reverse it — sidestepping the ill-posed backward problem by training a network to estimate the score at each noise level rather than integrating the equation blindly. In quantitative finance the Black–Scholes equation for an option price is, after a change of variables, exactly the heat equation, which is why option pricing inherits its Gaussian solutions. Geophysicists use its skin-depth solution to read paleoclimate from borehole profiles and to date the cooling of the lithosphere; Kelvin famously (and wrongly, for lack of radioactivity) used it to bound the age of the Earth. In engineering it governs the thermal management of battery packs and CPUs, where the timescale decides whether a hotspot triggers runaway, and in medicine the bioheat equation — diffusion plus a perfusion sink — guides thermal ablation of tumors. The same parabolic smoothing reappears as Gaussian blur and scale-space in imaging and as edge-preserving anisotropic-diffusion denoising.
The physical picture
Picture temperature — or concentration — as a crowd of blind random walkers. Each takes unbiased steps, so no walker has a preferred direction and the mean position never moves; but the crowd's spread grows relentlessly. Where walkers are packed, more wander out than wander in, so density falls; where they are sparse, more arrive than leave. That imbalance is exactly Fourier's and Fick's law — flux proportional to the local gradient — and its net effect is to average every point toward the mean of its neighbours. A sharp spike cannot survive this averaging: it collapses instantly into a smooth bump that keeps flattening.
The cleanest way to see all of this at once is to expand any profile into spatial Fourier modes . Substituting into makes each mode obey , so its amplitude decays as . The damping rate scales with : a wiggle twice as fine dies four times as fast. That one dispersion relation contains everything — the smoothing (short wavelengths vanish first), the irreversibility (every mode only decays, so no feature can ever be born), the maximum principle (the solution stays trapped between its initial and boundary extremes), and the spreading law. The long-time survivor is the slowest mode, the harmonic field fixed by the boundaries — the solution of Laplace's equation. A concrete, everyday fingerprint of the same physics is how a yearly temperature swing soaks into the ground.
The core equations
The equation is assembled from two ingredients that recur across all of continuum physics: a conservation law and a flux law. Everything downstream — kernels, series, decay estimates — is a way of solving it.
where: — temperature, concentration, or probability density; — diffusivity, units ; — the Laplacian; — time. Read it as: the rate of change at a point equals the diffusivity times the curvature of the profile there — where is concave down (a local peak) it cools, where concave up (a dip) it warms, which is exactly the smoothing seen above. The engineering form keeps the material constants separate, which matters when they are not uniform, and it identifies which combination actually sets the timescale.
where: — temperature (K); — mass density; — specific heat; — thermal conductivity; — volumetric heat source. For uniform and this collapses to equation (1) with the thermal diffusivity — the ratio, not alone, is what governs how fast a shape relaxes (for copper ). On the whole line the response to a unit point source, the fundamental solution or Green's function, is a spreading Gaussian — the single most important object attached to this equation.
where: — temperature from a unit amount of heat deposited at ; its variance is , so the width and the full diffusion length . As it becomes , and for every — total quantity is conserved while the shape flattens. Because the equation is linear and translation-invariant, the solution for arbitrary initial data is just the kernel smeared over that data — a convolution.
where: — the initial profile; — the translation-invariant kernel of equation (3). Each point of the initial data blossoms into its own Gaussian and the results are added — superposition doing all the work. On a bounded interval the open-line kernel is replaced by a discrete eigenfunction expansion; for a rod with both ends held at zero the eigenfunctions are sines and every mode decays on its own clock.
where: — rod length; — Fourier sine coefficients of ; — the Sturm–Liouville eigenvalues. The -th mode's lifetime is , so fine structure ( large) vanishes fastest and the mode is the last to survive. Finally, the irreversibility can be made quantitative: a natural "energy" of the field decreases monotonically, which is the analytic face of the second law here.
where: — the "energy"; — the Dirichlet energy of the gradients, which is strictly positive unless is flat. The integral can only decrease (with Dirichlet or insulated walls), pinning the arrow of time and forbidding any return to a sharper past state.
The goal is to solve the initial-value problem on the entire real line with no boundaries in the way, by trading the differential operator for multiplication. The Fourier transform turns the PDE into a one-line ODE for each wavenumber, which we integrate trivially in time, specialize to a point source, and invert with a single Gaussian integral. The payoff is equation (3), the fundamental solution from which every open-line result — spreading, conservation, the law — follows by inspection.
Step 1. Define and transform the PDE. Since each -derivative brings down a factor , the Laplacian , and the equation becomes . Why: the transform diagonalizes the constant-coefficient spatial operator, so the modes decouple and the PDE splits into one independent ODE per wavenumber.
Step 2. Integrate that ODE in time: . This is the dispersion relation — purely imaginary frequency, so every mode decays without oscillating, at a rate that grows with the square of the wavenumber. Why: this is the smoothing property in its most naked form — the shortest wavelengths are annihilated fastest.
Step 3. Specialize to the fundamental solution by taking a point source, , whose transform is . Then . Why: a delta contains every wavenumber with equal unit weight, so its evolution exposes the pure response of the operator, uncontaminated by the shape of any particular initial profile.
Step 4. Invert with the definition , a Gaussian integral in . Complete the square in the exponent, , and use . Why: shifting the contour is legitimate because the Gaussian decays in every direction, so the standard real integral applies unchanged.
Step 5. Collect the pieces: . A direct check confirms it — differentiating gives , and for every . Why: the prefactor is exactly what keeps the area at unity as the exponential widens, encoding conservation of total heat. *A direct check confirms the result: substituting into the PDE gives , integrating over all gives for every , and computing the second moment gives variance .*
Go deeper · Derivation B · 2 minSeparation of variables for a cooling rod
The goal is to solve on the finite interval with the ends clamped at zero, , and an arbitrary starting profile . The strategy is to look for solutions that factor into a pure function of space times a pure function of time; the boundary conditions then quantize the spatial part into a Sturm–Liouville eigenproblem, and completeness of its eigenfunctions lets us match any initial data. The result, equation (5), makes the mode-by-mode decay explicit.
Step 1. Insert the product ansatz into the PDE and divide by to get . The left side depends only on , the right only on , so both must equal a constant, named in anticipation of decay. Why: separation converts one PDE into two ODEs coupled solely through the shared separation constant .
Step 2. Solve the spatial equation with . The general solution must vanish at , forcing ; vanishing at then forces . Why: the homogeneous boundary conditions act as a filter, admitting only a discrete set of standing shapes — exactly the physics of a clamped string, here for temperature.
Step 3. Read off the spectrum for , with eigenfunctions . These are orthogonal and complete: . Why: this is a self-adjoint Sturm–Liouville problem, so its eigenfunctions form a basis and any reasonable can be expanded in them.
Step 4. Solve the temporal equation to get . The lifetime shrinks as . Why: finer spatial modes have larger and therefore decay faster — the series form of "wiggles die first".
Step 5. Superpose and match the initial data: , with the coefficients projected out by orthogonality, . Why: at the exponentials are 1, so the coefficients are simply the Fourier sine coefficients of — the initial condition is met term by term. *One can check directly that each term satisfies the PDE and both boundary conditions; the orthogonality integral evaluates to , and convergence and completeness of the expansion follow from Sturm–Liouville theory.*
Go deeper · Derivation C · 2 minThe self-similar solution and the diffusion length
The goal is to show that the heat equation on the line has no intrinsic length or time scale of its own, so its solutions for scale-free data must collapse onto a single universal curve when distance is measured in the natural unit . Exploiting the scaling symmetry reduces the PDE to an ordinary differential equation in one similarity variable, recovers the error-function solution for a step initial condition, and reads off the growth of the diffusion length directly from the ansatz.
Step 1. Notice the invariance: equation (1) is unchanged under . This means the only dimensionless combination of and is , so for scale-free initial data (a step, say) the solution can depend on and only through : . Why: a symmetry of the equation must be a symmetry of the scale-free solution, which is what forces the collapse to one variable.
Step 2. Apply the chain rule, and , and substitute into . The factors of cancel, leaving the ODE . Why: the cancellation of is the analytic signature of self-similarity — the problem genuinely has no preferred moment.
Step 3. Integrate once using the integrating factor : . Why: the derivative of the profile is itself a Gaussian — which is no accident, since , the same kernel as Derivation A.
Step 4. Integrate again: . Fixing the constants for a unit step as , as gives . Why: the error function is simply the running integral of the Gaussian kernel, so the smoothed step is the kernel's cumulative distribution.
Step 5. Read off the length scale . All profiles at all times lie on one master curve once is measured in units of ; a front therefore advances not at constant speed but as , and equivalently the time to diffuse a distance scales as . Why: this square-root law is the single most useful estimate the equation offers, and it drops straight out of the ansatz without solving anything. *As a check, differentiating reproduces the kernel (), and the erfc solution can be confirmed to satisfy both the PDE and the step initial data.*
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Long time, insulated finite domain | With Neumann (zero-flux) walls total quantity is conserved and the profile relaxes to its spatial average — the lowest, flat eigenmode. | |
| Long time, fixed boundary values | The steady state is harmonic: the solution of Laplace's equation matching the imposed boundary data. | |
| Single Fourier mode | Each spatial frequency decays independently; the dispersion relation is purely imaginary — damping, never oscillation. | |
| Short time / vanishing diffusivity | For the field barely moves from its initial data; smoothing has only just begun, driven by the local curvature. | |
| Periodic surface drive, half-space | A boundary oscillation penetrates a skin depth , decaying and phase-lagging with depth — day/night and seasonal thermal waves. |
Worked examples
1 · How deep does the seasons' warmth reach? (fully worked)
Soil has thermal diffusivity . Treating the surface temperature as an annual cosine, find the skin depth of the seasonal wave, the depth at which the swing is cut to about 4 percent, and the temperature a wine cellar at 3 m sees if the surface swings .
Step 1. Set the drive frequency. One year is , so . The half-space solution to with a cosine boundary is , obtained by seeking with , giving .
Step 2. Compute the skin depth . At this depth the annual swing is attenuated by . This is the natural yardstick for how far seasons soak into the ground.
Step 3. Find the half-year-lag depth. The phase lag is ; a lag of (half a year, seasons flipped) occurs at , where the amplitude is — about 4.3 percent of the surface swing. At 7 m the ground is coldest exactly when the surface is hottest.
Step 4. Evaluate the cellar at . The attenuation is , so a surface swing becomes , lagged by months. A 3 m cellar therefore stays within about of the annual mean, and its "summer" arrives in autumn — the everyday engineering payoff of a law, and the reason water mains are buried below the frost line.
2 · Cooling a copper rod, and the price of simulating it
A copper rod of length () is heated, then its ends are clamped to 0 °C. Estimate how long it takes to cool, and find the largest stable time step for an explicit (FTCS) simulation on cells.
Step 1. Identify the slowest mode. From equation (5) the longest-lived term is , decaying with rate . Its time constant is . After a few the rod is essentially cold; the mode () and finer wiggles are long gone.
Step 2. Set up the explicit scheme. FTCS updates with diffusion number . Von Neumann analysis inserts and gives the amplification factor ; requiring for the worst case demands .
Step 3. Put in the numbers. With cells, , so the stability bound is
Halving the mesh spacing quarters the allowed step — the notorious cost of explicit diffusion solvers.
Step 4. Count the work. Reaching one time constant needs steps; a full cool-down of a few costs several thousand. The stiff scaling is exactly why implicit schemes (backward-Euler, Crank–Nicolson), which are unconditionally stable, are preferred for real diffusion problems.
Physics of the portrait
The heat equation is the birthplace of two subjects at once — the physics of conduction and the mathematics of Fourier analysis — and it carries the name of the man who wrote both into being while a prefect under Napoleon.
Origins · 1 minJoseph Fourier and how this was discovered
Jean-Baptiste Joseph Fourier came to the theory of heat by an unlikely road: orphaned young, trained for the priesthood, swept into the French Revolution (and briefly imprisoned), then conscripted as a scientific adviser on Napoleon's Egyptian campaign. Back in France as prefect of Isère, he worked on the propagation of heat in solids and, in 1807, submitted a memoir to the Paris Academy claiming that any temperature profile could be written as a sum of sines and cosines and evolved term by term. The committee — Lagrange, Laplace, Legendre — balked at the audacity and the shaky convergence arguments, and withheld publication, though they awarded him the Academy's prize on the subject in 1811. Undeterred, Fourier expanded the work into his 1822 masterpiece, Théorie analytique de la chaleur, which not only set down and solved it by separation of variables, but in the process invented the trigonometric series and integral transform that now bear his name — tools that would outgrow heat entirely and reorganize much of physics and signal processing. He also, in passing, was the first to describe what we now call the greenhouse effect. The rigor he lacked was supplied later by Dirichlet and Riemann; the physical instinct was his from the start.
Going further
Texts. Stone & Goldbart, Mathematics for Physics, Ch. 8–11 (PDEs, Green's functions) · Arfken & Weber, Mathematical Methods for Physicists, 7th ed., Ch. 9 · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 20–21 · Carslaw & Jaeger, Conduction of Heat in Solids, 2nd ed. · Crank, The Mathematics of Diffusion, 2nd ed. Key self-consistency checks for the results in this article: substituting into confirms and ; the rod orthogonality integral evaluates to ; the FTCS stability bound follows from von Neumann analysis; and the soil skin depth together with the copper diffusivity are consistent with standard tabulated values.
Prerequisites. Classification of Second-Order PDEs · Boundary Conditions and Well-Posedness · Separation of Variables in Cartesian Coordinates · Sturm–Liouville Eigenfunction Expansions. Leads to. Green's Functions for PDEs · The Helmholtz Equation · Laplace's and Poisson's Equations · The Wave Equation.
Ask the tutor: Ask me to work through the cooling of any specific rod, slab, or sphere — or to show exactly how the Gaussian kernel, the sine series, and the erfc solution are three views of the same physics.
Why does the heat equation smooth data instantly — is the infinite signal speed a real problem?
The Gaussian kernel is strictly positive for every the instant , so heat deposited at one point is mathematically felt everywhere immediately, however faintly. That is genuine infinite propagation speed, and it follows from the parabolic structure. For heat and diffusion it is harmless: the amount reaching a far point in a short time is exponentially tiny, , far below any measurable threshold. It only becomes a defect when you truly care about a front's speed limit — relativistic diffusion, or fast transients in nerve fibers — where the fix is a hyperbolic correction (the telegrapher's or Cattaneo equation) that restores a finite speed while reproducing the heat equation at long times.
If molecular dynamics is time-reversible, how can the heat equation be irreversible?
Nothing is added to the microscopic laws; irreversibility is emergent and statistical. The heat equation describes the coarse-grained density of an enormous number of particles, and while any single trajectory is reversible, the overwhelming majority of microstates consistent with a smooth profile lead forward to an even smoother one. Equation (6) makes this precise: the energy can only decrease under diffusion. Formally, the reversal is not forbidden by the microscopic dynamics but is infinitely improbable and ill-posed at the macroscopic level — reconstructing the exact past would require impossibly precise knowledge of every high-wavenumber mode. The arrow of time here is the arrow of ignorance made quantitative.
What is the difference between thermal conductivity k and thermal diffusivity κ?
They answer different questions. Conductivity (units ) sets the steady flux for a given temperature gradient: how much power flows through a wall. Diffusivity (units ) sets the speed at which a temperature pattern rearranges itself in time. A material can conduct a lot yet respond sluggishly if it also stores a lot of heat (large ). That is why the timescale to equilibrate is , not : what governs transient cooling is the ratio of how readily heat moves to how much heat a lump must shed to change its temperature.
Why does the diffusion length grow as √t rather than linearly?
Because diffusion is the sum of unbiased random steps, not directed motion. In a random walk the mean displacement is zero, but the variance — the sum of the individual step variances — grows linearly with the number of steps, hence linearly with time. The typical distance is the square root of the variance, so it grows as . The equation says the same thing: the kernel's variance is , so . A practical corollary is that diffusion is fast over small distances and hopeless over large ones — doubling the distance quadruples the time — which is why cells are small and why stirring (advection, which is linear in time) beats waiting.
How is the heat equation related to Brownian motion and the Fokker–Planck equation?
They are the same equation wearing different clothes. If is the probability density of a particle undergoing unbiased Brownian motion with no drift, its evolution is exactly — the driftless Fokker–Planck (Smoluchowski) equation, with the diffusion coefficient . The heat kernel is then the transition probability, and its variance gives Einstein's mean-square displacement in one dimension. Add a force and you add a drift term , turning it into the full Fokker–Planck equation. So Einstein's 1905 analysis of Brownian motion and Fourier's theory of heat are two readings of one parabolic operator.
Why is deblurring an image so much harder than blurring it?
Blurring an image is running the heat equation forward — a stable convolution with a Gaussian that damps high frequencies. Deblurring means inverting that, which is the ill-posed backward heat problem: the amplitudes that were multiplied by must now be divided by it, multiplying the finest details — and any sensor noise sitting there — by an enormous factor. Naive inversion produces an explosion of high-frequency garbage. Real deconvolution therefore never inverts directly; it regularizes, trading exact recovery for stability (Wiener filtering, Tikhonov regularization, total-variation priors), or, as in modern diffusion models, learns a stochastic reverse process instead of computing the deterministic inverse.
Is the heat equation just the Schrödinger equation with imaginary time?
Formally yes, and it is a deep and useful fact. The free Schrödinger equation becomes the heat equation under the Wick rotation , with the diffusivity playing the role of . But the physics differs sharply: the heat equation's real exponential damps modes, giving irreversible smoothing, whereas Schrödinger's imaginary exponential rotates them, giving reversible, oscillatory, unitary evolution that conserves probability. The imaginary-time trick is nonetheless the backbone of the Feynman–Kac formula and of quantum Monte Carlo, where imaginary-time diffusion projects onto the ground state.