Differential Equations · Heat equation

Heat equation

The heat equation uₜ = uₓₓ says that the temperature at each point changes at a rate set by how the temperature curves there. On a rod it smooths every bump, and the finest ones disappear first.

Heat equation in this visualization

The top plot shows the temperature uu along a rod from 0 to π\pi: faint at the start, yellow at time tt. Blue arrows show how fast each point is warming or cooling. The bar below shades the rod by temperature, and the bottom row gives the size of each sine mode on a log scale (cosine modes when the ends are insulated).

The rate in time is the second derivative along the rod
ut=uxxu_t = u_{xx}

Why does a point change fastest where the curve bends most? For a small step hh, uxx(x)≈(u(x−h)+u(x+h)−2u(x))/h2u_{xx}(x) \approx \bigl(u(x-h) + u(x+h) - 2u(x)\bigr)/h^2: 2/h22/h^2 times the gap between the average of the two neighbours and u(x)u(x). Where uxx>0u_{xx} > 0 the curve bends up, the point sits below its close neighbours' average, and it warms; where uxx<0u_{xx} < 0 it cools. On a straight stretch ut=0u_t = 0, however hot it is. The probe can show this with two close neighbours and their average. Jumps and corners smooth out at once: for every t>0t > 0 the temperature is a smooth curve.

Why do fine wiggles disappear first? A single mode, sin⁡kx\sin kx with the ends held at 0 or cos⁡kx\cos kx with insulated ends, has uxx=−k2uu_{xx} = -k^2 u, so it keeps its shape and only shrinks by the factor e−k2te^{-k^2 t}. Three times the wiggles bend nine times as much at the same height and decay nine times as fast. Every starting temperature is a sum of such modes, so in the bottom row the bars fall from the right: mode kk drops under 10% of its start after tk=ln⁡10/k2t_k = \ln 10/k^2. On the log clock, each tenfold step in time clears modes about 10≈3.2\sqrt{10} \approx 3.2 times wider. The red ruler 2t2\sqrt t gives that scale: a single mode whose half-wavelength is no longer than the ruler keeps at most e−π2/4≈8.48%e^{-\pi^2/4} \approx 8.48\% of its amplitude.

What do the ends change? Held at 0, they are ice, and uu is measured from the ice temperature. Over time the lowest mode present takes over the shape. For a start that is never negative and not all zero, heat flows out through the ends, ∫u dx\int u\,dx falls, and the shape becomes one sine arch sinking like e−te^{-t}. Through insulated ends no heat passes, so ∫u dx\int u\,dx stays fixed. The modes are then cosines, and the k=0k = 0 mode, the mean temperature, never decays: the rod settles to its average. Either kind of end acts from t=0t = 0; a start that does not fit it at an end, like the uniform rod between ice, is pulled into line there at once.

Things to notice

  • The arrows share one scale, set by the fastest point at this moment, and the legend gives the rate of its reference arrow. Compare arrow lengths within one moment, not across times.
  • Temperatures below the ice are negative. With the ends held at 0, a start with both signs gets the net ∫u dx\int u\,dx instead of a share.

Controls

  • Diffuse leaves a faint snapshot at each tenfold step in time.
  • Click the rod to move the probe there.
  • Choose Draw and drag across the top plot to set the starting temperature; drawing takes tt back to 0.

Related