4Partial differential equations

IB Methods



4.7 The heat equation
We choose Ω =
R
n
×
[0
,
). We treat
R
n
as the “space” variable, and [0
,
) as
our time variable.
Definition (Heat equation). The heat equation for a function φ : Ω C is
φ
t
= κ
2
φ,
where κ > 0 is the diffusion constant.
We can think of this as a function
φ
representing the “temperature” at
different points in space and time, and this equation says the rate of change of
temperature is proportional to
2
φ.
Our previous study of the Laplace’s equation comes in handy. When our
system is in equilibrium and does not change with time, then we are left with
Laplace’s equation.
Let’s first look at some interesting properties of the heat equation.
The first most important property of the heat equation is that the total
“heat” is conserved under evolution by the heat equation, i.e.
d
dt
Z
R
n
φ(x, t) d
n
x = 0,
since we can write this as
d
dt
Z
R
n
φ(x, t) d
n
x =
Z
R
n
φ
t
d
n
x = κ
Z
R
n
2
φ d
n
x = 0,
provided φ(x, t) 0 as |x| .
In particular, on a compact space, i.e. =
M ×
[0
,
) with
M
compact,
there is no boundary term and we have
d
dt
Z
M
φ dµ = 0.
The second useful property is if
φ
(
x, t
) solves the heat equation, so do
φ
1
(
x, t
) =
φ(x x
0
, t t
0
), and φ
2
(x, t) = (λx, λ
2
t).
Let’s try to choose A such that
Z
R
n
φ
2
(x, t) d
n
x =
Z
R
n
φ(x, t) d
n
x.
We have
Z
R
n
φ
2
(x, t) d
n
x = A
Z
R
n
φ(λx, λ
2
t) d
n
x =
n
Z
R
n
φ(y, λ
2
t) d
n
y,
where we substituted y = λx.
So if we set
A
=
λ
n
, then the total heat in
φ
2
at time
λ
2
t
is the same as the
total heat in
φ
at time
t
. But the total heat is constant in time. So the total
heat is the same all the time.
Note again that if
φ
t
=
κ
2
φ
on Ω
×
[0
,
), then so does
λ
n
φ
(
λx, λ
2
t
). This
means that nothing is lost by letting
λ
=
1
and consider solutions of the form
φ(x, t) =
1
(κt)
n/2
F
x
κt
=
1
(κt)
n/2
F (η),
where
η =
x
κt
.
For example, in 1 + 1 dimensions, we can look for a solution of the form
1
κt
F
(
η
).
We have
φ
t
=
t
1
κt
F (η)
=
1
2
κt
3
F (η) +
1
κt
dη
dt
F
0
(η) =
1
2
κt
3
[F + ηF
0
]
On the other side of the equation, we have
κ
2
x
2
1
κt
F (η)
=
κ
κt
x
η
x
F
0
=
1
κt
3
F
00
.
So the equation becomes
0 = 2F
00
+ ηF
0
+ F = (2F
0
+ ηF )
0
.
So we have
2F
0
+ ηF = const,
and the boundary conditions require that the constant is zero. So we get
F
0
=
η
2
F.
We now see a solution
F (η) = a exp
η
2
4
.
By convention, we now normalize our solution φ(x, t) by requiring
Z
−∞
φ(x, t) dx = 1.
This gives
a =
1
4π
,
and the full solution is
φ(x, t) =
1
4πκt
exp
x
2
4κt
.
More generally, on R
n
× [0, ), we have the solution
φ(x, t) =
1
(4π(t t
0
))
n/2
exp
(x x
0
)
2
4κ(t t
0
)
.
At any fixed time
t 6
=
t
0
, the solutions are Gaussians centered on
x
0
with standard
deviation
p
2κ(t t
0
), and the height of the peak at x = x
0
is
q
1
4πκ(tt
0
)
.
We see that the solution gets “flatter” as
t
increases. This is a general property
of the evolution by the heat equation. Suppose we have an eigenfunction
y
(
x
) of
the Laplacian on Ω, i.e.
2
y
=
λy
. We want to show that in certain cases,
λ
must be positive. Consider
λ
Z
|y|
2
d
n
x =
Z
y
(x)
2
y(x) d
n
x =
Z
y
n · y d
n1
x
Z
|∇y|
2
d
n
x.
If there is no boundary term, e.g. when is closed and compact (e.g. a sphere),
then we get
λ =
R
|∇y|
2
d
n
x
R
|y|
2
d
n
x
.
Hence the eigenvalues are all positive. What does this mean for heat flow?
Suppose
φ
(
x, t
) obeys the heat equation for
t >
0. At time
t
= 0, we have
φ(x, 0) = f(x). We can write the solution (somehow) as
φ(x, t) = e
t
2
φ(x, 0),
where we (for convenience) let κ = 1. But we can expand our initial condition
φ(x, 0) = f(x) =
X
I
c
I
y
I
(x)
in a complete set {y
I
(x)} of eigenfunctions for
2
.
By linearity, we have
φ(x, t) = e
t
2
X
I
c
I
y
I
(x)
!
=
X
I
c
I
e
t
2
y
I
(x)
=
X
I
c
I
e
λ
2
t
y
I
(x)
= c
I
(t)y
I
(x),
where
c
I
(
t
) =
c
I
e
λ
2
t
. Since
λ
I
are all positive, we know that
c
I
(
t
) decays
exponentially with time. In particular, the coefficients corresponding to the
largest eigenvalues
|λ
I
|
decays most rapidly. We also know that eigenfunctions
with larger eigenvalues are in general more “spiky”. So these smooth out rather
quickly.
When people first came up with the heat equation to describe heat loss, they
were slightly skeptical this flattening out caused by the heat equation is not
time-reversible, while Newton’s laws of motions are all time reversible. How
could this smoothening out arise from reversible equations?
Einstein came up with an example where the heat equation can come out of
apparently naturally from seemingly reversible laws, namely Brownian motion.
The idea is that a particle will randomly jump around in space, where the
movement is independent of time and position.
Let the probability that a dust particle moves through a step
y
over a time
t be p(y, t). For any fixed t, we must have
Z
−∞
p(y, t) dy = 1.
We also assume that
p
(
y,
t
) is independent of time, and of the location of the
dust particle. We also assume
p
(
y,
t
) is strongly peaked around
y
= 0 and
p
(
y,
t
) =
p
(
y,
t
). Now let
P
(
x, t
) be the probability that the dust particle
is located at x at time t. Then at time t + δt, we have
P (x, t + t) =
Z
−∞
P (x y, t)p(y, t) dy.
For P (x y, t) sufficiently smooth, we can write
P (x y, t) P (x, t) y
P
x
(x, t) +
y
2
2
2
P
x
2
(x, t).
So we get
P (x, t + t) P (x, t)
P
x
(x, t)hyi +
1
2
hy
2
i
2
P
x
2
P (x, t) + ··· ,
where
hy
r
i =
Z
−∞
y
r
p(y, t) dy.
Since
p
is even, we expect
hy
r
i
to vanish when
r
is odd. Also, since
y
is strongly
peaked at 0, we expect the higher order terms to be small. So we can write
P (x, t + t) P (x, t) =
1
2
hy
2
i
2
P
x
2
.
Suppose that as we take the limit
t
0, we get
hy
2
i
2∆t
κ
for some
κ
. Then
this becomes the heat equation
P
t
= κ
2
P
x
2
.
Proposition.
Suppose
φ
: Ω
×
[0
,
)
R
satisfies the heat equation
φ
t
=
κ
2
φ
,
and obeys
Initial conditions φ(x, 0) = f (x) for all x
Boundary condition φ(x, t)|
= g(x, t) for all t [0, ).
Then φ(x, t) is unique.
Proof. Suppose φ
1
and φ
2
are both solutions. Then define Φ = φ
1
φ
2
and
E(t) =
1
2
Z
Φ
2
dV.
Then we know that
E
(
t
)
0. Since
φ
1
, φ
2
both obey the heat equation, so does
Φ. Also, on the boundary and at t = 0, we know that Φ = 0. We have
dE
dt
=
Z
Φ
dt
dV
= κ
Z
Φ
2
Φ dV
= κ
Z
ΦΦ · dS κ
Z
(Φ)
2
dV
= κ
Z
(Φ)
2
dV
0.
So we know that
E
decreases with time but is always non-negative. We also
know that at time
t
= 0,
E
= Φ = 0. So
E
= 0 always. So Φ = 0 always. So
φ
1
= φ
2
.
Example
(Heat conduction in uniform medium)
.
Suppose we are on Earth,
and the Sun heats up the surface of the Earth through sun light. So the sun will
maintain the soil at some fixed temperature. However, this temperature varies
with time as we move through the day-night cycle and seasons of the year.
We let
φ
(
x, t
) be the temperature of the soil as a function of the depth
x
,
defined on R
0
× [0, ). Then it obeys the heat equation with conditions
(i) φ(0, t) = φ
0
+ A cos
2πt
t
D
+ B cos
2πt
t
Y
.
(ii) φ(x, t) const as x .
We know that
φ
t
= K
2
φ
x
2
.
We try the separation of variables
φ(x, t) = T (t)X(x).
Then we get the equations
T
0
= λT, X
00
=
λ
K
X.
From the boundary solution, we know that our things will be oscillatory. So we
let λ be imaginary, and set λ = . So we have
φ(x, t) = e
t
a
ω
e
/Kx
+ b
ω
e
/Kx
.
Note that we have
r
K
=
(1 + i)
q
|ω|
2K
ω > 0
(i 1)
q
|ω|
2K
ω < 0
Since
φ
(
x, t
)
constant as
x
, we don’t want our
φ
to blow up. So if
ω <
0,
we need a
ω
= 0. Otherwise, we need b
ω
= 0.
To match up at x = 0, we just want terms with
|ω| = ω
D
=
2π
t
D
, |ω| = ω
Y
=
2π
t
Y
.
So we can write out solution as
φ(x, t) = φ
0
+ A exp
r
ω
D
2K
cos
ω
D
t
r
ω
D
2K
x
+ B exp
r
ω
Y
2K
cos
ω
Y
t
r
ω
Y
2K
x
We can notice a few things. Firstly, as we go further down, the effect of the sun
decays, and the temperature is more stable. Also, the effect of the day-night
cycle decays more quickly than the annual cycle, which makes sense. We also
see that while the temperature does fluctuate with the same frequency as the
day-night/annual cycle, as we go down, there is a phase shift. This is helpful
since we can store things underground and make them cool in summer, warm in
winter.
Example
(Heat conduction in a finite rod)
.
We now have a finite rod of length
2L.
x = 0
x = L x = L
We have the initial conditions
φ(x, 0) = Θ(x) =
(
1 0 < x < L
0 L < x < 0
and the boundary conditions
φ(L, t) = 0, φ(L, t) = 1
So we start with a step temperature, and then maintain the two ends at fixed
temperatures 0 and 1.
We are going to do separation of variables, but we note that all our boundary
and initial conditions are inhomogeneous. This is not helpful. So we use a
little trick. We first look for any solution satisfying the boundary conditions
φ
S
(
L, t
) = 0,
φ
S
(
L, t
) = 1. For example, we can look for time-independent
solutions φ
S
(x, t) = φ
S
(x). Then we need
d
2
φ
S
dx
2
= 0. So we get
φ
S
(x) =
x + L
2L
.
By linearity,
ψ
(
x, t
) =
φ
(
x, t
)
φ
s
(
x
) obeys the heat equation with the conditions
ψ(L, t) = ψ(L, t) = 0,
which is homogeneous! Our initial condition now becomes
ψ(x, 0) = Θ(x)
x + L
2L
.
We now perform separation of variables for
ψ(x, t) = X(x)T(t).
Then we obtain the equations
T
0
= κλT, X
0
= λX.
Then we have
ψ(x, t) =
h
a sin(
λx) + b cos(
λx)
i
e
κλt
.
Since initial condition is odd, we can eliminate all
cos
terms. Our boundary
conditions also requires
λ =
n
2
π
2
L
2
, n = 1, 2, ··· .
So we have
φ(x, t) = φ
s
(x) +
X
n=1
a
n
sin
x
L
exp
κn
2
π
2
L
2
t
,
where a
n
are the Fourier coefficients
a
n
=
1
L
Z
L
L
Θ(x)
x + L
2L
sin
x
L
dx =
1
.
Example
(Cooling of a uniform sphere)
.
Once upon a time, Charles Darwin
went around the Earth, looked at species, and decided that evolution happened.
When he came up with his theory, it worked quite well, except that there was
one worry. Was there enough time on Earth for evolution to occur?
This calculation was done by Kelvin. He knew well that the Earth started as
a ball of molten rock, and obviously life couldn’t have evolved when the world
was still molten rock. So he would want to know how long it took for the Earth
to cool down to its current temperature, and if that was sufficient for evolution
to occur.
We can, unsurprisingly, use the heat equation. We assume that at time
t
= 0,
the temperature is
φ
0
, the melting temperature of rock. We also assume that
the space is cold, and we let the temperature on the boundary of Earth as 0. We
then solve the heat equation on a sphere (or ball), and see how much time it
takes for Earth to cool down to its present temperature.
We let Ω =
{
(
x, y, z
)
R
3
, r R}
, and we want a solution
φ
(
r, t
) of the heat
equation that is spherically symmetric and obeys the conditions
φ(R, t) = 0
φ(r, 0) = φ
0
,
We can write the heat equation as
φ
t
= κ
2
φ =
κ
r
2
r
r
2
φ
r
.
Again, we do the separation of variables.
φ(r, t) = R(r)T (t).
So we get
T
0
= λ
2
κT,
d
dr
r
2
dR
dr
= λ
2
r
2
R.
We can simplify this a bit by letting
R
(
r
) =
S(r)
r
, then our radial equation just
becomes
S
00
= λ
2
S.
We can solve this to get
R(r) = A
λ
sin λr
r
+ B
λ
cos λr
r
.
We want a regular solution at
r
= 0. So we need
B
λ
= 0. Also, the boundary
condition φ(R, t) = 0 gives
λ =
R
, n = 1, 2, ···
So we get
φ(r, t) =
X
nZ
A
n
r
sin
r
R
exp
κn
2
π
2
t
R
2
,
where our coefficients are
A
n
= (1)
n+1
φ
0
R
.
We know that the Earth isn’t just a cold piece of rock. There are still volcanoes.
So we know many terms still contribute to the sum nowadays. This is rather
difficult to work with. So we instead look at the temperature gradient
φ
r
=
φ
0
r
X
nZ
(1)
n+1
cos
r
R
exp
κn
2
π
2
t
R
2
+ sin stuff.
We evaluate this at the surface of the Earth, R = r. So we get the gradient
φ
r
R
=
φ
0
R
X
nZ
exp
κn
2
π
2
t
R
2
φ
0
R
Z
−∞
exp
κπy
2
t
R
2
dy = φ
0
r
1
πκt
.
So the age of the Earth is approximately
t
φ
0
V
2
1
4πK
,
where
V =
φ
r
R
.
We can plug the numbers in, and get that the Earth is 100 million years. This is
not enough time for evolution.
Later on, people discovered that fission of metals inside the core of Earth
produce heat, and provides an alternative source of heat. So problem solved!
The current estimate of the age of the universe is around 4 billion years, and
evolution did have enough time to occur.