Heat equation and smoothing
Derive diffusion from flux, evolve Fourier modes, and separate smoothing from loss of total heat through a boundary.
On this page
The question for today
What you’ll understand
- Connect conservation and a gradient-driven flux to diffusion.
- Compute the decay of periodic or Dirichlet eigenmodes.
- Distinguish mass balance, L2 dissipation, smoothing, and boundary compatibility.
A localized temperature difference becomes less pronounced as neighboring regions exchange energy. The heat equation expresses that redistribution through a local conservation law and a flux proportional to the negative temperature gradient. Its solutions reveal a useful asymmetry: forward evolution is smoothing and stable in natural norms, while reversing that evolution magnifies unresolved details. A careful calculation keeps boundary heat exchange separate from the decay of a mathematical norm, because those two quantities measure different things.
Flux explains the sign of diffusion
Let u denote temperature after taking constant density and heat capacity into the units. Conservation on a region says its rate of change equals negative outward flux plus any source. Fourier's constitutive law sets the flux to −κ∇u with κ>0, so the source-free equation becomes u_t=κΔu. At a smooth local spatial maximum, the Laplacian is nonpositive, giving an intuitive local reason a new higher peak does not grow in an unforced interior. A rigorous maximum principle additionally specifies the domain, boundary data, and regularity assumptions.
Integrating the PDE gives the total-heat balance. On a periodic domain the contributions across matching faces cancel; on an insulated boundary the normal derivative is zero. In both cases the spatial integral stays constant. A boundary held at zero temperature instead exchanges heat with the environment, and its integral need not remain constant. Calling every decreasing heat profile a violation of conservation would omit the boundary reservoir from the bookkeeping. With sources, the source integral joins the flux balance and changes the conclusion again.
Each spatial mode has its own decay rate
For a 2π-periodic profile, the sine and cosine mode of frequency n has second derivative −n² times itself. Its time coefficient therefore solves a'=−κn²a. The zero mode is constant; high frequencies decay faster than low frequencies. With zero Dirichlet values on an interval, the appropriate sine basis has frequencies nπ/L instead. The boundary condition determines the basis, so one cannot select convenient periodic modes and afterward claim they solve arbitrary endpoint values. Initial data expand in the basis in the topology under consideration.
For positive time on the whole space, convolution with a Gaussian heat kernel makes suitable rough initial data smooth. Differentiating the kernel produces finite estimates at each strictly positive time, though those derivative estimates generally deteriorate as time approaches zero. The heat kernel is nonzero at every spatial point for t>0, giving the ideal equation infinite propagation speed. This is a property of the diffusion approximation, not a relativistic signal-speed prediction. Interior smoothing also does not guarantee smoothness at a corner where initial and boundary data disagree.
Energy estimates measure stability rather than total heat
Multiply the heat equation by u and integrate by parts. With periodic, homogeneous Dirichlet, or homogeneous Neumann conditions, the resulting boundary term vanishes and half the squared L2 norm decreases at rate κ times the squared gradient norm. The same identity applied to the difference of two solutions proves uniqueness and contraction in L2 within the energy class. It is a mathematical energy estimate; the spatial integral of temperature is the separate mass or heat quantity from the flux balance. A constant nonzero Neumann solution has conserved L2 norm because its gradient vanishes.
To inspect spatial scales, increase N in the spectral lab and compare profiles at larger p. More modes introduce finer oscillations; larger p damps their coefficients in this selected finite family. Its terms are sin(nx−t)/nᵖ, so the playback has phase motion with no exponential heat damping. Use the exact worked solution below to calculate thermal decay instead of inferring it from that animation. Seeing which feature a simple model omits is part of connecting a diagram to the PDE rather than mistaking a moving graph for a numerical solution.
Work it through
Check decay and compatibility on an interval
Solve on 0<x<π with zero endpoint values and . Find the profile at t=log 2.
Both sine terms vanish at x=0 and x=π, so the initial profile is compatible with the homogeneous boundary values. Their Laplacian eigenvalues are −1 and −9.
Evolve the amplitudes independently: . This satisfies both the PDE and the initial condition by substitution.
At t=log 2, the amplitudes are 2·(1/2)=1 and 2^(−9)=1/512. Hence . The higher-frequency contribution has become very small.
Orthogonality gives . It begins at 5π/2 and at log 2 equals (π/2)(1+1/262144), consistent with L2 dissipation.
Boundary-compatible modes decay at rates proportional to their squared spatial frequencies.
The living notebook
Explore the model
Interactive lab · spectral
Inspect the frequencies that diffusion would damp
Change mode count N and decay p in the finite sine sum Σ sin(nx−t)/nᵖ. Identify which added terms vary over the shortest spatial distance. This lab illustrates truncation and coefficient size; its time phase is not the heat factor exp(−κn²t), and it does not solve boundary-value diffusion.
- Sum at x = π/2
- 0.867
- Smallest wavelength
- 2π / 5
- Highest-mode coefficient
- 0.2
A finite sum of sin(nx − t)/nᵖ. Playback changes t; increasing the cutoff includes finer spatial scales. This is not a proof about a continuum limit or renormalization. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA heat equation damps short wavelengths quickly, but that time law must be calculated separately from this mode display.
Pause & reason
Check your understanding
Your turn
Try it yourself
For a 2π-periodic problem with κ=1/2 and , compute u(x,t) and its long-time limit.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The constant is the zero mode, and the cosine has n²=4.
Compare with the solution
The coefficient of cos(2x) obeys a'=−2a, so . The spatial average remains four because periodic fluxes cancel. As t→∞ the nonconstant mode vanishes and the solution approaches four, rather than zero. The periodic heat content is 8π for all t.
Keep the idea
Take it with you
- Specify the boundary condition before selecting the eigenmodes.
- Diffusion smooths positive-time profiles by suppressing high frequencies.
- Total heat conservation and L2 dissipation describe different balances.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.