Describes how temperature diffuses over time, the prototypical parabolic PDE.
IntuitionDiffusion smooths out temperature differences
Drop a hot coin into a bowl of cold water: the sharp boundary between hot and cold does not stay sharp. Heat flows from warmer regions to colder ones, and within moments the temperature profile becomes a smooth curve instead of a jump. This is the defining behaviour the heat equation captures: it is a rule for how a temperature distribution u(x,t) evolves so that peaks flatten, valleys fill in, and information about the exact initial shape gradually blurs — but never reverses on its own.
Interactive Fourier series widget showing decaying sine modes that combine into the heat equation's solution.
The heat equation's solution is a sum of decaying Fourier modes, each shrinking as e−α(nπ/L)2t: raise n (number of terms) to see a rough initial profile, then watch how the high-frequency ("wiggly") components die out first while the smooth fundamental mode survives longest.
UndergraduateThe heat equation and the Fourier sine series solution
Definition: The heat (diffusion) equation
Let u(x,t) denote the temperature at position x on a rod of length L at time t≥0. The heat equation states ut=αuxx, where α>0 is the thermal diffusivity of the material: larger α means heat spreads faster. On a finite rod we impose boundary conditions, for instance u(0,t)=u(L,t)=0 (both ends held at zero temperature), and an initial condition u(x,0)=f(x) describing the temperature profile at time zero.
ut=αuxx,0<x<L,t>0
Because the equation and boundary conditions are linear, solutions can be built by superposition. Separating variables (u=X(x)T(t)) forces X to be an eigenfunction of the second derivative satisfying the boundary conditions, namely sin(Lnπx) for n=1,2,3,…, each paired with its own exponential decay in time e−α(nπ/L)2t. Summing all such modes with coefficients bn chosen to match the initial data gives the general solution.
For the heat equation ut=αuxx on 0<x<L with boundary conditions u(0,t)=u(L,t)=0 and initial condition u(x,0)=f(x) where f is piecewise continuous, the series u(x,t)=n=1∑∞bnsin(Lnπx)e−α(nπ/L)2t with coefficients bn=L2∫0Lf(x)sin(Lnπx)dx converges (for t>0) to a solution satisfying all three conditions.
Why is it true?
Sine functions with these particular frequencies are exactly the shapes that keep zero temperature at both ends while decaying independently in time; since every reasonable initial shape can be written as a sum of such sine waves (a Fourier sine series), the same decomposition immediately produces the solution at all later times.
Proof
Seek a solution of the separated form u(x,t)=X(x)T(t). Substituting into ut=αuxx gives X(x)T′(t)=αX′′(x)T(t), and dividing by αX(x)T(t) separates the variables: αT(t)T′(t)=X(x)X′′(x)=−λ, where λ must be a constant because the left side depends only on t and the right side only on x.
The boundary conditions u(0,t)=u(L,t)=0 force X(0)=X(L)=0. The eigenvalue problem X′′+λX=0 with these boundary conditions has nontrivial solutions only for λn=(nπ/L)2, n=1,2,3,…, with eigenfunctions sin(Lnπx); any other value of λ forces X≡0. Solving T′(t)=−αλnT(t) then gives Tn(t)=e−α(nπ/L)2t.
Each product un(x,t)=sin(Lnπx)e−α(nπ/L)2t solves the equation and boundary conditions. By linearity, so does any finite or (under mild convergence conditions) infinite sum u(x,t)=n=1∑∞bnsin(Lnπx)e−α(nπ/L)2t. Setting t=0 and using the orthogonality relation ∫0Lsin(Lnπx)sin(Lmπx)dx=0 for n=m (and =L/2 for n=m) to project f(x) onto each mode yields exactly the coefficients bn=L2∫0Lf(x)sin(Lnπx)dx, so the initial condition u(x,0)=f(x) is matched termwise.
Let u be continuous on [0,L]×[0,T] and satisfy ut=αuxx on the open rectangle 0<x<L,0<t≤T. Then the maximum of u over the whole closed rectangle is already attained on the "parabolic boundary" — the initial edge t=0 or one of the two sides x=0, x=L — never at an interior point with t>0 unless u is constant there.
Why is it true?
Heat has nowhere to come from except the initial data and the boundary temperatures: if a hidden interior point were the single hottest spot at some later time, heat would have to be spontaneously created there, which the diffusion process forbids — diffusion only ever moves heat from hot to cold, it never manufactures a new peak in empty space.
Proof
Fix ε>0 and define v(x,t)=u(x,t)−εt, so vt−αvxx=ut−ε−αuxx=−ε<0 everywhere on the open rectangle. Suppose, for contradiction, that v attains its maximum over the closed rectangle at an interior point (x0,t0) with 0<x0<L and 0<t0≤T — i.e. off the parabolic boundary.
Because x0 is an interior spatial maximum, the second-derivative test gives vxx(x0,t0)≤0. Because t0 is where the maximum over t∈[0,T] is reached (either an interior critical time, giving vt(x0,t0)=0, or the endpoint t0=T approached from the left, giving vt(x0,t0)≥0), in either case vt(x0,t0)≥0.
Combining the two inequalities, vt(x0,t0)−αvxx(x0,t0)≥0−α⋅0=0, which contradicts vt−αvxx=−ε<0 at every point. Hence no such interior maximum exists, so v's maximum lies on the parabolic boundary Γ (the initial edge together with the two lateral edges), giving u(x,t)≤εt+maxΓu everywhere. Letting ε→0+ proves the maximum principle for u itself.
UndergraduateReal-World Applications and Worked Examples
The heat equation reaches far beyond thermodynamics. In engineering it models heat conduction through walls, engine parts, and electronic chips; in environmental science it models the diffusion of pollutants in air or water; in image processing, "Gaussian blur" is literally the heat kernel applied to pixel intensities; and in quantitative finance, the Black–Scholes equation for option pricing can be transformed by a change of variables into exactly this equation, which is why closed-form option pricing formulas exist at all.
Example: Cooling a rod with a mixed-frequency initial profile
A rod of length L=π with diffusivity α=1 has both ends held at zero temperature and initial temperature u(x,0)=3sin(x)−sin(3x). Find u(x,t) for t>0.
Solution
The initial condition u(x,0)=3sin(x)−sin(3x) on 0<x<π with L=π, α=1 is already written as a combination of the eigenfunctions sin(nx): it uses only n=1 (coefficient 3) and n=3 (coefficient −1), with every other bn=0.
By the separation-of-variables theorem, each mode sin(nx) simply gets multiplied by its own decay factor e−n2t (here α=1, L=π so (nπ/L)2=n2). No integration is needed since the initial data is already a finite sine sum.
Substituting n=1 and n=3 into the series gives u(x,t)=3sin(x)e−t−sin(3x)e−9t. Note the n=3 term decays nine times faster than the n=1 term, so for large t the temperature profile looks almost exactly like 3sin(x)e−t, a single smooth hump — a direct illustration of high-frequency modes dying out first.
Example: Fundamental solution: a pollutant plume in a still canal
A pollutant of total mass M=100 (arbitrary units) is released instantaneously at x=0 in a long still canal, diffusing with α=0.5m2/s. Estimate the concentration u(2,10) at x=2m downstream, t=10s later.
Solution
On an unbounded domain, a point release of mass M at x=0, t=0 spreads according to the fundamental solution (heat kernel) u(x,t)=4παtMe−x2/(4αt), which is exactly the n→∞, L→∞ limit of the Fourier series construction: a Gaussian bump that starts as a spike and flattens out over time while its total area stays M.
With M=100 (arbitrary concentration units), α=0.5m2/s, x=2m and t=10s: compute the exponent first, 4αtx2=4(0.5)(10)4=204=0.2, so e−0.2≈0.819.
Compute the prefactor: 4παt=4π(0.5)(10)=20π≈7.927, so 4παtM≈7.927100≈12.61. Multiplying, u(2,10)≈12.61×0.819≈10.3: ten seconds after release, the concentration two metres downstream has dropped to about 10.3 units, and it keeps falling and spreading as t grows, illustrating the smoothing property directly.
For the heat equation ut=αuxx on a rod of length L=2 with α=3 and boundary condition u(0,t)=u(L,t)=0, what is the decay rate λn (so the n-th mode decays like e−λnt) for n=2?
According to the weak maximum principle for the heat equation, where must the maximum temperature over a closed space-time rectangle occur?
In the pollutant-diffusion example using the fundamental solution u(x,t)=4παtMe−x2/(4αt), what happens to the concentration profile as t→∞?
Why does the Black–Scholes option-pricing equation from quantitative finance have a closed-form solution?