Deriving the Heat Equation
The heat equation isn't pulled from a hat — it falls out of two physical facts about a thin rod
whose temperature is u(x, t).
Fourier's law of conduction. Heat flows from hot to cold, at a rate
proportional to the temperature gradient. The heat flux (energy per unit area
per unit time) is
q = -k\,u_x,
where k > 0 is the conductivity. The minus sign encodes "downhill":
where temperature decreases to the right (u_x < 0), heat flows right
(q > 0).
Conservation of energy closes it
Energy balance. In a slice [x, x + \Delta x], the
stored heat changes at the rate energy flows in minus the rate it flows out:
\rho c\,\Delta x\,u_t \approx q(x) - q(x + \Delta x) = -\big(q(x+\Delta x) - q(x)\big).
Divide by \Delta x and let it shrink — the right-hand side becomes
-q_x:
\rho c\,u_t = -q_x = -(-k\,u_x)_x = k\,u_{xx}.
Collecting constants into the thermal diffusivity
\alpha = k/(\rho c) gives the heat equation:
\boxed{\,u_t = \alpha\,u_{xx}.\,}
Its meaning is wonderfully simple. The second derivative u_{xx}
measures how far a point sits below the average of its neighbours; the equation says temperature
rises wherever a point is a local dip and falls wherever it is a local bump. That is
diffusion: everything is pulled toward the local average, so bumps melt and the
profile smooths.
Watch it smooth
A starting profile \sin x + \sin 3x on
[0, \pi] (with \alpha = 1) evolves as
u = e^{-t}\sin x + e^{-9t}\sin 3x. Advance time: the
\sin 3x wiggle (decay rate 9) vanishes far
faster than the smooth \sin x (rate 1), so
the fine detail disappears first and the bump flattens toward zero.