7 Separation of Variables: 7.1 Heat Equation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

7 Separation of Variables

Chapter 5, An Introduction to Partial Differential Equations, Pichover and


Rubinstein
In this section we introduce the technique, called the method of separations
of variables, for solving initial boundary value-problems.

7.1 Heat Equation


We consider the heat equation satisfying the initial conditions
(
ut = kuxx , x ∈ [0, L], t > 0
(7.1)
u(x, 0) = φ(x), x ∈ [0, L]

We seek a solution u satisfying certain boundary conditions. The boundary


conditions could be as follows:

(a) Dirichlet u(0, t) = u(L, t) = 0.

(b) Neumann ux (0, t) = ux (L, t).

(c) Periodic u(−L, t) = u(L, t) and ux (−L, t) = ux (L, t).

We look for solutions of the form

u(x, t) = X(x)T (t)

where X and T are function which have to be determined. Substituting


u(x, t) = X(x)T (t) into the equation, we obtain

X(x)T ′ (t) = kX ′′ (x)T (t)

from which, after dividing by kX(x)T (t), we get

T ′ (t) X ′′ (x)
= .
kT (t) X(x)
The left side depends only on t whereas the right hand side depends only
on x. Since they are equal, they must be equal to some constant −λ. Thus

T ′ + λkT = 0 (7.2)

and
X ′′ + λX = 0. (7.3)

53
The general solution of the first equation is given

T (t) = Be−λkt

for an arbitrary constant B. The general solutions of the second equation


are as follows.
√ √
(1) If λ < 0, then X(x) = α cosh −λx + β sinh −λx.
(2) If λ = 0, then X(x) = αx + β. (7.4)
√ √
(3) If λ > 0, then X(x) = α cos λx + β sin λx.

In addition, the function X which solves the second equation will satisfy
boundary conditions depending on the boundary condition imposed on u.
The problem (
X ′′ + λX = 0
(7.5)
X satisfies boundary conditions
is called the eigenvalue problem, a nontrivial solution is called an eigenfunc-
tion associated with the eigenvalue λ.

7.1.1 Heat equation with Dirichlet boundary conditions


We consider (7.1) with the Dirichlet condition

u(0, t) = u(L, t) = 0 for all t ≥ 0.

In this case the eigenvalue problem (7.5) becomes


(
X ′′ + λX = 0
(7.6)
X(0) = X(L) = 0.

We have to find nontrivial solutions X of the eigenvalue problem (7.6). If


λ = 0, then X(x) = αx + β and 0 = X(0) = α · 0 + β implies that β = 0 and
0 = X(L) = αL implies that α = 0. If λ < 0. Then 0 = X(0) = α cosh 0 +
β sinh 0 = α and 0 = X(L) = β sinh L shows that also β = 0. We conclude
that λ ≤ 0 is not an eigenvalue√ of the problem (7.5). Finally,
√ consider
λ > 0.Then 0 = X(0) = α cos λ · 0 = α and √ 0 = X(L) = β sin λL. Since
X is nontrivial solution, β 6= 0 and hence sin λL = 0. Consequently,
 nπ 2
λ= , n≥1
L

54
and the corresponding eigenfunction is given by
nπx
Xn (x) = sin x
L
After substituting λ = (nπ/L)2 to (7.2), we get the family of solutions
nπ 2
Tn (t) = Bn e−k( L ) t .
Thus we have obtained the following sequence of solutions
nπx −k( nπ )2 t
un (x, t) = Xn (x)Tn (x) = Bn sin e L .
L
We obtain more solutions by taking linear combinations of the un ’s ( recall
the superposition principle)
N N
X X nπx −k( nπ )2 t
u(x, t) = un (x, t) = Bn sin e L ,
n=1 n=1
L

and then by passing to the limit N → ∞,



X nπx −k( nπ )2 t
u(x, t) = Bn sin e L . (7.7)
L
n=1

Finally, we consider the initial condition. At t = 0, we must have



X nπx
u(x, 0) = Bn sin = φ(x). (7.8)
L
n=1

The coefficients, Bn can be computed as follows. Fix m ∈ N. Multiplying


the above equality by sin mπx
L and then integrating over [0, L], we get
Z L Z LX ∞
mπx nπx mπx
φ(x) sin dx = Bn sin sin dx
0 L 0 n=1 L L
∞ Z L
X nπx mπx
= Bn sin sin dx.
n=1 0 L L
RL
(above we ignore the question about interchanging ∞
P
n=1 with 0 .) Since
Z L (
nπx mπx 0 n 6= m
sin sin dx = L (7.9)
0 L L 2 n = m,
we find that
L
2 mπx
Z
Bm = φ(x) sin dx. (7.10)
L 0 L

55
Example 7.1. Consider the problem,

ut − uxx = 0, 0 < x < π, t > 0


u(0, t) = u(π, t) = 0, t ≥ 0
( (7.11)
x 0 ≤ x ≤ π/2
u(x, 0) = φ(x) =
π − x π/2 ≤ x ≤ π.

Here k = 1 and [0, L] = [0, π]. In view of (7.8), the solution u(x, t) is given
by

2
X
u(x, t) = Bn (sin nx)e−n t .
n=1

Using (7.10), the coefficients Bn are equal to

2 π
Z
Bn = φ(x) sin nx dx
π 0
2 π/2 2 π
Z Z
= x sin nx dx + (π − x) sin nx dx.
π 0 π π/2

Integrating by parts we find that the right-hand side is equal to

2 −x cos nx sin x π/2 2 −(π − x) cos nx sin x π


   
4 nπ
+ 2 + − 2 = 2
sin .
π n n 0 π n n π/2 πn 2

Since (
nπ 0 n = 2k
sin =
2 (−1)k+1 n = 2k − 1
for k ≥ 1, we get

2t
X
u(x, t) = Bn (sin nx)e−n
n=1
∞ (7.12)
4 X (−1)n+1 2
= 2
sin[(2n − 1)x]e−(2n−1) t .
π (2n − 1)
n=1

We claim that u is indeed the classical solution of the equation (7.11). To


see this, denote by

(−1)n+1 2
un (x, t) = sin[(2n − 1)x]e−(2n−1) t
(2n − 1)2

56
4 P
so that u(x, t) = π n un (x, t). Since

(−1)n+1

−(2n−1)2 t
1
|un (x, t)| =

2
sin[(2n − 1)x]e ≤
(2n − 1) (2n − 1)2
P 1
and the series n (2n−1) 2 converges. Hence, in view of the Weierstrass M-

test (see Review), the series on the right hand side converges uniformly to a
continuous function u in the region D = {(x, t)| 0 ≤ x ≤ π, t ≥ 0}. It remain
to show that u is differentiable with respect to t and twice differentiable with
respect to x, and satisfies the heat equation. Take ε > 0, and let

Dε = {(x, t)| 0 < x < π, t > ε}.

Differentiating un with respect to t we get


(2n − 1)2

2 t
|un (x, t)t | = sin[(2n − 1)x]e−(2n−1) ≤ e−(2n−1)2 ε .
(2n − 1)2
2
The series n e−(2n−1) ε converges (apply the ratio test). Hence applying
P
the Weierstrass M-test again we find that the series of un (x, t)t ’ converges
uniformly to a continuous function on Dε . Similarly, differentiating with
respect to x twice we get
(2n − 1)2

2 t
|un (x, t)xx | = sin[(2n − 1)x]e−(2n−1) ≤ e−(2n−1)2 ε
(2n − 1) 2
P
and again n un (x, t)xx converges uniformly on Dε . Hence, using that
(un )t − (un )xx = 0,
X X X
ut − uxx = (un )t − (un )xx = [(un )t − (un )xx ] = 0.
n n n

So, u is a solution on Dε and since ε was arbitrary, u is a classical solution


on D.

7.1.2 Heat equation with Neumann boundary conditions


We consider the heat equation (7.1) but with Neumann boundary conditions

ux (0, t) = ux (0, t) = 0 for all t ≥ 0.

In this case the eigenvalue problem (7.5) becomes


(
X ′′ + λX = 0
(7.13)
X ′ (0) = X ′ (L) = 0

57
As before the problem doesn’t have negative eigenvalues. If λ = 0, the
general solution is X(x) = αx + β so that 0 = X ′ (0) = β, implies that
λ0 = 0 is an eigenvalue with the unique (up to multiplication by a constant)
eigenfunction X√ 0 (x) ≡ 1. If√λ > 0, then the general solution of the problem
is X(x) = α cos λx+β √ sin √ λx form which we conclude that 0 = X ′ (0) = β
and 0 = X ′ (L) = − λα sin λL implies that λ > 0 is an eigenvalue if and
only if
 nπ 2
λ = λn = , n≥1
L
and the corresponding eigenfunction Xn (x) is given by
nπx
Xn (x) = cos .
L
Then the corresponding solutions of T ′ + λkT = 0 are

T0 (t) = B0
nπ 2
Tn (t) = Bn e−k( L ) t , n ≥ 1.

Thus we obtain a sequence of solutions


„ nπ «2
−k t nπx
un (x, t) = Bn e L cos , n≥0
L
which we combine to form the series
nπ 2 nπ
Bn e−k( L ) t cos
X
u(x, t) = x.
L
n≥0

At t = 0, we have
X nπx
φ(x) = u(x, 0) = Bn cos .
L
n≥0

To compute Bm ’s, multiply this equality by cos mπx


L and integrate over [0, L].
Then
Z L Z L
mπx X nπx mπx
φ(x) cos dx = Bn cos cos dx.
0 L 0 L L
n≥0

Since (
L
mπx L m=0
Z
cos dx = (7.14)
0 L 0 m ≥ 1,

58
and (
L
nπx mπx 0 n 6= m
Z
cos cos dx = L
(7.15)
0 L L 2 n = m,
it follows that
1 L 2 L
mπx
Z Z
B0 = φ(x) dx and Bm = φ(x) cos dx, m ≥ 1.
L 0 L 0 L

7.1.3 Heat equation with periodic boundary conditions


Next we consider (7.1) with the periodic boundary conditions

u(−L, t) = u(L, t) and ux (−L, t) = ux (L, t) for all t ≥ 0.

In this case the eigenvalue problem takes the form


(
X ′′ + λX = 0
(7.16)
X(0) = X(L), X ′ (0) = X ′ (L)

This follows from X(−L)T (t) = X(L)T (t) and X ′ (−L)T (t) = X(L)T (t).
To find eigenvalues, we first consider λ < 0. From (7.4) and since sinh is
odd and cosh is even, the condition X(−L) = X(L) implies that

β sinh −λL = 0

so that β = 0. The condition X ′ (−L) = X ′ (L) implies that



α sinh −λL = 0

so that α = 0. If λ = 0, then X(−L) = −αL + β = αL + β = X(L) so


that α = 0. So λ0 = 0 is an eigenvalue with the corresponding eigenfunction
X
√0 (x) nπ
≡ 1. Finally, let λ > 0. Then X(−L) = X(L) gives either√β = 0 or
λ = L and the condition X ′ (−L) = X ′ (L) gives either α = 0 or λ = nπL .
Hence the positive eigenvalues are
 nπ 2
λn = , n≥1
L
and the corresponding eigenfunctions are
 nπx   nπx 
Xn (x) = Bn cos + Cn sin .
L L

59
Thus the product solutions of the periodic boundary problem are

u0 (x, t) = A0
  nπx   nπx  nπ 2
un (x, t) = Bn cos + Cn sin e−( L ) t
L L
which can be combined to form the series
X  nπx   nπx  nπ 2
u(x, t) = A0 + Bn cos + Cn sin e−( L ) t .
L L
n≥1

At t = 0, we have
X  nπx   nπx 
φ(x) = u(x, 0) = A0 + Bn cos + Cn sin .
L L
n≥1

Integrating over [−L, L], we get


L
1
Z
A0 = φ(x)
2L −L
RL RL
since −L cos nπx nπ
 
dx = sin dx = 0. Next multiplying both sides
 L −L L
by cos mπx
L and integrating over [−L, L] leads to
L
1  mπx 
Z
Bm = φ(x) cos dx
L −L L

since (
L  nπx   mπx  0 n 6= m
Z
cos cos dx =
−L L L L n=m
Z L  nπx   mπx 
sin cos dx = 0, all n, m ≥ 1.
−L L L
Finally, multiplying both sides by sin mπx

L and integrating over [−L, L]
leads to
1 L  mπx 
Z
Cm = φ(x) sin dx
L −L L
since (
L  nπx   mπx  0 n 6= m
Z
sin sin dx =
−L L L L n = m.

60
7.2 Separation of variable for the wave equation
The above techniques can be used to solve the wave equation. We focus on
the wave equation satisfying Dirichlet boundary condition (Neumann bound-
ary conditions are treated in the book). We consider the initial boundary
problem
utt − c2 uxx = 0, 0 < x < L, t > 0
u(0, t) = u(L, t) = 0, t≥0
(7.17)
u(x, 0) = φ, 0<x<L
ut (x, 0) = ψ, 0 < x < L.
If we take u(x, t) = X(x)T (t), then (7.17) becomes

X(x)T ′′ (t) = c2 X ′′ (x)T (t).

Dividing by c2 X(x)T (t), we get


T ′′ (t) X ′′ (x)
=
c2 T (t) X(x)
from which we conclude that both sides of this equality must be equal to a
constant −λ. Thus, we obtain two second order differential equations

X ′′ + λX = 0 (7.18)

T ′′ + λc2 T. (7.19)
The boundary conditions imply that

X(0) = X(L).

so that the function X should be a solution of the eigenvalue problem,

X ′′ + λX = 0, 0<x<L
X(0) = X(L) = 0.

Just as in the case of the heat equation the eigenvalues are and the associated
eigenfunctions are
 nπ 2 nπx
λn = , Xn (x) = sin n ≥ 1.
L L
Then the solution of (7.19) with λ = λn is of the form
   
nπct nπct
Tn (t) = An cos + Bn sin
L L

61
where An and Bn are constants. The product solutions of the boundary
value problem are given by
    
nπct nπct nπx
un (x, t) = An cos + Bn sin sin
L L L
which can be combined in the series
X 
nπct
 
nπct

nπx
u(x, t) = An cos + Bn sin sin . (7.20)
L L L
n≥1

Setting t = 0, we get
 
X nπct nπx
φ(x) = u(x, 0) = An cos sin .
L L
n≥1
mπx
Multiplying by sin L and integrating over [0, L] we find that
2 L nπx
Z
An = φ(x) sin dx.
L 0 L
Next, differentiate (7.20) with respect to t at t = 0 to get
nπc X nπx
ψ(x) = ut (x, 0) = Bn sin .
L L
n≥1

To compute Bn ’s, multiply both sides by sin mπx


L and integrate over [0, L]
to get
Z L Z L
2 L mπx 2 mπx
Bm = φ(x) sin dx = φ(x) sin dx.
L mπc 0 L mπc 0 L
Example 7.2. Consider

utt − 4uxx = 0
 (x, t) ∈ (0, π) × (0, ∞)
u(0, t) = u(0, t), t≥0

u(x, 0) = sin 2x, ut (x, 0) = 0, 0≤x≤π

Here c = 2, [0, L] = [0, π]. The formal solution is of the form


X
u(x, t) = (An cos 2nt + Bn sin 2nt) · sin nx.
n≥1

From the above formulae, Bn = 0 since ψ ≡ 0 and


(
2 L 1 n=2
Z
An = sin 2x sin ndx =
L 0 0 otherwise.
Consequently,
u(x, t) = cos 4t sin 2x.

62
7.3 The energy method and uniqueness
In this section we use the so called energy method to prove the uniqueness
of initial boundary value problems. The method is based on the physical
principle of energy conservation.
Theorem 7.3. Consider the Dirichlet problem

ut − kuxx = f (x, t)
 x ∈ [0, L], t > 0
u(0, t) = a(t), u(L, t) = b(t) t≥0

u(x, 0) = φ(x) x ∈ [0, L].

Then the problem has at most one solution.


Proof. Suppose that the problem has two solutions u1 and u2 . Setting v =
u1 − u2 , the function v solves

vt − kvxx = 0
 x ∈ [0, L], t > 0
v(0, t) = 0, v(L, t) = 0 t≥0

v(x, 0) = 0 x ∈ [0, L].

Define the energy


1 L
Z
E(t) = v(x, t)2 dx.
2 0
Differentiating with respect to t, we get
Z L Z k

E (t) = vt (x, t)v(x, t) dx = v(x, t)vxx (x, t) dx.
0 0
Integrating by part and using the boundary conditions, we find that
Z k Z L
L

E (t) v(x, t)vxx (x, t) dx = [kv(x, t)vx (x, t)]0 − kvx (x, t)2 dx ≤ 0.
0 0
Hence the energy E is decreasing. Since E(0) = 0 and E(t) ≥ 0, we get that
E ≡ 0. This implies that v(·, t) ≡ 0 for every t. Consequently, u1 (x, t) =
u2 (x, t) for all x ∈ [0, L] and t ≥ 0. 
Theorem 7.4. Consider the Neumann problem



 utt − c2 uxx = f (x, t) x ∈ [0, L], t > 0

u (0, t) = a(t), u (L, t) = b(t)
x x t≥0


 u(x, 0) = φ(x) x ∈ [0, L].

u (x, 0) = φ(x)
t x ∈ [0, L].
Then the problem has at most one solution.

63
Proof. Suppose that the problem has two solutions u1 and u2 . Setting v =
u1 − u2 , the function v solves



 vtt − c2 vxx = 0 x ∈ [0, L], t > 0

v (0, t) = 0, v (L, t) = 0
x x t≥0


 v(x, 0) = 0 x ∈ [0, L].

v (x, 0) = 0
t x ∈ [0, L].

Define the energy


L
1
Z
vt (x, t)2 + c2 vx (x, t)2

E(t) = dx.
2 0

Differentiating with respect to t, we get


Z L

vt (x, t)vtt (x, t) + c2 vx (x, t)vxt (x, t) dx.

E (t) = (7.21)
0

Note that

c2 vx vxt = c2 [(vx vt )x − vxx vt ] = c2 (vx vt )x − vtt vt

where we have used vtt − c2 vxx = 0. Substituting this into (7.21) and using
the boundary conditions, we get
Z L

E ′ (t) = c2 (vx (x, t)v(x, t))dx = c2 [vx (x, t)vt (x, t)]L
0 = 0.
0 ∂x
Hence E(t) = constant for all t. At t − 0, we have v(x, 0) = 0 so that
vx (x, 0) = 0. Since vt (x, 0) = 0, we conclude that E(0) = 0 and so E(t) = 0
for all t ≥ 0. This implies that

vt (x, t)2 + c2 vx (x, t)2 = 0

for all x ∈ [0, T ] and t ≥ 0. Thus, vt (x, t) = vx (x, t) = 0 for all x ∈ [0, T ]
and t ≥ 0. Consequently, v ≡ constant. But then v(x, 0) = 0, implies that
v ≡ 0. 

Review–Infinite series of functions


P
Formally, an infinite series n≥1 an is a pair
P consisting of a sequence (an )
and a sequence (sn ) of partial sums, sn = nk=1 ak . The series
P
an con-
verges, provided that a sequence (sn ) converges, that is, there is s such that

64
P
lim sn = s. The P∞number s is called the P value of the series an and is de-
noted
P by s = n=1 P an . The series an is said
P to converge absolutely, if
|an | converges.
P If |an | converges, then a n converges.
P However, the
convergence of an does notP guarantee convergence P of |an |. For P
exam-
ple, (−1)n /n converges
P
P but 1/n diverges. If an converges but |an |
diverges, then series an is said to converge conditionally.
Let (fn ) be a Psequence of functions defined on some interval [a, b].PWe
can form a series fn (x) for every x ∈ [a, b]. One P says that the series fn
converges pointwise on [a, b] if for the series fn (x) converges for every
point x ∈ [a, b]. That is, for each x ∈ [a, b],
n

X
f (x) − fk (x) → 0 as n → ∞.


k=1

If
n

X
max f (x) − fk (x) → 0 as n → ∞,

x∈[a,b]
k=1
P
then, the series fn is said to converge uniformly on [a, b].
Theorem 7.5 (Weierstrass M-test). Let (fn ) be a sequence of functions
on [a, b] and let (Mn ) be a sequence of positive constants satisfying:
(a) |fn (x)| ≤ Mn for all x ∈ [a, b] and all n,
P
(b) the series Mn converges.
P
The the series fn converges absolutely and uniformly on [a, b].
Theorem 7.6. Let (fn ) be a sequence Pof functions on [a, b] converging point-
wise to the function f , i.e., f (x) = ∞ n=1 fn (x).
P
(a) If the fn ’s are continuous and the series fn converges uniformly on
[a, b], then its sum f is a continuous function on [a, b], and
∞ Z b
X Z bX∞ Z b
fn (x) dx = fn (x) dx = f (x) dx.
n=1 a a n=1 a

(b) If the fn ’s are of class C 1 and the series


P ′
fn of derivatives converges
uniformly on [a, b], then its sum f is of class C 1 and
!′ ∞
X X

f (x) = fn (x) = fn′ (x).
n=1 n=1

65

You might also like