Introduction To PDEs
Introduction To PDEs
Differential Equations
Andrew J. Bernoff
LECTURE 2
Cooling of a Hot Bar:
The Diffusion Equation
(2.2)
U (0) = U0 ,
1
Figure 2.1: (a) A coffee cup (b) Its temperature as a function of time.
(draw your own figure).
If we graph the temperature as a function of time, we see that it decays
exponentially to the ambient temperature, U , at a rate governed by .
When we derived Newtons Law of cooling we made several assumptions most importantly that the temperature in the coffee cup did
not vary with location. If we account for the variation of temperature with location, we can derive a PDE called the heat equation or,
more generally, the diffusion equation. If the temperature, U (x, t) is
a function of a single spatial variable, x, we will show that it satisfies
the diffusion equation,
Ut = DUxx ,
where D is a constant known as the thermal diffusivity. In higher
dimensions, the equation can be written
Ut = D2 U,
where 2 is the Laplacian.
E = 0 cv A
U (x, t) dx
a
The important term in the integral is the temperature, U (x, t), measured in degrees. The remaining constants, A, the cross-sectional area
(with units of [(length)2 ]), 0 , the density [mass/(length)3 ] and cv , the
heat capacity [energy/(degree mass)] are physical properties of the
material think of them as being obligatory for making the units work
out.
We wish to equate the change in thermal energy to the heat flux
out of the bar through the planes at x = a and x = b. To do this we
use Fouriers heat law which states that the flux density of thermal
energy, q(x, t) is proportional to the temperature gradient,
(2.5)
q(x, t) = kUx ,
where the negative sign reflects the fact that heat flows from hot to cold,
just as in Newtons law of cooling, with a constant of proportionality,
k, called the thermal conductivity [(energylength)/(degreestime)].
where we multiply by the area A to get the total flux through the
cross-section.
By conservation of energy, the rate of change of the energy
between a and b is given by the flux into the region,
dE
= Q.
dt
(2.7)
Once again we can rewrite the flux by a clever application of the fundamental theorem of calculus,
(2.8)
(2.9)
or, rearranging
b
cv A Ut + Aqx dx = 0.
(2.11)
a
Since this is true for every interval a < x < b, the integrand must
vanish identically. So
(2.12)
cv AUt + Aqx = 0.
cv AUt kA(Ux )x = 0.
Ut = DUxx ,
U (0, t) = U0
U (L, t) = U1 ,
which are usually referred to as Dirichlet boundary conditions. Alternatively, we could specify a heat flux,
(2.16)
U (x, 0) = f (x)
0 < x < L.
U (0, t) = U0
Ut = DUxx
0 < x < L, t > 0
U (L, t) = U1
t>0
U (x, 0) = f (x)
0 < x < L.
DE
BC
IC
Solving the general problem will have to wait, but we can find some
specific solutions to the problem using the ideas of Separation of
Variables. For the moment, we will restrict ourselves to homogeneous
boundary conditions,
The Dirichlet Problem for the Diffusion Equation
(Homogeneous Boundary Conditions)
Ut = DUxx
0 < x < L, t > 0
U (0, t) = 0 U (L, t) = 0
t>0
U (x, 0) = f (x)
0 < x < L,
DE
BC
IC
If you want, you can skip the derivation for the moment and jump
ahead to Exercise 1, if you dont mind the solution appearing deus ex
machina ( a fancy term for out of thin air).
1See,
for example, T. W. K
orner, Fourier Analysis, Cambridge University Press,
p. 338.
XTt = DXxx T
(2.22)
Tt = DT
T (t) = et ,
X(0) = 0
X(L) = 0
So finally we conclude that we are looking for solutions to the Boundary Value Problem for X(x),
(2.25)
Xxx + X = 0,
X(0) = 0 X(L) = 0.
(2.27)
C sin( L) = 0.
Consequently, a non-trivial solution (that is a solution for which X(x) 6=
0) for X(x) can be found if and only if
n 2
(2.28)
= n
for n = 1, 2, 3 . . .
L
nx
for n = 1, 2, 3 . . . ,
L
or some constant multiple of it. These special values of are called
eigenvalues and the associated functions, Xn (x), are known as eigenfunctions.
Multiplying the solution for Xn (x) and T (t) together finally yields
a solution for Un (x, t),
nx
n 2
(2.30) U (x, t) = Un (x, t) sin
e( L ) Dt for n = 1, 2, 3 . . . .
L
The method of separation of variables is very powerful it will be
one of our primary tools for finding solutions to PDEs in the coming
lectures.
nx
X
X
n 2
an sin
an Un (x, t) =
U (x, t) =
e( L ) Dt
L
n=1
n=1
also satisfies the diffusion equation and the homogeneous boundary
condition. Does it worry you that this is an infinite sum? What initial
condition, U (x, 0), does this correspond to?
U (x, 0) = f (x)
< x < .
DE
BC
IC
While there are many clever derivation for the solution to this problem,
for the moment I will simply give you the most important solution,
usually called the fundamental solution or the diffusion kernel,
x2
1
(2.31)
U (x, t) = G(x, t + ) p
e 4D(t+ ) .
4D(t + )
where is a constant (which we will assume is positive). This solution
can be used to construct a general solution of the diffusion equation
for an arbitrary initial condition, f (x).
x2
e 4D(t+ ) .
4D(t + )
satisfies the diffusion equation and the boundary conditions for the
Cauchy problem when > 0 . Show that this solution corresponds
to a Gaussian with time varying width and height. How does the
Gaussians width, height and area vary in time?
10
DE
BC
IC
12
DE
BC
IC
U0 (x, t) = 1
nx
n 2
e( L )
Dt
n = 1, 2, 3, . . .
L
satisfy both the diffusion equation (DE) and the homogeneous
Neumann boundary conditions (BC).
(c) Write down a general solution as a linear combination of the
solutions you found in part (b). What does this say about
f (x) if we assume that this solution also satisfies the initial
condition (IC)?
(ii)
Un (x, t) = cos
14