The Heat Equation and the Diffusion Model
How does heat spread through a metal rod? Can we write an equation predicting temperature everywhere, for all future time, from the temperature right now? Joseph Fourier posed and answered this question in the early nineteenth century. His work produced one of the most important partial differential equations in mathematics and physics. The heat equation is the prototype of the parabolic class in the Classification of Second-Order Linear PDEs. It models not only literal heat flow but also chemical diffusion and Brownian motion. After transformation, it even applies to certain problems in finance. The big picture is this: physical conservation laws, combined with an empirical constitutive law relating flux to gradient, force a specific differential equation on us. We do not guess the heat equation — we derive it. This article carries out that derivation with full rigor. It states the precise theorem obtained, and proves it from first principles. It also previews the machinery (separation of variables, maximum principles) built on top of it.
- The heat equation arises from conservation of energy plus Fourier's law of heat conduction.
- Its precise form is , a linear, second-order, parabolic PDE.
- The derivation uses an arbitrary control volume and the divergence theorem — no symmetry is assumed.
- Fourier's law is an empirical constitutive assumption, not a logical necessity.
- The same equation models diffusion of mass, with concentration replacing temperature.
- Key idea: local conservation of a quantity, transported down its own gradient, always yields a diffusion-type PDE.
Where this lives today
The heat equation is far more than a model of literal heat flow. In probability theory, it is the forward Kolmogorov (Fokker–Planck) equation governing the transition density of Brownian motion, linking PDE theory directly to stochastic processes. In mathematical finance, a change of variables transforms the Black–Scholes equation for option pricing into the heat equation, making heat-kernel solutions directly usable for pricing formulas. In image processing and computer vision, applying the heat equation to an image (Gaussian blurring) is the basis of scale-space analysis and some denoising algorithms; anisotropic variants (Perona–Malik) modify Fourier's law itself to preserve edges. In differential geometry, the heat equation on manifolds underlies heat kernel proofs of the Atiyah–Singer index theorem, and Ricci flow (used in the proof of the Poincaré conjecture) is a nonlinear geometric analogue of the diffusion equation applied to a metric tensor. In numerical analysis and engineering, finite-difference and finite-element methods for the heat equation are the standard testbed for stability theory (e.g. the CFL-type conditions for parabolic problems), used in everything from semiconductor thermal design to climate modeling of heat diffusion in oceans and ice sheets.
Ask the tutor: How does separation of variables use the eigenfunctions of the Laplacian to actually solve this equation on a finite rod?
Let ( in applications) be an open, connected region occupied by a conducting medium, and let . Let
denote the temperature at position and time . The medium is described by three material parameters, each a positive function of (constant in the homogeneous, isotropic case treated here):
- — mass density,
- — specific heat capacity,
- — thermal conductivity.
The heat equation is the partial differential equation
where is a volumetric heat source density (energy per unit volume per unit time). When are constants and , this reduces to the standard heat equation
where is the thermal diffusivity and is the Laplacian. The same equation, with reinterpreted as a chemical concentration and as a diffusion constant , is called the diffusion equation.
Intuition
Picture a thin metal rod insulated along its sides so heat can only flow along its length. If one end is hotter than the other, common experience says heat flows from hot to cold, and it flows faster when the temperature difference (per unit length) is steeper. That is the essence of Fourier's law: the flow of heat, called the heat flux, is proportional to the negative gradient of temperature. No flux exists where the temperature is level; a kinked, sharply-varying temperature profile drives a strong flux. The second ingredient is bookkeeping: heat energy is neither created nor destroyed except by explicit sources, so any change in the thermal energy inside a region must equal the net flux of heat crossing its boundary, plus whatever a source contributes. This is exactly the same style of reasoning used to derive conservation laws in fluid dynamics and electromagnetism (continuity equations). When you combine "energy is conserved locally" with "flux follows the negative gradient," calculus (specifically the divergence theorem) automatically produces a second-order PDE relating one time derivative to two spatial derivatives — the parabolic signature. The picture below shows a one-dimensional rod, its temperature profile at a fixed time, and the heat flux at two points computed from the local slope. Steeper downward slope (bigger ) means larger rightward flux.
Central result
Let be open and connected, let be the temperature field, and assume: 1. (Conservation of energy) For every bounded subregion with piecewise-smooth boundary and outward unit normal , the rate of change of thermal energy stored in equals the net rate at which heat enters across , plus energy generated inside by a source of density :
where is the heat flux vector (energy per unit area per unit time). 2. (Fourier's law) The heat flux is proportional to the negative temperature gradient:
for a scalar conductivity function . 3. (Regularity) are strictly positive, is continuous on , and so that the divergence theorem applies on every admissible . Then satisfies, at every point of , the partial differential equation
In particular, if are constants and , then
We use the localization technique: derive an integral identity valid on every subregion, convert the boundary integral to a volume integral via the divergence theorem, and then argue that an integral vanishing on every subregion forces the integrand itself to vanish.
Step 1 (Convert the boundary flux integral to a volume integral). Fix and let be any bounded region with piecewise-smooth boundary. By hypothesis 3, , so the divergence theorem applies:
Substituting Fourier's law from hypothesis 2,
Step 2 (Differentiate under the integral on the left side of conservation). Since and do not depend on , and is a fixed bounded region independent of , the Leibniz rule for differentiating under the integral sign (valid because is continuous on the compact set for any , hence bounded there) gives
Step 3 (Assemble the integral balance). Substitute Steps 1 and 2 into the conservation law of hypothesis 1:
Since all three integrals are over the same region , we may combine them:
Step 4 (Localization: the integrand must vanish pointwise). Define
By hypothesis 3 and , is continuous on . Equation states for every admissible bounded subregion , in particular for every open ball . Suppose, for contradiction, that for some ; without loss of generality . By continuity of at , there exists with such that for all . Then
contradicting applied to . The case is symmetric. Hence for every , and since was arbitrary,
Step 5 (Constant-coefficient case). If are constants and , then , so the equation becomes , i.e.
with since by hypothesis.
∎Let denote the concentration (mass per unit volume) of a diffusing chemical species in a stationary medium, with no chemical reactions occurring (). Suppose mass is conserved and the mass flux obeys Fick's law for a constant diffusion coefficient . Then the identical argument (with , since is already a density) yields
Conservation of mass for a chemical species states that the rate of change of total mass in any region equals the negative net outward flux (no sources, no sinks):
This is precisely hypothesis 1 of the theorem with and . Fick's law is precisely hypothesis 2 with . All steps of the proof above go through verbatim, yielding .
∎Worked examples
Example 1 (Non-uniform rod, direct verification of the PDE from a candidate solution). Consider a rod occupying modeling the constant-coefficient case with (chosen asymmetrically, not the "nice" value ). Suppose we propose the candidate temperature profile
combining two spatial modes with unequal amplitudes and and unequal wavenumbers . We verify directly that this satisfies , confirming the theorem's equation is the correct one to solve (this also previews Separation of Variables for the Heat Equation, where such sums of modes are exactly how solutions are built). Compute the time derivative term by term. For the first term, . For the second, . So
Now compute . For the first term, . For the second, . So
Multiply by :
This matches exactly, term by term. Note the exponents and are precisely for wavenumbers ; this is the signature pattern that separation of variables will later derive systematically, and here it is confirmed to satisfy the derived equation, not merely assumed.
Example 2 (A rod with a heat source and variable conductivity — using the general PDE from the theorem). Consider a rod along with , non-constant conductivity (the rod is a composite material, denser/more conductive toward ), constant , , and an internal heat source
We are given the candidate temperature field
and we check it against the general balance law of the theorem,
Left side. , so . Right side, flux term. First . Then
Differentiate in :
Right side, total.
Compare: left side is , right side is . These do not match (e.g. at : left , right ). So is not a solution of this particular variable-coefficient heat equation with this source — which is the correct and expected outcome, since we invented and independently to illustrate the mechanics of plugging into the general divergence-form equation. This demonstrates the necessary discipline: one cannot simply guess and together and expect consistency; the theorem tells us exactly which combinations of are physically consistent, namely those satisfying the PDE identically, and checking this is a concrete, mechanical verification of the divergence-form balance rather than the constant-coefficient shortcut . To see the mechanism produce an actual solution, fix instead and ask what source-free steady state () looks like with : we need , i.e. constant, so , giving . For instance, with boundary temperatures and , we solve and , so , giving the genuine steady-state solution
which one can check directly satisfies constant, hence (as is time-independent). This is the variable-conductivity analogue of the familiar linear steady profile obtained when is constant.
Conservation of energy (hypothesis 1) alone, without a constitutive law relating to , does not produce the heat equation — it produces only the continuity equation
which involves the unknown flux as an independent field, not expressible in terms of alone. To see concretely that the conclusion of the theorem fails without Fourier's law, consider , , , and define
Check conservation of energy directly in the pointwise (localized) form :
These are not proportional with the constant needed for unless , which is false. So this particular pair does not even satisfy conservation as stated — showing that conservation alone is a genuine constraint linking and , but it is a single scalar equation relating two unknown functions and , hence underdetermined: infinitely many pairs satisfy pointwise (e.g. take any and set ), and is not pinned down by conservation alone. Only after imposing a constitutive law such as Fourier's does the system close into a well-posed PDE purely in . This is exactly why hypothesis 2 is listed as a separate, independent, empirical assumption in the theorem — it is not a consequence of conservation, but extra physical input (analogous to how Classification of Second-Order Linear PDEs separates the equation's algebraic type from the physical law that produced it).
Scope, edge cases & common traps
| Situation | What happens | Why |
|---|---|---|
| constant, | Reduces to | Divergence of a constant times gradient is constant times Laplacian |
| depends on | Must keep divergence form | in general; product rule adds |
| Anisotropic medium | becomes a matrix , flux | Heat need not flow parallel to ; same proof technique applies with symmetric positive-definite |
| No boundary/initial data given | Equation alone has infinitely many solutions | The PDE is derived from local physics; global uniqueness needs The Maximum Principle for Parabolic and Elliptic Equations |
| mistakenly used | Equation becomes backward-parabolic, ill-posed | Sign of is forced positive by physical positivity of |
The mathematician behind it
Origins · 1 minJean-Baptiste Joseph Fourier and how this was discovered
Fourier served as a mathematics instructor and later as a scientific administrator in Napoleon's Egyptian campaign before returning to France to serve as prefect of the Isère department. It was there, largely isolated from the Paris mathematical establishment, that he developed his theory of heat conduction, submitting his prize memoir to the French Academy of Sciences in 1807. His central innovation was twofold: the empirical flux law now bearing his name, and the audacious claim that arbitrary periodic functions could be represented as infinite sums of sines and cosines — the germinal idea of Fourier series, developed specifically to solve the heat equation on bounded domains.
Why is the heat equation called "parabolic"?
The classification of second-order linear PDEs is by the sign of the discriminant , in analogy with conic sections. For , treating as the second variable, the second-order terms are only (coefficient ) with no or mixed term, giving discriminant zero — the borderline case, exactly as a parabola is the borderline conic. This classification, covered in Classification of Second-Order Linear PDEs, predicts qualitative behavior: parabolic equations have one-directional (irreversible) time evolution and smoothing properties, unlike the two-directional wave equation (hyperbolic) or the equilibrium Laplace equation (elliptic).
Is Fourier's law exact, or an approximation?
Fourier's law is an empirical constitutive law, not a fundamental physical principle like conservation of energy. It is an excellent approximation for conduction in most solids and stationary fluids under normal conditions, but it is known to fail at extremely short time or length scales (e.g. it predicts infinite propagation speed for thermal disturbances, which is unphysical). More refined models like the Cattaneo equation introduce a relaxation time to fix this. For everyday engineering purposes at macroscopic scales, however, Fourier's law is highly accurate and is the standard starting point.
Does the heat equation apply to non-uniform materials?
Yes — this is exactly why the theorem is stated for spatially varying rather than only constants. The derivation goes through unchanged because conservation of energy and Fourier's law are stated locally, for an arbitrary control volume, and never assumed the material to be uniform. The only difference is that the equation retains the divergence form instead of simplifying to ; the extra term appears whenever conductivity varies in space, as shown explicitly in the second worked example.
What is the difference between the heat equation and the diffusion equation?
Mathematically, none — both are for a positive constant (thermal diffusivity or diffusion coefficient, respectively). The difference is purely in physical interpretation: is temperature governed by Fourier's law in one case, and concentration governed by Fick's law in the other. The corollary in this article shows the derivations are structurally identical, since both rest on the same mathematical skeleton — a conserved density transported down its own gradient — despite describing entirely different physical phenomena.
Why do we need boundary and initial conditions if the PDE is already derived?
The theorem derives a local differential relationship that any physically consistent temperature field must satisfy at each interior point and instant. But a PDE alone, like an ODE alone, admits infinitely many solutions (e.g. shifting or scaling initial data yields different valid solutions of the same equation). To pin down a unique, physically meaningful temperature history, one must additionally specify an initial temperature distribution and boundary behavior (fixed temperature, insulated ends, or radiative conditions). Establishing that such data indeed produces a unique, well-behaved solution is the role of results like The Maximum Principle for Parabolic and Elliptic Equations.
How does separation of variables fit in with this derivation?
This article establishes which equation governs heat flow; it does not yet solve it. Separation of Variables for the Heat Equation is the standard technique for actually solving on a bounded domain with given boundary and initial conditions, by seeking solutions of the product form and expanding the initial data in a Fourier series of eigenfunctions of the spatial operator. The first worked example above previews this: the solution was built from exponentially decaying sine modes, which is exactly the output format that separation of variables produces.
What role does the divergence theorem play in the proof?
The divergence theorem converts a boundary integral (net flux of heat through the surface of a region) into a volume integral (of the divergence of the flux, over the interior of the region). This step is essential because conservation of energy is naturally stated as a boundary flux balance, while a pointwise differential equation requires everything expressed as integrals over the same region. Without the divergence theorem, one could not localize the conservation law into a PDE at all; the technique is a direct application of vector calculus that anyone using this derivation should verify applies (i.e., that the flux field is and the boundary is sufficiently regular), as flagged explicitly in the regularity hypothesis.