Heat Equation

Last updated: 2026-04-12

Definition (Heat Equation)
Consider a region URnU \subset \mathbb{R}^n that is open and a time variable t>0t > 0, then we can define the heat equation:
ut=αΔu\begin{equation*}\frac{\partial u}{\partial t} = \alpha \Delta u\end{equation*}
Here, the unknown function u:U×[0,)Ru: \overline{U} \times [0,\infty) \to \mathbb{R} represents the temperature distribution, where u(x,t)u(x,t) gives the temperature at position xx and time tt. The Laplacian operator Δ\Delta acts on the spatial variables x=(x1,,xn)x = (x_1,\ldots,x_n) and is defined as:
Δu=i=1n2uxi2=2ux12+2ux22++2uxn2\begin{equation*}\Delta u = \sum_{i=1}^n \frac{\partial^2 u}{\partial x_i^2} = \frac{\partial^2 u}{\partial x_1^2} + \frac{\partial^2 u}{\partial x_2^2} + \cdots + \frac{\partial^2 u}{\partial x_n^2}\end{equation*}
The constant α\alpha represents the thermal diffusivity of the medium, which measures how quickly heat spreads through the material.

Motivation

The foolowing animations are taken from 3blue1brown's video "But what is a partial differential equation? | DE2"

Let's explore the heat equation in the one-dimensional case. Consider a function f:[0,L]×[0,)Rf: [0, L] \times [0,\infty) \to \mathbb{R} that represents initial temperature distribution.
We study a thin metal rod of length LL and analyze how heat flows through it. Initially, the rod is heated non-uniformly, and at time t=0t=0, the temperature at position xx corresponds to f(x)f(x). The function u:[0,L]×[0,)Ru: [0,L] \times [0,\infty) \to \mathbb{R} describes the temperature of the rod at time tt and position xx with the initial condition:
u(0,x)=f(x)for0xL\begin{equation*}u(0, x) = f(x) \quad \text{for} \quad 0 \leq x \leq L\end{equation*}

The Intuition Behind Heat Equation

Physical intuition tells us that over time, the rod should reach a uniform temperature distribution. We want to describe this behavior mathematically. For simplicity, let's consider three adjacent points x1<x2<x3x_1 < x_2 < x_3 with their temperatures at some time tt:
T1=u(t,x1),T2=u(t,x2),T3=u(t,x3).\begin{equation*}T_1 = u(t, x_1), \quad T_2 = u(t, x_2), \quad T_3 = u(t, x_3).\end{equation*}
Let's investigate the temperature change dT2\text{d}T_2 over a small time interval dt\text{d}t relative to the temperatures at points T1T_1 and T3T_3. The fundamental principle is that T2T_2 should approach the average of its neighboring points, T1+T32\frac{T_1 + T_3}{2}, as the system moves toward thermal equilibrium. This can be approximated as:
dT2dt=α(T1+T32T2)=α2((T3T2)(T2T1))\begin{equation*}\frac{\text{d}T_2}{\text{d}t} = \alpha \left(\frac{T_1 + T_3}{2} - T_2\right) = \frac{\alpha}{2}\left((T_3 - T_2) - (T_2 - T_1)\right)\end{equation*}
The last term represents a finite difference approximation of the Laplacian operator Δ\Delta.
The changing of T2T_2 depends on T1+T32\frac{T_1 + T_3}{2}
While this explanation is not mathematically rigorous, it provides an intuitive understanding of the heat equation's behavior.

Modeling Temperature Distribution for Rod

To visualize the evolution of temperature in our one-dimensional rod, we need to consider the heat equation with the given initial function f(x)f(x). The temperature function u(t,x)u(t,x) requires a three-dimensional coordinate system (x,t,u(t,x))(x, t, u(t,x)) for complete visualization, where:
  • xx represents the position along the rod
  • tt represents time
  • u(t,x)u(t,x) gives the temperature at position xx and time tt
The 3D surface of the solution u(x,t)u(x,t) to the one-dimensional heat equation with initial distribution u(x,0)=f(x)u(x, 0) = f(x). The solution was found using finite difference method.

Fundamental Solution and Cauchy Problem

The foolowing material is taken from [EvansPDE2010] p. 46-47

Now, as we understand the idea behind the heat equation we want to find the solution to it. The key to solving the heat equation lies in understanding the fundamental solution Φ(x,t)\Phi(x,t). This remarkable function not only solves the heat equation itself but also enables us to construct solutions for any given initial distribution function f(x)f(x).
Definition (Fundamental solution)
The function
Φ(x,t):={1(4πt)n/2ex24t(xRn,  t>0)0(xRn,  t<0)\begin{equation*}\Phi(x,t) := \begin{cases}\frac{1}{(4\pi t)^{n/2}} e^{-\frac{|x|^2}{4t}} & (x \in \mathbb{R}^n, \; t > 0) \\0 & (x \in \mathbb{R}^n, \; t < 0)\end{cases}\end{equation*}
is called the fundamental solution of the heat equation. Note that Φ\Phi has a singularity at the point (0,0)(0,0).
Using Φ\Phi, we can construct solutions to the initial-value (or Cauchy) problem:
ut=Δuin Rn×(0,)u=gon Rn×{t=0}.\begin{align*}u_t &= \Delta u \quad \text{in } \mathbb{R}^n \times (0,\infty) \\u &= g \quad \text{on } \mathbb{R}^n \times \{t=0\}.\end{align*}
A key observation is that for any fixed yRny \in \mathbb{R}^n and t>0t > 0, both (x,t)Φ(x,t)(x,t) \mapsto \Phi(x,t) and (x,t)Φ(xy,t)(x,t) \mapsto \Phi(x-y,t) solve the heat equation away from their respective singularities. This property suggests that we can construct a solution through convolution:
u(x,t)=RnΦ(xy,t)g(y)dy=1(4πt)n/2Rnexy24tg(y)dy(xRn,  t>0)\begin{align*}u(x,t) &= \int_{\mathbb{R}^n} \Phi(x-y,t)g(y)\,\text{d}y \notag\\&= \frac{1}{(4\pi t)^{n/2}} \int_{\mathbb{R}^n} e^{-\frac{|x-y|^2}{4t}}g(y)\,\text{d}y \quad (x \in \mathbb{R}^n, \; t > 0)\end{align*}
The fact that this convolution indeed provides a solution to our initial-value problem will be established in the subsequent theorem.

Solution to Cauchy Problem

The foolowing material is taken from [EvansPDE2010] p. 47-48

Using the definition of the fundamental solution we can establish the following facts:
1. Regularity of the solution u(x,t)u(x,t), i.e. the amount of derivatives.
2. Next, we verify that the convolution with Φ(x,t)\Phi(x,t) indeed yields a solution to the heat equation.
3. Finally, despite the singularity of Φ(x,t)\Phi(x,t) at (0,0)(0,0), we will prove that our solution satisfies the initial condition by showing
limt0+u(x,t)=g(x)\begin{equation*}\lim_{t \to 0^+} u(x,t) = g(x)\end{equation*}
for all xRnx \in \mathbb{R}^n.
Theorem (Solution of initial-value problem)
Assume gC(Rn)L(Rn)g \in C(\mathbb{R}^n) \cap L^{\infty}(\mathbb{R}^n)(continuous and bounded), and define uu as above. Then
  • uC(Rn×(0,))u \in C^{\infty}(\mathbb{R}^n \times (0,\infty)),
  • ut(x,t)Δu(x,t)=0(xRn,t>0)u_t(x,t) - \Delta u(x,t) = 0 \quad (x \in \mathbb{R}^n, t > 0),
  • lim(x,t)(x0,0)xRn,t>0u(x,t)=g(x0)for each point x0Rn\displaystyle\lim_{\substack{(x,t)\to(x^0,0) \\ x\in\mathbb{R}^n, \, t>0}} u(x,t) = g(x^0) \quad \text{for each point } x^0 \in \mathbb{R}^n.
\quad Proof. 1. Since the function 1tn/2ex24t\frac{1}{t^{n/2}}e^{-\frac{|x|^2}{4t}} is infinitely differentiable, with uniformly bounded derivatives of all orders, on Rn×[δ,)\mathbb{R}^n \times [\delta,\infty) for each δ>0\delta > 0. As a consequence, our solution u(x,t)u(x,t), obtained through convolution with this function, inherits these smoothness properties. Specifically:
uC(Rn×(0,)).\begin{equation*}u \in C^\infty(\mathbb{R}^n \times (0,\infty)).\end{equation*}
This means our solution possesses continuous derivatives of all orders in both space and time variables, making it an extremely well-behaved function from an analytical perspective.
2. Let us now verify that our solution satisfies the heat equation. For each fixed yRny \in \mathbb{R}^n, we know that Φ(xy,t)\Phi(x-y,t) solves the heat equation, meaning:
Φt(xy,t)=ΔxΦ(xy,t)\begin{equation*}\Phi_t(x-y,t) = \Delta_x\Phi(x-y,t)\end{equation*}
Using this property and the linearity of integration, we can show that u(x,t)u(x,t) solves the heat equation:
ut(x,t)Δu(x,t)=Rn[ΦtΔxΦ](xy,t)g(y)dy=Rn[0]g(y)dy=0(xRn,t>0)\begin{align*}u_t(x,t) - \Delta u(x,t) &= \int_{\mathbb{R}^n} [\Phi_t - \Delta_x\Phi](x-y,t)g(y)\,\text{d}y \\&= \int_{\mathbb{R}^n} [0]g(y)\,\text{d}y \\&= 0 \quad (x \in \mathbb{R}^n, t > 0)\end{align*}
Thus, we have confirmed that our constructed solution u(x,t)u(x,t) is indeed a solution to the heat equation.
3. Let us now prove that our solution satisfies the initial condition by showing that u(x,t)g(x)u(x,t) \to g(x) as t0+t \to 0^+. Fix any x0Rnx^0 \in \mathbb{R}^n and ε>0\varepsilon > 0. Since gg is continuous, there exists δ>0\delta > 0 such that
g(y)g(x0)<εwhenever yx0<δ,  yRn.\begin{equation*}|g(y) - g(x^0)| < \varepsilon \quad \text{whenever } |y-x^0| < \delta, \; y \in \mathbb{R}^n.\end{equation*}
For xx0<δ2|x-x^0| < \frac{\delta}{2}, we can decompose the difference between u(x,t)u(x,t) and g(x0)g(x^0) as follows:
u(x,t)g(x0)=RnΦ(xy,t)[g(y)g(x0)]dyB(x0,δ)Φ(xy,t)g(y)g(x0)dy+RnB(x0,δ)Φ(xy,t)g(y)g(x0)dy=:I+J.\begin{align*}|u(x,t) - g(x^0)| &= \left|\int_{\mathbb{R}^n} \Phi(x-y,t)[g(y) - g(x^0)]\,\text{d}y\right| \\&\leq \int_{B(x^0,\delta)} \Phi(x-y,t)|g(y) - g(x^0)|\,\text{d}y \\&\quad + \int_{\mathbb{R}^n-B(x^0,\delta)} \Phi(x-y,t)|g(y) - g(x^0)|\,\text{d}y \\&=: I + J.\end{align*}
For the first term II, since Φ(xy,t)\Phi(x-y,t) is the density of a normal distribution with mean xx and variance tt:
IεRnΦ(xy,t)dy=ε\begin{equation*}I \leq \varepsilon \int_{\mathbb{R}^n} \Phi(x-y,t)\,\text{d}y = \varepsilon\end{equation*}
For the second term JJ, observe that when xx0δ2|x-x^0| \leq \frac{\delta}{2} and yx0δ|y-x^0| \geq \delta:
yx0yx+δ2yx+12yx0\begin{equation*}|y-x^0| \leq |y-x| + \frac{\delta}{2} \leq |y-x| + \frac{1}{2}|y-x^0|\end{equation*}
which implies yx12yx0|y-x| \geq \frac{1}{2}|y-x^0|. This leads to:
J2gLRnB(x0,δ)Φ(xy,t)dyCtn/2RnB(x0,δ)exy24tdyCtn/2RnB(x0,δ)eyx0216tdy=CRnB(x0,δ/t)ez216dz\begin{align*}J &\leq 2\|g\|_{L^\infty} \int_{\mathbb{R}^n-B(x^0,\delta)} \Phi(x-y,t)\,\text{d}y \\&\leq \frac{C}{t^{n/2}} \int_{\mathbb{R}^n-B(x^0,\delta)} e^{-\frac{|x-y|^2}{4t}}\,\text{d}y \\&\leq \frac{C}{t^{n/2}} \int_{\mathbb{R}^n-B(x^0,\delta)} e^{-\frac{|y-x^0|^2}{16t}}\,\text{d}y \\&= C\int_{\mathbb{R}^n-B(x^0,\delta/\sqrt{t})} e^{-\frac{|z|^2}{16}}\,\text{d}z\end{align*}
The final integral approaches zero as t0+t \to 0^+. Therefore, for sufficiently small t>0t > 0 and xx0<δ2|x-x^0| < \frac{\delta}{2}, we have:
u(x,t)g(x0)<2ε\begin{align*}|u(x,t) - g(x^0)| < 2\varepsilon\end{align*}
So, the theorem is proved \Box.

Mean-value property of Heat Equation

The foolowing material is taken from [EvansPDE2010] p. 51-54

Illustration of ΓT\Gamma_T and UU
Definition
Assume URnU \subset \mathbb{R^n} is open and bounded region, and fix a time T>0T > 0.
  • We define the parabolic cylinder UT:=U×[0,T].U_T := U \times [0,T].
  • The parabolic boundary of UTU_T is ΓT:=UTUT.\Gamma_T := \overline{U_T} - U_T.
We want next to derive a kind of analogue to the mean-value property for harmonic functions. There is no such simple formula. However let us observe that for fixed xx the spheres B(x,r)\partial B(x,r) are level sets of the fundamental solution Φ(xy)\Phi(x-y) for Laplace's equation. This suggests that perhaps for fixed (x,t)(x,t) the level sets of fundamental solution Φ(xy,ts)\Phi(x - y, t - s) for the heat equation may be relevant.
Definition
For fixed xRnx \in \mathbb{R}^n, tRt \in \mathbb{R}, r>0r > 0, we define
E(x,t;r):={(y,s)Rn+1st,Φ(xy,ts)1rn}.\begin{equation*}E(x,t;r) := \left\{(y,s) \in \mathbb{R}^{n+1} \,|\, s \leq t, \,\Phi(x-y,t-s) \geq \frac{1}{r^n} \right\}.\end{equation*}
Theorem (Mean-value property of Heat Equation)
Let uC12(UT)u \in C_1^2(U_T) solve the heat equation. Then
u(x,t)=14rnE(x,t;r)u(y,s)xy2(ts)2dyds\begin{equation*}u(x,t) = \frac{1}{4r^n} \iint_{E(x,t;r)} u(y,s) \frac{|x-y|^2}{(t-s)^2} \,dy\,ds\end{equation*}
for each E(x,t;r)UTE(x,t;r) \subset U_T.
Formula above is a sort of analogue for the heat equation of the mean-value formulas for Laplace's equation. Observe that the right-hand side involves only u(y,s)u(y,s) for times sts \leq t. This is reasonable, as the value u(x,t)u(x,t) should not depend upon future times.
\quad Proof. Shift the space and time coordinates so that x=0x = 0 and t=0t = 0. Upon mollifying if necessary, we may assume uu is smooth. Write E(r)=E(0,0;r)E(r) = E(0,0;r) and set
ϕ(r):=1rnE(r)u(y,s)y2s2dyds=E(1)u(ry,r2s)y2s2dyds.\begin{equation*}\phi(r) := \frac{1}{r^n} \iint_{E(r)} u(y,s) \frac{|y|^2}{s^2} \,dy\,ds= \iint_{E(1)} u(ry,r^2s) \frac{|y|^2}{s^2} \,dy\,ds.\end{equation*}
We compute
ϕ(r)=E(1)i=1nuyiyiy2s2+2rusy2sdyds=1rn+1E(r)i=1nuyiyiy2s2+2usy2sdyds=:A+B.\begin{align*}\phi'(r) &= \iint_{E(1)} \sum_{i=1}^n u_{y_i}y_i\frac{|y|^2}{s^2} + 2ru_s\frac{|y|^2}{s} \,dy\,ds \\&= \frac{1}{r^{n+1}} \iint_{E(r)} \sum_{i=1}^n u_{y_i}y_i\frac{|y|^2}{s^2} + 2u_s\frac{|y|^2}{s} \,dy\,ds \\&=: A + B.\end{align*}
Also, let us introduce the useful function
ψ:=n2log(4πs)+y24s+nlogr\begin{equation*}\psi := -\frac{n}{2}\log(-4\pi s) + \frac{|y|^2}{4s} + n\log r\end{equation*}
and observe ψ=0\psi = 0 on E(r)\partial E(r), since Φ(y,s)=rn\Phi(y,-s) = r^{-n} on E(r)\partial E(r). We utilize ψ\psi to write
B=1rn+1E(r)4usi=1nyiψyidyds=1rn+1E(r)4nusψ+4i=1nusyiψdyds;\begin{align*}B &= \frac{1}{r^{n+1}} \iint_{E(r)} 4u_s \sum_{i=1}^n y_i\psi_{y_i} \,dy\,ds \\&= -\frac{1}{r^{n+1}} \iint_{E(r)} 4nu_s\psi + 4\sum_{i=1}^n u_{sy_i}\psi \,dy\,ds;\end{align*}
there is no boundary term since ψ=0\psi = 0 on E(r)\partial E(r). Integrating by parts with respect to ss, we discover
B=1rn+1E(r)4nusψ+4i=1nuyiψsdyds=1rn+1E(r)4nusψ+4i=1nuyiyi(n2sy24s2)dyds=1rn+1E(r)4nusψ2nsi=1nuyiyidydsA.\begin{align*}B &= \frac{1}{r^{n+1}} \iint_{E(r)} -4n u_s\psi + 4\sum_{i=1}^n u_{y_i}\psi_s \,dy\,ds \\&= \frac{1}{r^{n+1}} \iint_{E(r)} -4n u_s\psi + 4\sum_{i=1}^n u_{y_i}y_i\left(-\frac{n}{2s} - \frac{|y|^2}{4s^2}\right) \,dy\,ds \\&= \frac{1}{r^{n+1}} \iint_{E(r)} -4n u_s\psi - \frac{2n}{s}\sum_{i=1}^n u_{y_i}y_i \,dy\,ds - A.\end{align*}
Consequently, since uu solves the heat equation,
ϕ(r)=A+B=1rn+1E(r)4nΔuψ2nsi=1nuyiyidyds=i=1n1rn+1E(r)4nuyiψyi2nsuyiyidyds=0.\begin{align*}\phi'(r) &= A + B \\&= \frac{1}{r^{n+1}} \iint_{E(r)} -4n\Delta u\psi - \frac{2n}{s}\sum_{i=1}^n u_{y_i}y_i \,dy\,ds \\&= \sum_{i=1}^n \frac{1}{r^{n+1}} \iint_{E(r)} 4nu_{y_i}\psi_{y_i} - \frac{2n}{s}u_{y_i}y_i \,dy\,ds \\&= 0.\end{align*}
Thus ϕ\phi is constant, and therefore
ϕ(r)=limt0ϕ(t)=u(0,0)(limt01tnE(t)y2s2dyds)=4u(0,0),\begin{equation*}\phi(r) = \lim_{t\to 0}\phi(t) = u(0,0)\left(\lim_{t\to 0}\frac{1}{t^n}\iint_{E(t)} \frac{|y|^2}{s^2}\,dy\,ds\right) = 4u(0,0),\end{equation*}
as
1tnE(t)y2s2dyds=E(1)y2s2dyds=4.\begin{equation*}\frac{1}{t^n}\iint_{E(t)} \frac{|y|^2}{s^2}\,dy\,ds = \iint_{E(1)} \frac{|y|^2}{s^2}\,dy\,ds = 4.\end{equation*}
We omit the details of this last computation \Box.

Strong Maximum Principle and Uniqueness

The foolowing material is taken from [EvansPDE2010] p. 55-57

We employ the mean-value property to give a quick proof of the strong maximum principle.
Theorem (Strong maximum principle for the Heat Equation)
Assume uC12(UT)C(UT)u \in C_1^2(U_T) \cap C(\overline{U_T}) solves the heat equation in UTU_T.
1. Then
maxUTu=maxΓTu.\begin{equation*}\max_{U_T} u = \max_{\Gamma_T} u.\end{equation*}
2. Furthermore, if UU is connected and there exists a point (x0,t0)UT(x_0,t_0) \in U_T such that
u(x0,t0)=maxUTu,\begin{equation*}u(x_0,t_0) = \max_{U_T} u,\end{equation*}
then
u is constant in Ut0.\begin{equation*}u \text{ is constant in } \overline{U}_{t_0}.\end{equation*}
Assertion (1) is the maximum principle for the heat equation and (2) is the strong maximum principle. Similar assertions are valid with "min" replacing "max."
\quad Proof. 1. Suppose there exists a point (x0,t0)UT(x_0,t_0) \in U_T with
u(x0,t0)=M:=maxUTu.\begin{equation*}u(x_0,t_0) = M := \max_{U_T} u.\end{equation*}
Then for all sufficiently small r>0r > 0, E(x0,t0;r)UTE(x_0,t_0;r) \subset U_T; and we employ the mean-value property to deduce
M=u(x0,t0)=14rnE(x0,t0;r)u(y,s)x0y2(t0s)2dydsM,\begin{equation*}M = u(x_0,t_0) = \frac{1}{4r^n} \iint_{E(x_0,t_0;r)} u(y,s)\frac{|x_0-y|^2}{(t_0-s)^2} \,dy\,ds \leq M,\end{equation*}
since
1=14rnE(x0,t0;r)x0y2(t0s)2dyds.\begin{equation*}1 = \frac{1}{4r^n} \iint_{E(x_0,t_0;r)} \frac{|x_0-y|^2}{(t_0-s)^2} \,dy\,ds.\end{equation*}
Equality holds only if uu is identically equal to MM within E(x0,t0;r)E(x_0,t_0;r). Consequently
u(y,s)=Mfor all (y,s)E(x0,t0;r).\begin{equation*}u(y,s) = M \quad \text{for all } (y,s) \in E(x_0,t_0;r).\end{equation*}
Draw any line segment LL in UTU_T connecting (x0,t0)(x_0,t_0) with some other point (y0,s0)UT(y_0,s_0) \in U_T, with s0<t0s_0 < t_0. Consider
r0:=min{ss0u(x,t)=M for all points (x,t)L,stt0}.\begin{equation*}r_0 := \min\{s \geq s_0 \,|\, u(x,t) = M \text{ for all points } (x,t) \in L, \,s \leq t \leq t_0\}.\end{equation*}
Since uu is continuous, the minimum is attained. Assume r0>s0r_0 > s_0. Then u(z0,r0)=Mu(z_0,r_0) = M for some point (z0,r0)(z_0,r_0) on LUTL \cap U_T and so uMu \equiv M on E(z0,r0;r)E(z_0,r_0;r) for all sufficiently small r>0r > 0. Since E(z0,r0;r)E(z_0,r_0;r) contains L{r0σtr0}L \cap \{r_0-\sigma \leq t \leq r_0\} for some small σ>0\sigma > 0, we have a contradiction. Thus r0=s0r_0 = s_0, and hence uMu \equiv M on LL.
2. Now fix any point xUx \in U and any time 0t<t00 \leq t < t_0. There exist points {x0,x1,,xm=x}\{x_0,x_1,\ldots,x_m = x\} such that the line segments in Rn\mathbb{R}^n connecting xi1x_{i-1} to xix_i lie in UU for i=1,,mi = 1,\ldots,m. (This follows since the set of points in UU which can be so connected to x0x_0 by a polygonal path is nonempty, open and relatively closed in UU.) Select times t0>t1>>tm=tt_0 > t_1 > \cdots > t_m = t. Then the line segments in Rn+1\mathbb{R}^{n+1} connecting (xi1,ti1)(x_{i-1},t_{i-1}) to (xi,ti)(x_i,t_i) (i=1,,m)(i = 1,\ldots,m) lie in UTU_T. According to step 1, uMu \equiv M on each such segment and so u(x,t)=Mu(x,t) = M. \Box

References