Solving the heat equation with source and homogeneous Robin boundary...

advertisement
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
MINGFENG ZHAO
July 28, 2015
Solving the heat equation with source and homogeneous Robin boundary condition I
Let’s consider the heat equation with the homogeneous Robin boundary condition:
(1)













ut = c2 uxx ,
0 < x < L,
BC:
ux (0, t) = u(L, t) = 0,
IC:
u(x, 0) = f (x),
t > 0,
t > 0,
0 ≤ x ≤ L.
Let’s first look at the heat equation and the homogeneous boundary condition:
(2)



ut = c2 uxx ,

 BC:
ux (0, t) = u(L, t) = 0,
0 < x < L,
t > 0,
t > 0.
A separated solution to (2) is of the form u(x, t) = X(x)T (t), then
ut (x, t)
= X(x)T 0 (t)
ux (x, t)
= X 0 (x)T (t)
uxx (x, t)
= X 00 (x)T (t)
0
= ut − c2 uxx
= X(x)T 0 (t) − c2 X 00 (x)T (t).
So we get
(3)
−
T 0 (t)
X 00 (x)
=
−
:= λ.
c2 T (t)
X(x)
1
2
MINGFENG ZHAO
X 00 (x)
, then λt (x, t) = 0. By (3), then λx (x, t) = 0. So λ(x, t) is a constant, which is called the
X(x)
separation constant. Since ux (0, t) = u(L, t) = 0, then X(x) satisfies


 X 00 + λX = 0,
(4)

 X 0 (0) = X(L) = 0.
Let λ(x, t) = −
We are expected to find non-zero solutions to (4). Let X = erx be a solution to X 00 + λX = 0, then X 0 = rerx ,
X 00 = r2 erx , and
0
=
X 00 + λX = r2 erx + λerx
=
erx (r2 + λ).
Then r2 + λ = 0. We have three cases:
a. If λ = 0, that is, r2 = 0. So r = 0, which implies that the general solution to X 00 + λX = X 00 = 0 is
X(x) = C1 + C2 x. Since X 0 (0) = X(L) = 0, then
C2 = C1 + C2 L = 0.
Then C1 = C2 = 0.
b. If λ > 0, that is, λ = µ2 for some µ > 0. So r2 + µ2 = 0, that is, r = ±µi, which implies that the general solution
to X 00 + λX = X 00 + µ2 X = 0 is X(x) = C1 cos(µx) + C2 sin(µx). Since X 0 (x) = −µC1 sin(µx) + µC2 cos(µx),
X 0 (0) = X(L) = 0, then
µC2 = C1 cos(Lµ) + C2 sin(Lµ) = 0.
Since µ > 0, then
C2 = 0,
and C1 cos(Lµ) = 0.
(2n + 1)π
nπ
+ nπ =
In order to make X to be a non-zero solution, then we need cos(Lµ) = 0, that is, Lµ =
2
2
2
2
S
(2n + 1)π
(2n + 1)π
2
for some n ∈ N {0}, that is, λ = µ =
. For λ =
, then all solution to (4) are
2L
2L
(2n + 1)π
Xn (x) = C cos
x .
2L
c. If λ < 0, that is, λ = −µ2 for some µ > 0. So r2 − µ2 = 0, that is, r = ±µ, which implies that the general
solution to X 00 + λX = X 00 − µ2 X = 0 is X(x) = C1 eµx + C2 e−µx . Since X 0 (x) = µC1 eµx − µC2 e−µx and
X(0) = X(L) = 0, then
µC1 − µC2 = C1 eLµ + C2 e−Lµ = 0.
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
3
Since µ > 0, then C1 = C2 = 0.
2
S
(2n + 1)π
In summary, (4) has non-zero solution if and only if λ =
for some n ∈ N {0}.
2L
2
(2n + 1)π
(2n + 1)π
in (4), all non-zero solutions to (4) are X(x) = C cos
x .
2L
2L
2
(2n + 1)π
When λ =
, by (3), then
2L
0
(5)
When λ =
T 0 (t) + c2 λT (t)
2
(2n + 1)πc
0
= T (t) +
T (t).
2L
=
It’s easy to see that all solutions to (5) are given by:
T (t) = Ce−
In summary, for any n ∈ N
(2n+1)2 π 2 c2
4L2
t
.
S
{0}, we can find a non-zero solution to (2):
(2n+1)2 π 2 c2
(2n + 1)π
t
4L2
un (x, t) = e−
cos
x .
2L
(2n + 1)π
x .
So if f (x) is an “infinite” linear combination of
Notice that un (x, 0) = cos
2L
∞
∞
X
(2n + 1)π
(2n + 1)π
un (x, 0) = cos
x
, that is, f (x) =
an cos
x , then informally we have u(x, t) =
2L
2L
n=0
n=0
∞
∞
2
2
2
X
X
(2n+1) π c
(2n + 1)π
t
4L2
an un (x, t) =
an e−
cos
x is a solution to (1).
2L
n=0
n=1
S
Lemma 1. Let L > 0 and m, n ∈ N {0}, then
Z
L
cos
0
(2n + 1)π
x cos
2L
(2m + 1)π
x
2L


 0, if m 6= n
.
dx =
L

 , if m = n.
2
Proof. Recall the identity:
cos(α) cos(β) =
Then we have
Z L
(2n + 1)π
(2m + 1)π
cos
x cos
x dx
2L
2L
0
cos(α + β) + cos(α − β)
.
2
=
=
Z 1 L
(m + n + 1)π
(n − m)π
cos
x + cos
x
dx
2 0
L
L


 0, if m 6= n
,
By Lemma 1 in Lecture 9.
L

 , if m = n.
2
4
MINGFENG ZHAO
Now assume that
f (x) =
∞
X
an cos
n=0
(2n + 1)π
x ,
2L
in [0, L].
For m ≥ 0, both sides of the above identity are multiplied by cos
(2m + 1)π
x
2L
and integrate over [0, L], then
“informally” we have
=
=
L
(2m + 1)π
f (x) cos
x dx
2L
0
"
#
Z L
∞
π X
a0
(2m + 1)π
(2n + 1)π
x
cos
x +
x
dx
cos
an cos
2L
2
2L
2L
0
n=1
Z
Z L
∞
π X
(2m + 1)π
a0 L
(2n + 1)π
(2m + 1)π
cos
x cos
x dx +
x cos
x dx
an
cos
2 0
2L
2L
2L
2L
0
n=1
Z
am L
,
2
=
By Lemma 1.
Then we get
am
2
=
L
Z
L
f (x) cos
0
(2m + 1)π
x
2L
dx,
∀m ≥ 0.
In summary, we have
f (x) =
∞
X
an cos
n=0
(2n + 1)π
x ,
2L
in [0, L] =⇒ am
Remark 1. Notice that 4L is a common-period of cos
2
=
L
Z
L
f (x) cos
0
(2m + 1)π
x
2L
• Extend f evenly on [−2L, 2L], that is, fe (x) = f (−x) for x ∈ [−2L, 0].
In summary, we have
if x ∈ [0, L],
if x ∈ [L, 2L],
,
fe (x + 4L) = fe (x).
if x ∈ [−L, 0],
if x ∈ [−2L, −L].
Let’s look at the Fourier series of fe (x), since fe (x) is even, then
∞
fe (x) =
for all m ≥ 0 .
(2m + 1)π
x ’s, then we extend f to fe in the following way:
2L
• Extend f near x = L oddly, that is, fe (x) = −f (2L − x) for x ∈ [L, 2L].



f (x),





 −f (2L − x),
fe (x) =


f (−x),





 −f (2L + x),
dx,
nπ a0 X
+
x , x ∈ [−2L, 2L],
an cos
2
2L
n=1
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
where
an
=
=
=
=
For cos
nπ
2L
Z 2L
nπ 2
fe (x) cos
x dx
2L 0
2L
"Z
#
Z 2L
L
nπ nπ 1
f (x) cos
−f (2L − x) cos
x dx +
x dx
L 0
2L
2L
L
"Z
#
Z 0
L
nπ nπ
1
f (x) cos
f (y) cos
x dx +
(2L − y) dy
Let 2L − x = y
L 0
2L
2L
L
"Z
#
Z L
L
nπ nπ
1
f (x) cos
x dx −
f (y) cos
y − nπ dy
L 0
2L
2L
0
y − nπ , we have
cos
nπ
2L
y − nπ
=
=
nπ nπ y cos(nπ) − sin
y sin(nπ)
2L
2L
nπ (−1)n cos
y .
2L
cos
So we get
an
#
Z L
nπ nπ n
=
f (x) cos
x dx − (−1)
f (y) cos
y dy
2L
2L
0
0
Z
nπ 1 − (−1)n L
f (x) cos
x dx
=
L
2L
0


 0,
if n is even,
Z L
=
2
(2k + 1)π


f (x) cos
x dx, if n = 2k + 1 is odd.
L 0
2L
1
L
"Z
L
Solving the heat equation with source and homogeneous Robin boundary condition II
Let’s look the following heat equation with the homogeneous Robin boundary condition:


ut = c2 uxx , 0 < x < L, t > 0,





(6)
BC: u(0, t) = ux (L, t) = 0,
t > 0,






IC: u(x, 0) = f (x), 0 ≤ x ≤ L.
Let’s first look at the heat equation and the homogeneous boundary condition:



ut = c2 uxx , 0 < x < L, t > 0,
(7)

 BC: u(0, t) = u (L, t) = 0,
t > 0.
x
5
6
MINGFENG ZHAO
A separated solution to (7) is of the form u(x, t) = X(x)T (t), then
ut (x, t)
=
X(x)T 0 (t)
ux (x, t)
=
X 0 (x)T (t)
uxx (x, t)
=
X 00 (x)T (t)
0
=
ut − c2 uxx
=
X(x)T 0 (t) − c2 X 00 (x)T (t).
So we get
−
(8)
X 00 (x)
T 0 (t)
=
−
:= λ.
c2 T (t)
X(x)
X 00 (x)
, then λt (x, t) = 0. By (8), then λx (x, t) = 0. So λ(x, t) is a constant. Since u(0, t) = ux (L, t) =
X(x)
0, then X(x) satisfies


 X 00 + λX = 0,
(9)

 X(0) = X 0 (L) = 0.
Let λ(x, t) = −
We are expected to find non-zero solutions to (9). Let X = erx be a solution to X 00 + λX = 0, then
X0
= rerx
X 00
= r2 erx
0
= X 00 + λX
= r2 erx + λerx
= erx (r2 + λ).
a. If λ = 0, that is, r2 = 0. So r = 0, which implies that the general solution to X 00 + λX = X 00 = 0 is
X(x) = C1 + C2 x. Since X 0 (x) = C2 , and X(0) = X 0 (L) = 0, then C1 = C2 = 0.
b. If λ < 0, that is, λ = µ2 for some µ > 0. So r2 + µ2 = 0, that is, r = ±µi, which implies that the general solution
to X 00 + λX = X 00 + µ2 X = 0 is X(x) = C1 cos(µx) + C2 sin(µx). Since X 0 (x) = −C1 µ sin(µx) + C2 µ cos(µx)
and X(0) = X 0 (L) = 0, then
C1 = −C1 µ sin(µL) + C2 µ cos(µL) = 0.
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
7
Since µ > 0, then
C2 cos(µL) = 0,
and C1 = 0.
π
(2n + 1)π
In order to make X be a non-zero solution, then we need cos(Lµ) = 0, that is, Lµ = + nπ =
for
2
2
2
2
S
(2n + 1)π
(2n + 1)π
. For λ =
, then all solution to (9) are
some n ∈ N {0}, that is, λ = µ2 =
2L
2L
Xn (x) = C sin
(2n + 1)π
x .
2L
c. If λ > 0, that is, λ = −µ2 for some µ > 0. So r2 − µ2 = 0, that is, r = ±µ, which implies that the general
solution to X 00 + λX = X 00 − µ2 X = 0 is X(x) = C1 eµx + C2 e−µx . Since X 0 (x) = C1 µeµx − C2 µe−µx and
X(0) = X 0 (L) = 0, then
C1 + C2 = C1 µeµL − C2 µe−µL = 0.
Since µ > 0, then C1 = C2 = 0.
2
S
(2n + 1)π
for some n ∈ N {0}.
In summary, (9) has non-zero solution if and only if λ =
2L
2
(2n + 1)π
(2n + 1)π
in (9), all non-zero solutions to (9) are X(x) = C sin
x .
2L
2L
2
(2n + 1)π
When λ =
, by (7), then
2L
0
(10)
T 0 (t) + c2 λT (t)
2
(2n + 1)πc
= T 0 (t) +
T (t).
2L
=
It’s easy to see that all solutions to (10) are given by:
T (t) = Ce−
In summary, for any n ∈ N
S
(2n+1)2 π 2 c2
4L2
t
.
{0}, we can find a non-zero solution to (7):
un (x, t) = e
−
(2n+1)2 π 2 c2
4L2
t
sin
(2n + 1)π
x .
2L
S
Lemma 2. Let L > 0 and m, n ∈ N {0}, then
Z
L
sin
0
(2n + 1)π
x sin
2L
(2m + 1)π
x
2L


 0, if m 6= n
dx =
.
L

 , if m = n.
2
When λ =
8
MINGFENG ZHAO
Proof. Recall the identity:
cos(α − β) − cos(α + β)
.
2
sin(α) sin(β) =
Then we have
Z L
(2n + 1)π
(2m + 1)π
sin
x sin
x dx
2L
2L
0
Z (m − n)π
1 L
(n + m + 1)π
cos
x − cos
x
dx
2 0
L
L


 0, if m 6= n
,
By Lemma 1 in Lecture 9.
L

 , if m = n.
2
=
=
Now assume that
f (x) =
∞
X
bn sin
n=1
(2n + 1)π
x ,
2L
in [0, L].
For m ≥ 0, both sides of the above identity are multiplied by sin
“informally” we have
Z L
(2m + 1)π
x dx
f (x) sin
2L
0
=
=
and integrate over [0, L], then
"X
#
∞
(2n + 1)π
(2m + 1)π
x
bn sin
x
dx
sin
2L
2L
0
n=0
Z L
∞
X
(2m + 1)π
(2n + 1)π
bn
sin
x sin
x dx
2L
2L
0
n=0
Z
=
(2m + 1)π
x
2L
L
bm L
,
2
By Lemma 2.
In summary, we have
f (x) =
∞
X
bn sin
n=1
(2n + 1)π
x ,
2L
in [0, L] =⇒ bm
Remark 2. Notice that 4L is a common-period of sin
2
=
L
Z
L
f (x) sin
0
(2m + 1)π
x
2L
for all m ≥ 0 .
(2m + 1)π
x ’s, then we extend f to fe in the following way:
2L
• Extend f near x = L evenly, that is, fe (x) = f (2L − x) for x ∈ [L, 2L].
• Extend f oldly on [−2L, 2L], that is, fe (x) = −f (−x) for x ∈ [−2L, 0].
In summary, we have



f (x),





 f (2L − x),
fe (x) =


−f (−x),





 −f (2L + x),
dx,
if x ∈ [0, L],
if x ∈ [L, 2L],
if x ∈ [−L, 0],
if x ∈ [−2L, −L].
,
fe (x + 4L) = fe (x).
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
9
Let’s look at the Fourier series of fe (x), since fe (x) is odd, then
fe (x) =
∞
X
bn sin
n=1
nπ x , x ∈ [−2L, 2L],
2L
where
bn
=
=
=
=
For sin
nπ
2L
Z 2L
nπ 2
fe (x) sin
x dx
2L 0
2L
"Z
#
Z 2L
L
nπ nπ 1
f (x) sin
x dx +
f (2L − x) sin
x dx
L 0
2L
2L
L
"Z
#
Z 0
L
nπ nπ
1
f (x) sin
f (y) sin
x dx −
(2L − y) dy
L 0
2L
2L
L
"Z
#
Z L
L
nπ nπ
1
x dx −
y − nπ dy
f (x) sin
f (y) sin
L 0
2L
2L
0
Let 2L − x = y
y − nπ , we have
sin
nπ
2L
y − nπ
nπ nπ y cos(nπ) − cos
y sin(nπ)
2L
2L
nπ y .
= (−1)n sin
2L
=
sin
So we get
bn
#
Z L
nπ nπ n
=
f (x) sin
x dx − (−1)
f (y) sin
y dy
2L
2L
0
0
Z
nπ 1 − (−1)n L
f (x) sin
x dx
=
L
2L
0


 0,
if n is even,
Z L
=
2
(2k
+
1)π


f (x) sin
x dx, if n = 2k + 1 is odd.
L 0
2L
1
L
"Z
L
Solving the heat equation with source and inhomogeneous Dirichlet boundary condition
Let’s consider the heat equation with source and inhomogeneous Dirichlet boundary condition:


ut = c2 uxx + σ(x, t), 0 < x < L, t > 0,





(11)
BC: u(0, t) = g(t), u(L, t) = h(t),
t > 0,






IC: u(x, 0) = f (x), 0 ≤ x ≤ L.
To solve the problem (11):
10
MINGFENG ZHAO
Step I: Choose any “nice” function w(x, t) such that w(0, t) = g(t) and w(L, t) = h(t) for t > 0.
Step II: Let v(x, t) = u(x, t) − w(x, t), if we are looking for a solution u to (11), then
vt − c2 vxx
=
ut − wt (x, t) − c2 uxx + wxx (x, t)
=
σ(x, t) − wt (x, t) + wxx (x, t)
=: σ̃(x, t)
v(0, t)
v(L, t)
v(x, 0)
=
u(0, t) − w(0, t)
=
g(t) − g(t)
=
0
=
u(L, t) − w(L, t)
=
h(t) − h(t)
=
0
=
u(x, 0) − w(x, 0)
=
f (x) − w(x, 0)
=: f˜(x).
Then v are supposed to satisfy the following heat equation with source and homogeneous Dirichlet boundary
condition:
(12)













vt = c2 vxx + σ̃(x, t),
0 < x < L,
BC:
v(0, t) = v(L, t) = 0,
t > 0,
IC:
v(x, 0) = f˜(x),
t > 0,
0 ≤ x ≤ L.
To solve (12), we are going to use the method of eigenfunction expansions, which is a “generalization” of
“variation of parameters”:
Step II-1: First let’s look at the heat equation without source with the homogeneous boundary condition:
(13)



vt = c2 vxx ,

 BC:
v(0, t) = v(L, t) = 0,
0 < x < L,
t > 0,
t > 0.
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
11
By using the separation of variables, we know that the “ general ” solution to (13) is:
v(x, t) =
∞
X
bn e −
n2 π 2 c2
L2
t
sin
n=1
nπ x .
L
Step II-2: For each t > 0, we can think σ̃(·, t) is a function of x, then we can write it as an “infinite” linear combination
n nπ o∞
of sin
x
, that is,
L
n=1
σ̃(x, t) =
∞
X
σ̃n (t) sin
n=1
nπ x ,
L
where
Z
L
nπ x dx, ∀n ≥ 1.
L
0
n nπ o∞
Step II-3: Write f˜(x) as “infinite” linear combination of sin
x
, that is,
L
n=1
2
σ̃n (t) =
L
σ̃(x, t) sin
∞
X
nπ x ,
f˜n sin
L
n=1
f˜(x) =
where
2
f˜n =
L
Z
0
L
nπ f˜(x) sin
x dx,
L
∀n ≥ 1.
Step II-4: Let
v(x, t) =
∞
X
n=1
vn (t) sin
nπ x ,
L
be the solution to (12). It’s easy to see that v satisfies the homogeneous boundary condition: v(0, t) =
v(L, t) = 0. Moreover, “informally” we have
0
=
=
=
0
=
=
=
vt − c2 vxx − σ̃(x, t)
∞
∞
∞
nπ X
nπ X
nπ X
n2 π 2 c2
vn0 (t) sin
x +
v
(t)
sin
x
−
σ̃
(t)
sin
x
n
n
L
L2
L
L
n=1
n=1
n=1
∞ nπ X
n2 π 2 c2
0
v
(t)
−
σ̃
(t)
sin
x ,
vn (t) +
n
n
L2
L
n=1
v(x, 0) − f˜(x)
∞
∞
nπ nπ X
X
vn (0) sin
x −
f˜n sin
x
L
L
n=1
n=1
∞
X
nπ [vn (0) − f˜n ] sin
x .
L
n=1
12
MINGFENG ZHAO
(14)
Then for any n ≥ 1, vn (t) satisfies the following ODE with the initial value problem:

n 2 π 2 c2


 vn0 (t) +
vn (t) − σ̃n (t) = 0, t > 0,
L2


 vn (0) = f˜n .
So if for any n ≥ 1, vn (t) is the solution to (14), then v(x, t) =
∞
X
vn (t) sin
n=1
nπ x is the solution to (12).
L
Step III: The solution to (11) is given by:
u(x, t)
= w(x, t) + v(x, t)
= w(x, t) +
∞
X
vn (t) sin
n=1
nπ x .
L
Example 1. Let A, B be two constants, solve the following problem:
(15)













ut = c2 uxx ,
0 < x < L,
BC:
u(0, t) = A,
u(L, t) = B,
IC:
u(x, 0) = f (x),
t > 0,
t > 0,
0 ≤ x ≤ L.
Since the boundary conditions do not dependent on time t, we can look for a stead-state solution w(x, t) = w(x)



wt = c2 wxx , 0 < x < L, t > 0,
, then
(that is, the solution does not dependent on time t) to

 BC: w(0, t) = A, w(L, t) = B,
t > 0.
w00 (x) = 0,
w(0) = A,
w(L) = B,
which implies that
w(x, t) =
Let v(x, t) = u(x, t) − w(x), then v








(16)
BC:






 IC:
B−A
x + A,
L
∀0 ≤ x ≤ L.
satisfies
vt = c2 vxx ,
0 < x < L,
v(0, t) = v(L, t) = 0,
v(x, 0) = f (x) −
t > 0,
t > 0,
B−A
x − A,
L
0 ≤ x ≤ L.
By using separation variables, we know that the solution to (16) is:
v(x, t) =
∞
X
n=1
bn e −
n2 π 2 c2
L2
t
sin
nπ x .
L
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
13
where
2
bn =
L
Z
L
0
nπ B−A
f (x) −
x − A sin
x dx.
L
L
Therefore, the solution to (15) is:
u(x, t) = w(x, t) + v(x, t) =
∞
nπ X
n 2 π 2 c2
B−A
x+A+
x ,
bn e− L2 t sin
L
L
n=1
Remark 3. From Example 1, in order to make computations simply, it’s tricky to choose the function w(x, t). For
example, for (11), if it’s easy to compute the eigenfunction expansion of σ(x, t), we can just choose
w(x, t) =
h(t) − g(t)
· x + g(t),
L
∀0 ≤ x ≤ L, t ≥ 0.
It’s easy to see that w(x, t) is a linear function with respect to x, so we can compute the Fourier series of w(x, t)
easily.
Solving the heat equation with source and inhomogeneous Neumann boundary condition
Let’s consider the heat equation with source and inhomogeneous Neumann boundary condition:


ut = c2 uxx + σ(x, t), 0 < x < L, t > 0,





(17)
BC: ux (0, t) = g(t), ux (L, t) = h(t),
t > 0,






IC: u(x, 0) = f (x), 0 ≤ x ≤ L.
To solve the problem (17):
Step I: Choose any “nice” function w(x, t) such that wx (0, t) = g(t) and wx (L, t) = h(t) for t > 0.
Step II: Let v(x, t) = u(x, t) − w(x, t), if we are looking for a solution u to (17), then
vt − c2 vxx
=
ut − wt (x, t) − c2 uxx + wxx (x, t)
=
σ(x, t) − wt (x, t) + wxx (x, t)
=: σ̃(x, t)
vx (0, t)
vx (L, t)
=
ux (0, t) − wx (0, t)
=
g(t) − g(t)
=
0
=
ux (L, t) − wx (L, t)
14
MINGFENG ZHAO
v(x, 0)
=
h(t) − h(t)
=
0
=
u(x, 0) − w(x, 0)
=
f (x) − w(x, 0)
=: f˜(x).
Then v are supposed to satisfy the following heat equation with source and homogeneous Neumann boundary
condition:







(18)






vt = c2 vxx + σ̃(x, t),
BC:
vx (0, t) = vx (L, t) = 0,
IC:
v(x, 0) = f˜(x),
0 < x < L,
t > 0,
t > 0,
0 ≤ x ≤ L.
To solve (18), we are going to use the method of eigenfunction expansions, which is a “generalization” of
“variation of parameters”:
Step II-1: First let’s look at the heat equation without source with the homogeneous boundary condition:



vt = c2 vxx , 0 < x < L, t > 0,
(19)

 BC: v (0, t) = v (L, t) = 0,
t > 0.
x
x
By using the separation of variables, we know that the “ general ” solution to (19) is:
∞
v(x, t) =
nπ n 2 π 2 c2
a0 X
+
an e− L2 t cos
x .
2
L
n=1
Step II-2: For each t > 0, we can think σ̃(·, t) is a function of x, then we can write it as an “infinite” linear combination
n
nπ o∞
of cos
x
, that is,
L
n=0
∞
nπ σ̃0 (t) X
σ̃(x, t) =
+
σ̃n (t) cos
x ,
2
L
n=1
where
2
L
Z
L
nπ x dx, ∀n ≥ 0.
L
0
n
nπ o∞
Step II-3: Write f˜(x) as “infinite” linear combination of cos
, that is,
x
n=0
∞
nπ f˜0 X ˜
+
x ,
f˜(x) =
fn cos
2
L
n=1
σ̃n (t) =
σ̃(x, t) cos
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
15
where
2
f˜n =
L
Z
L
0
nπ f˜(x) cos
x dx,
L
∀n ≥ 0.
Step II-4: Let
v(x, t) =
∞
nπ v0 (t) X
+
x ,
vn (t) cos
2
L
n=1
be the solution to (18). It’s easy to see that v satisfies the homogeneous Neumann boundary condition:
vx (0, t) = vx (L, t) = 0. Moreover, “informally” we have
0
= vt − c2 vxx − σ̃(x, t)
=
=
0
(20)
∞
∞
∞
nπ σ̃ (t) X
nπ X
nπ v00 (t) X 0
n2 π 2 c2
0
v
(t)
cos
+
x +
x
−
−
x
vn (t) cos
σ̃
(t)
cos
n
n
2
L
L2
L
2
L
n=1
n=1
n=1
∞ nπ X
n2 π 2 c2
1
0
0
· [v0 (t) − σ̃0 (t)] +
v
(t)
−
σ̃
(t)
cos
x ,
vn (t) +
n
n
2
L2
L
n=1
= v(x, 0) − f˜(x)
=
∞
∞
nπ f˜
nπ X
v0 (0) X
0
vn (0) cos
+
x −
−
f˜n cos
x
2
L
2
L
n=1
n=1
=
∞
i X
nπ 1 h
˜
· v0 (0) − f0 +
[vn (0) − f˜n ] cos
x .
2
L
n=1
Then for any n ≥ 0, vn (t) satisfies the following ODE with the initial value problem:

n 2 π 2 c2


 vn0 (t) +
vn (t) − σ̃n (t) = 0, t > 0,
L2



vn (0) = f˜n .
∞
So if for any n ≥ 0, vn (t) is the solution to (20), then v(x, t) =
nπ v0 (t) X
+
vn (t) cos
x is the solution
2
L
n=1
to (18).
Step III: The solution to (17) is given by:
u(x, t)
= w(x, t) + v(x, t)
∞
= w(x, t) +
nπ v0 (t) X
+
vn (t) cos
x .
2
L
n=1
Remark 4. In order to make computations simply, it’s tricky to choose the function w(x, t). For example, for (17), if
it’s easy to compute the eigenfunction expansion of σ(x, t), we can just choose
w(x, t) =
h(t) − g(t) 2
· x + g(t)x,
2L
∀0 ≤ x ≤ L, t ≥ 0.
16
MINGFENG ZHAO
It’s easy to see that w(x, t) is a quadratic polynomial with respect to x, so we can compute the Fourier series of
w(x, t) easily. Notice that
wx (x, t) =
h(t) − g(t)
· x + g(t),
L
∀0 ≤ x ≤ L, t ≥ 0.
Solving the heat equation with source and inhomogeneous Robin boundary condition I
Let’s consider the heat equation with source and inhomogeneous Robin boundary condition:
(21)













ut = c2 uxx + σ(x, t),
0 < x < L,
BC:
ux (0, t) = g(t),
u(L, t) = h(t),
IC:
u(x, 0) = f (x),
0 ≤ x ≤ L.
t > 0,
t > 0,
To solve the problem (21):
Step I: Choose any “nice” function w(x, t) such that wx (0, t) = g(t) and w(L, t) = h(t) for t > 0.
Step II: Let v(x, t) = u(x, t) − w(x, t), if we are looking for a solution u to (21), then
vt − c2 vxx
=
ut − wt (x, t) − c2 uxx + wxx (x, t)
=
σ(x, t) − wt (x, t) + wxx (x, t)
=: σ̃(x, t)
vx (0, t)
v(L, t)
v(x, 0)
=
ux (0, t) − wx (0, t)
=
g(t) − g(t)
=
0
=
u(L, t) − w(L, t)
=
h(t) − h(t)
=
0
=
u(x, 0) − w(x, 0)
=
f (x) − w(x, 0)
=: f˜(x).
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
17
Then v are supposed to satisfy the following heat equation with source and homogeneous Robin boundary
condition:







(22)






vt = c2 vxx + σ̃(x, t),
BC:
vx (0, t) = v(L, t) = 0,
IC:
v(x, 0) = f˜(x),
0 < x < L,
t > 0,
t > 0,
0 ≤ x ≤ L.
To solve (22), we are going to use the method of eigenfunction expansions, which is a “generalization” of
“variation of parameters”:
Step II-1: First let’s look at the heat equation without source with the homogeneous boundary condition:



vt = c2 vxx , 0 < x < L, t > 0,
(23)

 BC: v (0, t) = v(L, t) = 0,
t > 0.
x
By using the separation of variables, we know that the “ general ” solution to (23) is:
v(x, t) =
∞
X
bn e−
(2n+1)2 π 2 c2
4L2
t
cos
n=0
(2n + 1)π
x .
2L
Step II-2: For each t > 0, we can think σ̃(·, t) is a function of x, then we can write it as an “infinite” linear combination
∞
(2n + 1)π
, that is,
of cos
x
2L
n=0
σ̃(x, t) =
∞
X
σ̃n (t) cos
n=0
(2n + 1)π
x ,
2L
where
L
(2n + 1)π
σ̃(x, t) cos
x dx, ∀n ≥ 0.
2L
0
∞
(2n + 1)π
˜
Step II-3: Write f (x) as “infinite” linear combination of cos
x
, that is,
2L
n=0
2
σ̃n (t) =
L
Z
f˜(x) =
∞
X
f˜n cos
n=0
(2n + 1)π
x ,
2L
where
2
f˜n =
L
Z
L
f˜(x) cos
0
(2n + 1)π
x
2L
dx,
∀n ≥ 0.
Step II-4: Let
v(x, t) =
∞
X
n=0
vn (t) cos
(2n + 1)π
x ,
2L
18
MINGFENG ZHAO
be the solution to (22). It’s easy to see that v satisfies the homogeneous Robin boundary condition:
vx (0, t) = v(L, t) = 0. Moreover, “informally” we have
(24)
0
= vt − c2 vxx − σ̃(x, t)
X
X
∞
∞
∞
X
(2n + 1)π
(2n + 1)π
(2n + 1)2 π 2 c2
(2n + 1)π
0
=
vn (t) cos
vn (t) cos
x +
x −
σ̃n (t) cos
x
2L
4L2
2L
2L
n=0
n=0
n=0
∞ X
(2n + 1)π
(2n + 1)2 π 2 c2
0
vn (t) − σ̃n (t) cos
=
x ,
vn (t) +
4L2
2L
n=0
0
= v(x, 0) − f˜(x)
X
∞
∞
X
(2n + 1)π
(2n + 1)π
˜
=
x −
fn cos
x
vn (0) cos
2L
2L
n=0
n=0
∞
X
(2n + 1)π
˜
[vn (0) − fn ] cos
x .
=
2L
n=0
Then for any n ≥ 0, vn (t) satisfies the following ODE with the initial value problem:

(2n + 1)2 π 2 c2


 vn0 (t) +
vn (t) − σ̃n (t) = 0, t > 0,
4L2


 vn (0) = f˜n .
So if for any n ≥ 0, vn (t) is the solution to (24), then v(x, t) =
∞
X
vn (t) cos
n=0
(2n + 1)π
x
2L
is the solution
to (22).
Step III: The solution to (21) is given by:
u(x, t)
=
w(x, t) + v(x, t)
=
w(x, t) +
∞
X
vn (t) cos
n=0
(2n + 1)π
x .
2L
Remark 5. By the similar discussion with Example 1 (considering the steady-state solution to the constant boundary
conditions), in order to make computations simply, it’s tricky to choose the function w(x, t). For example, for (21), if
it’s easy to compute the eigenfunction expansion of σ(x, t), we can just choose
w(x, t) = g(t)x + h(t) − g(t)L,
∀0 ≤ x ≤ L, t ≥ 0.
It’s easy to see that w(x, t) is a linear polynomial with respect to x, so we can compute the Fourier series of w(x, t)
easily. Notice that
wx (x, t) = g(t),
∀0 ≤ x ≤ L, t ≥ 0.
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
19
Solving the heat equation with source and inhomogeneous Robin boundary condition II
Let’s consider the heat equation with source and inhomogeneous Robin boundary condition:
(25)













ut = c2 uxx + σ(x, t),
BC:
u(0, t) = g(t),
IC:
u(x, 0) = f (x),
0 < x < L,
ux (L, t) = h(t),
t > 0,
t > 0,
0 ≤ x ≤ L.
To solve the problem (25):
Step I: Choose any “nice” function w(x, t) such that w(0, t) = g(t) and wx (L, t) = h(t) for t > 0.
Step II: Let v(x, t) = u(x, t) − w(x, t), if we are looking for a solution u to (25), then
vt − c2 vxx
=
ut − wt (x, t) − c2 uxx + wxx (x, t)
=
σ(x, t) − wt (x, t) + wxx (x, t)
=: σ̃(x, t)
v(0, t)
vx (L, t)
v(x, 0)
=
u(0, t) − w(0, t)
=
g(t) − g(t)
=
0
=
ux (L, t) − wx (L, t)
=
h(t) − h(t)
=
0
=
u(x, 0) − w(x, 0)
=
f (x) − w(x, 0)
=: f˜(x).
20
MINGFENG ZHAO
Then v are supposed to satisfy the following heat equation with source and homogeneous Robin boundary
condition:







(26)






vt = c2 vxx + σ̃(x, t),
BC:
v(0, t) = vx (L, t) = 0,
IC:
v(x, 0) = f˜(x),
0 < x < L,
t > 0,
t > 0,
0 ≤ x ≤ L.
To solve (26), we are going to use the method of eigenfunction expansions, which is a “generalization” of
“variation of parameters”:
Step II-1: First let’s look at the heat equation without source with the homogeneous boundary condition:



vt = c2 vxx , 0 < x < L, t > 0,
(27)

 BC: v(0, t) = v (L, t) = 0,
t > 0.
x
By using the separation of variables, we know that the “ general ” solution to (27) is:
v(x, t) =
∞
X
bn e −
(2n+1)2 π 2 c2
4L2
t
sin
n=0
(2n + 1)π
x .
2L
Step II-2: For each t > 0, we can think σ̃(·, t) is a function of x, then we can write it as an “infinite” linear combination
∞
(2n + 1)π
, that is,
of sin
x
2L
n=0
σ̃(x, t) =
∞
X
σ̃n (t) sin
n=0
(2n + 1)π
x ,
2L
where
L
(2n + 1)π
σ̃(x, t) sin
x dx, ∀n ≥ 0.
2L
0
∞
(2n + 1)π
˜
Step II-3: Write f (x) as “infinite” linear combination of sin
x
, that is,
2L
n=0
2
σ̃n (t) =
L
Z
f˜(x) =
∞
X
f˜n sin
n=0
(2n + 1)π
x ,
2L
where
2
f˜n =
L
Z
L
f˜(x) sin
0
(2n + 1)π
x
2L
dx,
∀n ≥ 0.
Step II-4: Let
v(x, t) =
∞
X
n=0
vn (t) sin
(2n + 1)π
x ,
2L
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
21
be the solution to (26). It’s easy to see that v satisfies the homogeneous Robin boundary condition:
v(0, t) = vx (L, t) = 0. Moreover, “informally” we have
0
=
=
=
0
=
=
=
(28)
vt − c2 vxx − σ̃(x, t)
X
X
∞
∞
∞
X
(2n + 1)π
(2n + 1)π
(2n + 1)2 π 2 c2
(2n + 1)π
0
vn (t) sin
vn (t) sin
x +
x −
σ̃n (t) sin
x
2L
4L2
2L
2L
n=0
n=0
n=0
∞ X
(2n + 1)π
(2n + 1)2 π 2 c2
0
vn (t) − σ̃n (t) sin
x ,
vn (t) +
4L2
2L
n=0
v(x, 0) − f˜(x)
X
∞
∞
X
(2n + 1)π
(2n + 1)π
˜
x −
fn sin
x
vn (0) sin
2L
2L
n=0
n=0
∞
X
(2n + 1)π
˜
[vn (0) − fn ] sin
x .
2L
n=0
Then for any n ≥ 0, vn (t) satisfies the following ODE with the initial value problem:

(2n + 1)2 π 2 c2


 vn0 (t) +
vn (t) − σ̃n (t) = 0, t > 0,
4L2


 vn (0) = f˜n .
So if for any n ≥ 0, vn (t) is the solution to (28), then v(x, t) =
∞
X
vn (t) sin
n=0
(2n + 1)π
x
2L
is the solution
to (26).
Step III: The solution to (25) is given by:
u(x, t)
= w(x, t) + v(x, t)
∞
X
= w(x, t) +
n=0
vn (t) sin
(2n + 1)π
x .
2L
Remark 6. By the similar discussion with Example 1 (considering the steady-state solution to the constant boundary
conditions), in order to make computations simply, it’s tricky to choose the function w(x, t). For example, for (25), if
it’s easy to compute the eigenfunction expansion of σ(x, t), we can just choose
w(x, t) = h(t)x + g(t),
∀0 ≤ x ≤ L, t ≥ 0.
It’s easy to see that w(x, t) is a linear polynomial with respect to x, so we can compute the Fourier series of w(x, t)
easily. Notice that
wx (x, t) = h(t),
∀0 ≤ x ≤ L, t ≥ 0.
22
MINGFENG ZHAO
Solving the heat equation with source and periodic boundary condition
Let’s consider the heat equation with source and periodic boundary condition:







(29)






ut = c2 uxx + σ(x, t),
BC:
u(−L, t) = u(L, t),
IC:
u(x, 0) = f (x),
−L < x < L,
t > 0,
ux (−L, t) = ux (L, t),
t > 0,
−L ≤ x ≤ L.
To solve the problem (29), we are going to use the method of eigenfunction expansions, which is a “generalization”
of “variation of parameters”:
Step I: First let’s look at the heat equation without source with the periodic boundary condition:



ut = c2 uxx , L < x < L, t > 0,
(30)

 BC: u(−L, t) = u(L, t), u (−L, t) = u (L, t) = 0,
t > 0.
x
x
By using the separation of variables, we know that the “ general ” solution to (30) is:
∞
u(x, t) =
nπ i
nπ a0 X − n2 π22 c2 t h
+
e L
x + bn sin
x .
an cos
2
L
L
n=1
Step II: For each t > 0, we can think σ(·, t) is a function of x, then we can write it as an “infinite” linear combination
n
nπ nπ o∞
of cos
x , sin
, that is,
L
L
n=0
∞
σ(x, t) =
nπ nπ i
σ0 (t) X h
+
σn (t) cos
x + σ̃n (t) sin
x ,
2
L
L
n=1
where
σn (t) =
1
L
Z
L
σ(x, t) cos
−L
nπ x dx,
L
∀n ≥ 0,
and
σ̃n (t) =
1
L
Z
L
σ(x, t) sin
−L
nπ x dx,
L
∀n ≥ 1.
nπ o∞
n
nπ , sin
x
, that is,
Step II: Write f (x) as “infinite” linear combination of cos
x
L
n=0
∞
f (x) =
nπ nπ i
f0 X h
+
fn cos
x + f˜n sin
x ,
2
L
L
n=1
where
1
fn =
L
Z
L
nπ f (x) cos
x dx,
L
−L
∀n ≥ 0,
and
1
f˜n =
L
Z
L
f (x) sin
−L
nπ x dx,
L
∀n ≥ 1.
LECTURE 13: THE METHOD OF EIGENFUNCTION EXPANSIONS
23
Step III: Let
∞
u(x, t) =
nπ i
nπ u0 (t) X h
+
x + ũn (t) sin
x ,
un (t) cos
2
L
L
n=1
be the solution to (29), then “informally” we have
0
= ut − c2 uxx − σ(x, t)
∞
nπ i
nπ u00 (t) X h 0
=
+
x + ũ0n (t) sin
x
un (t) cos
2
L
L
n=1
+
∞
nπ nπ i
X
n2 π 2 c2 h
un (t) cos
x + ũn (t) sin
x
2
L
L
L
n=1
∞
nπ i
nπ σ0 (t) X h
−
x + σ̃n (t) sin
x
σn (t) cos
2
L
L
n=1
∞ nπ X
n 2 π 2 c2
1
0
0
vn (t) +
· [v0 (t) − σ̃0 (t)] +
v
(t)
−
σ
(t)
cos
x
n
n
2
L2
L
n=1
∞ nπ X
n2 π 2 c2
0
+
ṽ
(t)
−
σ̃
(t)
sin
x ,
ṽn (t) +
n
n
L2
L
n=1
−
=
0
= u(x, 0) − f (x)
∞
∞ h
nπ i f
nπ i
nπ nπ X
u0 (0) X h
0
=
+
x + ũn (0) sin
x −
−
x + f˜n sin
x
un (0) cos
fn cos
2
L
L
2
L
L
n=1
n=1
=
(31)
∞
∞
nπ X
nπ X
1
· [u0 (0) − f0 ] +
[un (0) − fn ] cos
x +
[ũn (0) − f˜n ] sin
x .
2
L
L
n=1
n=1
Then for any n ≥ 0, un (t) and ũn (t) satisfies the following ODE with the initial value problem:


n2 π 2 c2
n2 π 2 c2


0
0


 un (t) +

ũ
(t)
+
u
(t)
−
σ
(t)
=
0,
t
>
0,
ũn (t) − σ̃n (t) = 0, t > 0,
n
n
n
L2
L2
and




 un (0) = fn .
 ũn (0) = f˜n .
So if for any n ≥ 0, un (t) and ũ(t) are the solution to (31), then the solution to (29) is:
∞
nπ nπ i
u0 (t) X h
+
un (t) cos
x + ũn (t) sin
x .
2
L
L
n=1
Remark 7. The key ingredient of the method of eigenfunction expansions is to find the eigenvalues and eigenfunctions with respect to spatial variable x by using the method of separation of variables.
Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C.
Canada V6T 1Z2
E-mail address: mingfeng@math.ubc.ca
Download