Professional Documents
Culture Documents
D. DeTurck
University of Pennsylvania
D. DeTurck
1 / 21
u(b, t) = q(t)
for t > 0.
We showed that this problem has at most one solution, now its
time to show that a solution exists.
D. DeTurck
2 / 21
Linearity
Well begin with a few easy observations about the heat equation
ut = kuxx , ignoring the initial and boundary conditions for the
moment:
D. DeTurck
3 / 21
Linearity
Well begin with a few easy observations about the heat equation
ut = kuxx , ignoring the initial and boundary conditions for the
moment:
Since the heat equation is linear (and homogeneous), a linear
combination of two (or more) solutions is again a solution. So
if u1 , u2 ,. . . are solutions of ut = kuxx , then so is
c1 u1 + c2 u2 +
for any choice of constants c1 , c2 , . . .. (Likewise, if u (x, t) is
a solution of the heat equation that depends (in a reasonable
way) on a parameter , then for any (reasonable) function
f () the function
2
U(x, t) =
f ()u (x, t) d
1
is also a solution.
D. DeTurck
3 / 21
D. DeTurck
4 / 21
u(x, 0) = f (x),
D. DeTurck
u(a, t) = u(b, t) = 0.
4 / 21
u(x, 0) = f (x),
u(a, t) = u(b, t) = 0.
D. DeTurck
4 / 21
u(x, 0) = f (x),
u(a, t) = u(b, t) = 0.
D. DeTurck
4 / 21
Symmetry
constants a and b.
Note the with the x but only + with t you cant
reverse time with the heat equation. This shows that the
heat equation respects (or reflects) the second law of
thermodynamics (you cant unstir the cream from your
coffee).
D. DeTurck
5 / 21
Symmetry
constants a and b.
Note the with the x but only + with t you cant
reverse time with the heat equation. This shows that the
heat equation respects (or reflects) the second law of
thermodynamics (you cant unstir the cream from your
coffee).
If u(x, t) is a solution then so is u(a2 t, at) for any constant a.
D. DeTurck
5 / 21
Polynomial solutions
Now its time to at least find some examples of solutions to
ut = kuxx .
One thing we can try is polynomial solutions. Certainly any
D. DeTurck
6 / 21
Polynomial solutions
Now its time to at least find some examples of solutions to
ut = kuxx .
One thing we can try is polynomial solutions. Certainly any
D. DeTurck
6 / 21
Polynomial solutions
Now its time to at least find some examples of solutions to
ut = kuxx .
One thing we can try is polynomial solutions. Certainly any
6 / 21
Polynomial solutions
p1 = kp000 ,
p2 =
k 00 k 2 0000
p =
p ,
2 1
2 0
k 00 k 3 (6)
k n (2n)
p2 =
p0 , . . . , pn =
p
3
3!
n! 0
This process will stop if p0 is a polynomial, and well get a
polynomial solution of the heat equation whose x-degree is
twice its t-degree:
p3 =
u(x, t) = p0 (x) +
kt 00 k 2 t 2 0000
k n t n (2n)
p0 +
p0 + +
p
+ .
1!
2!
n! 0
D. DeTurck
7 / 21
But. . .
D. DeTurck
8 / 21
Separation of variables
A more fruitful strategy is to look for separated solutions of
D. DeTurck
9 / 21
Separation of variables
A more fruitful strategy is to look for separated solutions of
ut = kuxx we get:
X
dT
d 2X
= k 2 T.
dt
dx
D. DeTurck
9 / 21
Separation of variables
A more fruitful strategy is to look for separated solutions of
ut = kuxx we get:
X
dT
d 2X
= k 2 T.
dt
dx
1 d 2X
1 dT
.
=
kT dt
X dx 2
D. DeTurck
9 / 21
Separation of Variables
D. DeTurck
T0
X 00
=
.
kT
X
10 / 21
Separation of Variables
T0
X 00
=
.
kT
X
In this last equation, everything on the left side is a function
of t, and everything on the right side is a function of x. This
means that both sides are constant, say equal to which
gives ODEs for X and T :
X 00 X = 0
D. DeTurck
T 0 kT = 0
10 / 21
Separation of Variables
T0
X 00
=
.
kT
X
In this last equation, everything on the left side is a function
of t, and everything on the right side is a function of x. This
means that both sides are constant, say equal to which
gives ODEs for X and T :
X 00 X = 0
T 0 kT = 0
D. DeTurck
10 / 21
Boundary conditions
ODEs for X and T :
X 00 X = 0
T 0 kT = 0
D. DeTurck
11 / 21
Boundary conditions
ODEs for X and T :
X 00 X = 0
T 0 kT = 0
D. DeTurck
11 / 21
Boundary conditions
ODEs for X and T :
X 00 X = 0
T 0 kT = 0
D. DeTurck
11 / 21
Boundary conditions
ODEs for X and T :
X 00 X = 0
T 0 kT = 0
11 / 21
Restrictions on
We have X = c1 cos x + c2 sin x, X (0) = 0, X (L) = 0.
D. DeTurck
12 / 21
Restrictions on
We have X = c1 cos x + c2 sin x, X (0) = 0, X (L) = 0.
First, note that X (0) = c1 . The condition X (0) = 0 then
forces c1 = 0.
D. DeTurck
12 / 21
Restrictions on
We have X = c1 cos x + c2 sin x, X (0) = 0, X (L) = 0.
First, note that X (0) = c1 . The condition X (0) = 0 then
forces c1 = 0.
Now we need to reconcile three things: X = c2 sin x,
X (L) = 0 and we dont want X to be identically zero (i.e., we
want c2 6= 0).
D. DeTurck
12 / 21
Restrictions on
We have X = c1 cos x + c2 sin x, X (0) = 0, X (L) = 0.
First, note that X (0) = c1 . The condition X (0) = 0 then
forces c1 = 0.
Now we need to reconcile three things: X = c2 sin x,
X (L) = 0 and we dont want X to be identically zero (i.e., we
want c2 6= 0).
This gives a condition on : sin L = 0, or L = n for some
integer n.
D. DeTurck
12 / 21
Restrictions on
We have X = c1 cos x + c2 sin x, X (0) = 0, X (L) = 0.
First, note that X (0) = c1 . The condition X (0) = 0 then
forces c1 = 0.
Now we need to reconcile three things: X = c2 sin x,
X (L) = 0 and we dont want X to be identically zero (i.e., we
want c2 6= 0).
This gives a condition on : sin L = 0, or L = n for some
integer n.
Since sin(x) = sin x, we need only consider positive
integers n. Thus
=
n
,
L
and
X = c2 sin
n = 1, 2, 3, . . .
nx
,
L
D. DeTurck
n = 1, 2, 3, . . .
12 / 21
T 0 kT = 0.
D. DeTurck
13 / 21
T 0 kT = 0.
And we know that = n/L for n = 1, 2, 3, . . ., so we have to
solve
n2 k 2
T0 +
T = 0,
n = 1, 2, 3 . . . .
L2
D. DeTurck
13 / 21
T 0 kT = 0.
And we know that = n/L for n = 1, 2, 3, . . ., so we have to
solve
n2 k 2
T0 +
T = 0,
n = 1, 2, 3 . . . .
L2
The general solution of these are
T = ce n
2 k 2 t/L2
D. DeTurck
n = 1, 2, 3, . . . .
13 / 21
T 0 kT = 0.
And we know that = n/L for n = 1, 2, 3, . . ., so we have to
solve
n2 k 2
T0 +
T = 0,
n = 1, 2, 3 . . . .
L2
The general solution of these are
T = ce n
2 k 2 t/L2
n = 1, 2, 3, . . . .
2 k 2 t/L2
D. DeTurck
sin
nx
,
L
n = 1, 2, 3, . . .
13 / 21
Superposition, again
We can put these solutions together to get solutions of the
form
x
2x
2
2
+ b2 e 4 t/L sin
+
L
L
Nx
2
2
2
+ bN e N k t/L sin
.
L
u(x, t) = b1 e k
2 t/L2
sin
D. DeTurck
14 / 21
Superposition, again
We can put these solutions together to get solutions of the
form
x
2x
2
2
+ b2 e 4 t/L sin
+
L
L
Nx
2
2
2
+ bN e N k t/L sin
.
L
u(x, t) = b1 e k
2 t/L2
sin
x
3x
6x
2 sin
+ sin
.
L
L
L
D. DeTurck
14 / 21
X
n=1
D. DeTurck
bn e n
2 k 2 t/L2
sin
nx
L
15 / 21
bn e n
2 k 2 t/L2
sin
n=1
nx
L
f (x) =
X
n=1
D. DeTurck
bn sin
nx
.
L
15 / 21
bn e n
2 k 2 t/L2
sin
n=1
nx
L
f (x) =
X
n=1
bn sin
nx
.
L
D. DeTurck
15 / 21
bn e n
2 k 2 t/L2
sin
n=1
nx
L
f (x) =
X
n=1
bn sin
nx
.
L
15 / 21
the problem
1
ut = uxx , u(0, t) = u(3, t) = 0,
5
for t > 0 and 0 x 3.
D. DeTurck
u(x, 0) = 3x x 2
16 / 21
the problem
1
ut = uxx , u(0, t) = u(3, t) = 0, u(x, 0) = 3x x 2
5
for t > 0 and 0 x 3.
Well assume that we can express u as
X
nx
2 2
u(x, t) =
bn e n t/45 sin
3
n=1
(this is the ansatz) and see if we can figure out what the
constants bn should be we know that the boundary
conditions are automatically satisfied, and perhaps we can
choose the bn s so that
X
nx
.
3x x 2 =
bn sin
3
n=1
D. DeTurck
16 / 21
3x x 2 =
X
n=1
bn sin
nx
.
3
D. DeTurck
17 / 21
3x x 2 =
bn sin
n=1
nx
.
3
sin
0
mx
nx
sin
dx = 0.
3
3
If n = m then
sin
0
nx
mx
sin
dx =
3
3
D. DeTurck
sin2
0
nx
3
dx = .
3
2
17 / 21
3x x =
X
n=1
bn sin
nx
.
3
sides by sin mx
3 and integrate both sides from 0 to 3:
!
3 X
3
mx
nx
mx
2
dx =
sin
dx
bn sin
(3x x ) sin
3
3
3
0
0
n=1
3
X
nx
mx
=
bn
sin
sin
dx
3
3
0
n=1
=
D. DeTurck
3bm
2
Math 241 002 2012C: Solving the heat equation
18 / 21
Integration by parts
Its an exercise in integration by parts to show that
(3x x 2 ) sin
0
54
mx
dx = 3 3 (1 (1)m )
3
m
D. DeTurck
19 / 21
Integration by parts
Its an exercise in integration by parts to show that
(3x x 2 ) sin
0
54
mx
dx = 3 3 (1 (1)m )
3
m
Therefore,
36
bm = 3 3 (1 (1)m ) =
D. DeTurck
72
m3 3
m even
m odd
19 / 21
Integration by parts
Its an exercise in integration by parts to show that
(3x x 2 ) sin
0
54
mx
dx = 3 3 (1 (1)m )
3
m
Therefore,
36
bm = 3 3 (1 (1)m ) =
72
m3 3
m even
m odd
u(x, t) =
X
n=0
72
(2n + 1)x
2 2
e (2n+1) t/45 sin
3
3
(2n + 1)
3
D. DeTurck
19 / 21
The series
u(x, t) =
X
n=0
72
(2n + 1)x
2 2
e (2n+1) t/45 sin
3
3
(2n + 1)
3
D. DeTurck
20 / 21
The series
u(x, t) =
X
n=0
72
(2n + 1)x
2 2
e (2n+1) t/45 sin
3
3
(2n + 1)
3
u(x, 0) =
X
n=0
72
(2n + 1)x
sin
2
3
(2n + 1)
3
D. DeTurck
20 / 21
Graphical evidence
Red graph: 3x x 3 , Blue graph: sum
One term:
Three terms:
D. DeTurck
21 / 21
D. DeTurck
22 / 21
Another example
Now, lets look at a problem with insulated ends:
1
ut = uxx , ux (0, t) = ux (3, t) = 0,
5
for t > 0 and 0 x 3.
D. DeTurck
u(x, 0) = 3x x 2
23 / 21
Another example
Now, lets look at a problem with insulated ends:
1
ut = uxx , ux (0, t) = ux (3, t) = 0, u(x, 0) = 3x x 2
5
for t > 0 and 0 x 3.
This time, with the boundary conditions in mind, well assume
that we can express u as
u(x, t) =
an e n
2 2 t/45
n=0
cos
nx
3
3x x =
X
n=0
D. DeTurck
an cos
nx
.
3
23 / 21
Useful integrals
Were trying to find an s so that
3x x 2 =
X
n=0
D. DeTurck
an cos
nx
.
3
24 / 21
Useful integrals
Were trying to find an s so that
3x x 2 =
X
n=0
an cos
nx
.
3
cos
0
nx
mx
cos
dx = 0.
3
3
If n = m > 0 then
3
nx
mx
3
nx
cos
dx =
cos2
dx =
3
3
3
2
0
0
3
whereas if n = m = 0 we get 0 12 dx = 3.
3
cos
D. DeTurck
24 / 21
3x x 2 =
X
n=0
bn cos
nx
.
3
sides by cos mx
3 and integrate both sides from 0 to 3. For
m > 0 we get:
!
3
3 X
nx
mx
mx
an cos
(3x x 2 ) cos
dx =
sin
dx
3
3
3
0
0
n=0
3
X
nx
mx
=
an
cos
cos
dx
3
3
0
n=0
3am
2
25 / 21
Integration by parts
0
mx
9
dx =
(3x x 2 ) cos
2 27
3
m2 2
D. DeTurck
m odd
m=0
m > 0. even
26 / 21
Integration by parts
0
mx
9
dx =
(3x x 2 ) cos
2 27
3
m2 2
m odd
m=0
m > 0. even
u(x, t) =
3 X 36
2nx
2 2
D. DeTurck
26 / 21
The series
u(x, t) =
3 X 36
2nx
2 2
D. DeTurck
27 / 21
The series
u(x, t) =
3 X 36
2nx
2 2
u(x, 0) =
3 X 36
2nx
cos
2
2
2
(2n)
3
n=1
D. DeTurck
27 / 21
Graphical evidence
Red graph: 3x x 3 , Blue graph: sum
One term, two terms:
D. DeTurck
28 / 21
D. DeTurck
29 / 21
u(3, t) = 0?
What about u(0, t) = 0, ux (3, t) = 0?
What about something like u(0, t) = 0, ux (3, t) + u(3, t) = 0?
D. DeTurck
30 / 21