Solving the heat equation | DE3
Based on 3Blue1Brown's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
The heat equation determines how temperature evolves only in the interior; boundary conditions are required to select physically valid solutions.
Briefing
The heat equation’s solutions aren’t determined by the differential equation alone: the temperature profile must satisfy the PDE in the rod’s interior and also obey boundary conditions that encode how heat behaves at the ends. That distinction matters because even functions that satisfy the heat equation can evolve in physically wrong ways if they ignore what happens at x = 0 and x = L.
In one dimension, the heat equation links time change to spatial curvature: the rate of temperature change at a point is proportional to the second derivative of temperature with respect to position. This creates a natural search for “nice” spatial shapes. Fourier’s key move was to treat the problem like an orchestra of modes: sine waves are simple building blocks because their second spatial derivatives reproduce the same shape (up to a constant factor). Starting with an idealized initial profile T(x,0) = sin(x), the second derivative in x turns sin(x) into −sin(x), so the PDE reduces to an exponential-in-time scaling. That leads to a candidate solution of the form T(x,t) = sin(x)·e^{−αt}, where α is the proportionality constant in the heat equation. Checking derivatives confirms it satisfies the PDE: differentiating twice in space brings down a negative factor, while differentiating once in time brings down the same factor times −α.
But the story breaks when physical boundary behavior is imposed. A straight-line temperature profile (proportional to x) has zero second derivative in space, so it would seem to stay constant under the PDE. Yet a simulation that models the ends correctly shows it slowly flattens toward a uniform temperature. The culprit is the boundary: at the rod’s ends there’s no neighbor on one side, so the “curvature drives change” intuition must be modified. For insulated ends—no heat flowing in or out—the slope at both endpoints must be zero for all times after the start. In mathematical terms, ∂T/∂x must vanish at x = 0 and x = L.
To satisfy those Neumann-type boundary conditions, sine waves need adjustment. Using cosine instead of sine shifts the wave so it’s flat at x = 0. The remaining task is to tune the spatial frequency so the derivative also vanishes at x = L. Introducing a factor ω inside the cosine changes the second derivative by ω², which forces the time-decay rate to pick up the same ω² factor: sharper spatial variation decays faster, with decay proportional to ω². The lowest allowed frequency occurs when ω = π/L, and higher modes come from harmonics—whole-number multiples of π/L—plus the constant mode (ω = 0). This produces an infinite family of functions that satisfy both the PDE and the insulated-end boundary conditions.
The payoff is strategic rather than final: once these mode solutions are in hand, the next step is to combine them to match arbitrary initial temperature distributions. The heat equation becomes solvable by decomposing complex starting shapes into sums of sine/cosine modes whose time evolution is exponential, with rates set by the spatial frequencies and the boundary constraints.
Cornell Notes
The heat equation ties how temperature changes over time to the curvature of temperature in space, using second derivatives in x. Simple spatial shapes like sine waves behave especially well because taking two spatial derivatives reproduces the same sine shape up to a constant factor, leading to exponential decay in time. However, satisfying the PDE in the interior is not enough: insulated ends require zero heat flux, which translates to zero slope at x = 0 and x = L for all t > 0. Enforcing those boundary conditions forces the spatial frequency to take discrete values (harmonics of π/L), producing an infinite family of cosine-based modes with time decay rates proportional to ω². These modes set up the Fourier-series-style method for building solutions that match any initial temperature profile.
Why does a sine wave naturally lead to exponential decay under the heat equation?
What goes wrong if a function satisfies the PDE but not the boundary conditions?
How do insulated ends translate into a mathematical boundary condition?
Why switch from sine to cosine when enforcing zero slope at x=0?
How does changing the spatial frequency ω affect the time decay rate?
Review Questions
- What role do boundary conditions play in determining a unique solution to the heat equation, and why can the PDE alone be insufficient?
- Derive (conceptually) why a mode like cos(ωx) must have a time factor whose exponent involves ω².
- How does the insulated-end condition lead to discrete allowed frequencies such as ω=π/L and its harmonics?
Key Points
- 1
The heat equation determines how temperature evolves only in the interior; boundary conditions are required to select physically valid solutions.
- 2
For insulated ends, zero heat flux becomes a zero-slope condition: ∂T/∂x must vanish at x=0 and x=L for all t>0.
- 3
Sine waves are useful because their second spatial derivatives reproduce the same shape up to a constant, yielding exponential time decay.
- 4
Cosine modes satisfy the “flat at x=0” requirement automatically, but the frequency must be tuned to also flatten at x=L.
- 5
Introducing a spatial frequency ω changes the second derivative by ω², forcing the time decay rate to scale with ω².
- 6
Insulated-end boundary conditions quantize ω into harmonics of π/L, producing an infinite family of mode solutions.
- 7
Once mode solutions exist, arbitrary initial temperature profiles can be built by combining them (the setup for Fourier-series-style reconstruction).