Two-point boundary value problems

advertisement
LECTURE 9: TWO-POINT BOUNDARY VALUE PROBLEMS AND FOURIER SERIES
MINGFENG ZHAO
July 21, 2015
Two-point boundary value problems
A two-point boundary value problem for the second order linear differential equation has the form:



P (x)y 00 + Q(x)y 0 + R(x)y = f (x), ∀a < x < b,



α1 y(a) + β1 y 0 (a) = γ1




 α2 y(b) + β2 y 0 (b) = γ2 ,
where P (x), Q(x) and R(x) are functions, αi , βi and γi are constants for i = 1, 2.
Remark 1. For a two-point boundary value problem, there might be a solution, or no solution or many solutions.
Example 1. Let a be a constant, solve the boundary value problem y 00 + y = 0, y(0) = 1 and y(π) = a.
Try y = erx to be a solution to y 00 + y = 0, then y 0 = rerx , y 00 = r2 erx and
0
= y 00 + y
= r2 erx + erx
= erx (r2 + 1).
Then r2 + 1 = 0, that is, r = ±i. So the general solution to y 00 + y = 0 is
y(x) = C1 cos(x) + C2 sin(x).
Since y(0) = 1 and y(π) = a, then
C1 = 1,
− C1 = a.
and
So if a 6= −1, then there is no solution to y 00 + y = 0, y(0) = 1 and y(π) = a; if a = −1, then for any constant C2 ,
y(x) = cos(x) + C2 sin(x) is a solution to y 00 + y = 0, y(0) = 1 and y(π) = a = −1.
1
2
MINGFENG ZHAO
Example 2. Solve the boundary value problem y 00 + y = 0, y(0) = y(π) = 0.
By the computations in Example 1, we know that the general solution to y 00 + y = 0 is:
y(x) = C1 cos(x) + C2 sin(x).
Since y(0) = y(π) = 0, then
C1 = 0,
and
− C1 = 0.
Therefore, the solution to y 00 + y = 0, y(0) = y(π) = 0 is:
y(x) = C2 sin(x).
Eigenvalue problems
Definition 1. Consider the two-point boundary value problem:



P (x)y 00 + Q(x)y 0 + R(x)y = λr(x)y,



(1)
α1 y(a) + β1 y 0 (a) = 0




 α2 y(b) + β2 y 0 (b) = 0,
∀a < x < b,
where P (x), Q(x), R(x) and r(x) are functions, αi and βi are constants for i = 1, 2, and λ is a constant.
We say that λ is an eigenvalue of (1) if there is a non-zero solution φ(x) to (1). In this case, a non-zero solution φ(x)
to (1) is called an eigenfunction corresponding to the eigenvalue λ.
Example 3. For the following eigenvalue problem:


 X 00 (x) + λX(x) = 0, 0 < x < L,
(2)

 X(0) = 0, X(L) = 0.
By the computations in the part of Solving the heat equation without source with homogeneous Dirichlet
nπ 2
boundary value in Lecture 8, the eigenvalues for (2) are λn =
for n ∈ N, and the corresponding eigenfunctions
L
nπ are Xn = sin
x .
L
Example 4. For the following eigenvalue problem:


 X 00 (x) + λX(x) = 0, 0 < x < L,
(3)

 X 0 (0) = 0, X 0 (L) = 0.
LECTURE 9: TWO-POINT BOUNDARY VALUE PROBLEMS AND FOURIER SERIES
3
By the computations in the part of Solving the heat equation without source with homogeneous Neumann
nπ 2
S
boundary condition in Lecture 8, the eigenvalues for (3) are λn =
for n ∈ N {0}, and the corresponding
L
nπ eigenfunctions are Xn = cos
x .
L
Example 5. For the following eigenvalue problem:


 X 00 (x) + λX(x) = 0, −L < x < L,
(4)

 X(−L) = X(L), X 0 (−L) = X 0 (L).
By the computations in the part of Solving the heat equation on a circular ring (with a periodic boundary
nπ 2
S
condition) in Lecture 8, the eigenvalues for (4) are λn =
for n ∈ N {0}, and the corresponding eigenfunctions
L
nπ nπ x and X̃n = sin
x .
are Xn = cos
L
L
Fourier sine series
Question 1. Assume that
f (x) =
∞
X
bn sin
n=1
nπ x ,
L
x ∈ [0, L],
how can we compute bn by using f (x)?
Lemma 1. Let L > 0 and m ∈ Z, then
L
Z
mπ x dx
cos
L
0

 L, if m = 0,
.
 0, if m 6= 0.
=
Proof. If m = 0, then
Z
L
cos
0
mπ x dx
L
Z
L
=
1 dx = L.
0
If m 6= 0, then
Z
L
cos
0
mπ x dx
L
=
1
mπ
L
· sin
mπ x
L
L
0
=
L
· [sin(mπ) − sin(0)]
mπ
=
0.
4
MINGFENG ZHAO
Lemma 2. Let L > 0 and m, n ∈ N, then
L
Z
0


 0, if m 6= n
=
.
L

 , if m = n.
2
mπ nπ sin
x sin
x dx
L
L
Proof. Recall the identity:
sin(α) sin(β) =
cos(α − β) − cos(α + β)
.
2
Then we have
Z
L
sin
0
mπ nπ x sin
x dx
L
L
L
(m − n)π
(m + n)π
cos
x − cos
x
dx
L
L
0
Z
Z
(m − n)π
(m + n)π
1 L
1 L
x dx −
x dx
=
cos
cos
2 0
L
2 0
L
Z
1 L
(m − n)π
=
x dx Since m, n ∈ N and by Lemma 1
cos
2 0
L


 0, if m 6= n
=
, By Lemma 1.
L

 , if m = n.
2
1
2
=
Z
∞
X
nπ mπ x for all x ∈ L, for any m ∈ N, both sides multiply sin
and then
L
L
n=1
integrate over [0, L], “informally” we have
Now assume that f (x) =
Z
0
L
bn sin
mπ x dx
f (x) sin
L
Z
L
=
0
Z
=
=
∞
X
#
nπ mπ bn sin
x sin
x dx
L
L
n=1
∞
LX
0
=
"
∞
X
bn sin
n=1
L
Z
bn
sin
mπ nπ x sin
x dx
L
L
mπ nπ x sin
x dx
L
L
n=1
0
L
bm ,
2
By Lemma 2.
Then we have
bm
2
=
L
Z
L
f (x) sin
0
mπ x dx,
L
for all m ≥ 1 .
LECTURE 9: TWO-POINT BOUNDARY VALUE PROBLEMS AND FOURIER SERIES
5
Example 6. Solve the problem:













ut = uxx ,
0 < x < 1,
BC:
u(0, t) = 0,
u(1, t) = 0,
IC:
u(x, 0) = x,
0 ≤ x ≤ 1.
t > 0,
t > 0,
By the result in the part of Solving the heat equation without source with homogeneous Dirichlet
 boundary condition in Lecture 8, we know that for any n ∈ N, we can find a non-zero solution to


ut = uxx , 0 < x < 1, t > 0,
:

 BC: u(0, t) = 0, u(1, t) = 0,
t > 0.
un (x, t) = e−n
2
π2 t
sin(nπx).
Now let’s write x as an “infinitely” linear combination of {sin(nπx)}∞
n=1 :
x=
∞
X
bn sin(nπx),
∀x ∈ [0, 1].
n=1
Then for all n ≥ 1, we have
bn
=
2
1
Z
x sin(nπx) dx
Z
=
1
0
1
2
x sin(nπx) dx.
0
Z
For
x sin(nπx) dx, use the integration by parts, we have
Z
1
x d cos(nπx) · −
nπ
Z
1
−
x d cos(nπx)
nπ
Z
1
−
x cos(nπx) − cos(nπx) dx
nπ
1
1
−
x cos(nπx) −
sin(nπx) + C
nπ
nπ
Z
x sin(nπx) dx
=
=
=
=
=
−
x cos(nπx) sin(nπx)
+
.
nπ
n2 π 2
So we get
bn
=
x cos(nπx) sin(nπx)
2 −
+
nπ
n2 π 2
1
0
6
MINGFENG ZHAO
cos(nπ) sin(nπ)
2 −
+ 2 2 −2·0
nπ
n π
=
2 cos(nπ)
nπ
2(−1)n+1
.
nπ
= −
=
Hence “informally” we get
x=
∞
X
2(−1)n+1
· sin(nπx),
nπ
n=1
∀x ∈ [0, 1].
So the solution is:
u(x, t) =
∞
X
2(−1)n+1 −n2 π2 t
·e
sin(nπx).
nπ
n=1
∞
X
2(−1)n+1
· sin(nπx) in [0, 1], then
Remark 2. Since we know that x =
nπ
n=1
∞
nπ X
2(−1)n+1
· sin
nπ
2
n=1
∞
X
2(−1)2k+1+1
(2k + 1)π
=
· sin
(2k + 1)π
2
1
2
=
k=0
=
∞
X
k=0
=
2
π
· sin kπ +
(2k + 1)π
2
∞
2 X (−1)k
.
π
2k + 1
k=0
Hence we have
∞
π X (−1)k
1 1 1
=
= 1 − + − + ··· .
4
2k + 1
3 5 7
k=0
Example 7. Solve the problem:













ut = uxx ,
0 < x < 1,
BC:
u(0, t) = 0,
IC:
u(x, 0) = f (x),
t > 0,
u(1, t) = 0,
t > 0,
0 ≤ x ≤ 1,
where
f (x) =


 2x,

 2 − 2x,
1
if 0 < x ≤ ,
2
1
if < x < 1,
2
LECTURE 9: TWO-POINT BOUNDARY VALUE PROBLEMS AND FOURIER SERIES
7
By the computations in the part of Solving the heat equation
and separation of variables in Lecture 8, we



ut = c2 uxx , 0 < x < 1, t > 0,
know that for any n ∈ N, we can find a non-zero solution to
:

 BC: u(0, t) = 0, u(L, t) = 0,
t > 0.
un (x, t) = e−n
2
π2 t
sin(nπx).
Now let’s write f (x) as an “infinitely” linear combination of {sin(nπx)}∞
n=1 :
f (x) =
∞
X
bn sin(nπx),
∀x ∈ [0, 1].
n=1
Then for all n ≥ 1, we have
bn
=
2
1
f (x) sin(nπx) dx
0
Z
=
1
Z
1
2
2
(2 − 2x) sin(nπx) dx
2x sin(nπx) dx + 2
1
2
0
Z
=
1
Z
1
2
4
1
Z
Z
1
2
0
1
sin(nπx) dx − 4
x sin(nπx) dx + 4
x sin(nπx) dx.
1
2
By the computation in Example 6, we have
Z
x cos(nπx) sin(nπx)
x sin(nπx) dx = −
+
.
nπ
n2 π 2
Then we have
"
1
2
Z
4
x sin(nπx) dx
0
Z
#
cos nπ
sin nπ
2
2
= 4 −
+
−4·0
nπ
n2 π 2
2 cos nπ
4 sin nπ
2
2
= −
+
nπ
n2 π 2
1
4
sin(nπx) dx =
1
2
=
Z
1
−4
x sin(nπx) dx =
1
2
=
−
1
2
4
cos(nπx)
nπ
1
1
2
4 cos(nπ) 4 cos nπ
2
−
+
nπ
nπ
"
#
1
nπ
sin nπ
cos(nπ) sin(nπ)
2 cos 2
2
−4 −
+ 2 2 +4 −
+
nπ
n π
nπ
n2 π 2
4 sin nπ
4 cos(nπ) 2 cos nπ
2
2
−
+
.
nπ
nπ
n2 π 2
So we have
bn
2 cos nπ
4 sin nπ
4 cos(nπ) 4 cos nπ
2
2
2
= −
+
−
+
nπ
n2 π 2
nπ
nπ
8
MINGFENG ZHAO
4 sin nπ
4 cos(nπ) 2 cos nπ
2
2
+
−
+
nπ
nπ
n2 π 2
8 sin nπ
2
=
.
n2 π 2
Then
b2k
=
8 sin(kπ)
(2k)2 π 2
=
0
8 sin
b2k+1
=
=
=
(2k+1)π
2
(2k + 1)2 π 2
8 sin kπ + π2
(2k + 1)2 π 2
8(−1)k
,
(2k + 1)2 π 2
∀k ≥ 0.
So “informally” we get
f (x) =
∞
X
k=0
8(−1)k
sin[(2k + 1)πx],
(2k + 1)2 π 2
∀x ∈ [0, 1].
So the solution is:
u(x, t) =
∞
X
k=0
2 2
8(−1)k
e−(2k+1) π t sin[(2k + 1)πx].
2
2
(2k + 1) π
Remark 3. Notice that
1
= f
2
1
=
∞
X
k=0
=
∞
X
k=0
=
∞
X
k=0
=
∞
X
k=0
8(−1)k
sin
(2k + 1)2 π 2
(2k + 1)π
2
π
8(−1)k
sin kπ +
2
2
(2k + 1) π
2
8(−1)k
· (−1)k
(2k + 1)2 π 2
8
.
(2k + 1)2 π 2
Hence we get
∞
(5)
X
π2
1
1
1
1
=
= 1 + 2 + 2 + 2 + ··· .
8
(2k + 1)2
3
5
7
k=0
LECTURE 9: TWO-POINT BOUNDARY VALUE PROBLEMS AND FOURIER SERIES
Remark 4. One can use (5) to prove the following identity:
1
1
1
π2
1
= 1 + 2 + 2 + 2 + 2 + ··· .
6
2
3
4
5
In fact, for any n ≥ 1, there exist unique k ≥ 0 and unique odd integer m such that n = 2k m, then
1+
1
1
1
1
+ 2 + 2 + 2 + ···
22
3
4
5
=
=
∞
X
1
2
n
n=1
∞ X
∞
X
k=0 i=0
=
1
[2k (2i + 1)]2
∞
∞
X
1
1 X
k
4 i=0 (2i + 1)2
k=0
=
∞
X
1 π2
·
4k 8
By (5)
k=0
=
∞
π2 X 1
8
4k
=
1
π2
·
8 1−
k=0
=
=
1
4
π2 4
·
8 3
π2
.
6
Fourier cosine series
Question 2. Assume that
∞
f (x) =
nπ a0 X
an cos
+
x ,
2
L
n=1
x ∈ [0, L],
how can we compute an by using f (x)?
S
Lemma 3. Let L > 0 and m, n ∈ N {0}, then
Z
L
cos
0
mπ nπ x cos
x dx
L
L



0, if m 6= n



=
L, if m = n = 0 .




 L , if m = n 6= 0.
2
9
10
MINGFENG ZHAO
Proof. Recall the identity:
cos(α) cos(β) =
cos(α + β) + cos(α − β)
.
2
Then we have
Z
L
cos
0
nπ mπ x cos
x dx
L
L
L
(m + n)π
(m − n)π
cos
x + cos
x
dx
L
L
0
Z
Z
(m + n)π
(m − n)π
1 L
1 L
cos
cos
x dx +
x dx.
2 0
L
2 0
L
1
2
=
=
Z
Then
• If m 6= n, since m, n ∈ N
S
{0}, by Lemma 1, then
L
Z
cos
0
nπ mπ x cos
x dx = 0.
L
L
• If m = n = 0, then
L
Z
cos
0
Z L
mπ nπ x cos
x dx =
1 dx = L.
L
L
0
• If m = n 6= 0, then m = n ∈ N, by Lemma 1, then
Z
L
cos
0
mπ nπ L
x cos
x dx = .
L
L
2
∞
Now assume f (x) =
nπ a0 X
an cos
+
x in [0, L], then
2
L
n=1
• Both sides integrate over [0, L], then “informally” we have
Z
L
#
∞
nπ a0 X
+
an cos
x
dx
2
L
0
n=1
Z L
∞
nπ a0 L X
+
an
cos
x dx
2
L
0
n=1
Z
f (x) dx
=
0
=
=
L
"
a0 L
,
2
By Lemma 1.
Then we get
2
a0 =
L
Z
L
f (x) dx.
0
LECTURE 9: TWO-POINT BOUNDARY VALUE PROBLEMS AND FOURIER SERIES
• For any m ∈ N, both sides multiply cos
11
mπ and then integrate over [0, L], “informally” we have
L
#
Z L
Z L"
∞
mπ mπ nπ a0 X
f (x) cos
x dx =
+
x cos
x dx
an cos
L
2
L
L
0
0
n=1
#
Z L"
∞
mπ mπ X
nπ a0
cos
cos
x +
dx
=
an cos
2
L
L
2
0
n=1
Z
Z L
∞
mπ mπ nπ X
a0 L
=
cos
cos
dx
x dx +
an
cos
2 0
L
L
2
0
n=1
am L
,
2
=
By Lemma 3.
Then we get
2
=
L
am
Z
L
f (x) cos
0
mπ x ,
L
∀m ∈ N.
In summary, we have
am =
2
L
Z
L
f (x) cos
0
mπ x dx,
L
for all m ≥ 0 .
Example 8. Solve the problem:













ut = uxx ,
0 < x < 1,
t > 0,
BC:
ux (0, t) = 0,
ux (1, t) = 0,
IC:
u(x, 0) = x,
0 ≤ x ≤ 1.
t > 0,
By the result in the part of Solving the heat equation without source with homogeneous Neumann
boundary condition in Lecture 8, we know that for any n ∈ N, we can find a non-zero solution to



ut = uxx , 0 < x < 1, t > 0,
:

 BC: u (0, t) = 0, u (1, t) = 0,
t
>
0.
x
x
un (x, t) = e−n
2
π2 t
cos(nπx).
Now let’s write x as an “infinitely” linear combination of {cos(nπx)}∞
n=0 :
∞
x=
a0 X
+
an cos(nπx),
2
n=1
∀x ∈ [0, 1].
Then for all n ≥ 0, we have
an =
Then
2
1
Z
1
Z
x cos(nπx) dx = 2
0
1
x cos(nπx) dx.
0
12
MINGFENG ZHAO
• When n = 0, then
1
Z
x dx = 2 ·
an = 2
0
x2
2
1
= 1.
0
• When n ≥ 1, use the integration by parts, we have
Z
Z
1
x cos(nπx) dx =
x d sin(nπx) ·
nπ
Z
1
x d sin(nπx)
=
nπ
Z
1
=
x sin(nπx) − sin(nπx) dx
nπ
1
1
=
x sin(nπx) +
cos(nπx) + C
nπ
nπ
=
x sin(nπx) cos(nπx)
+
+ C.
nπ
n2 π 2
So we get
1
x sin(nπx) cos(nπx)
= 2
+
nπ
n2 π 2
0
sin(nπ) cos(nπ)
1
= 2
+
−2· 2 2
nπ
n2 π 2
n π
an
=
=
=
2 cos(nπ) − 2
n2 π 2
2[(−1)n − 1]
n2 π 2


 0,
if n is even,
−4


, if n = 2k + 1.
(2k + 1)2 π 2
Then
x=
∞
1
4 X
1
− 2
cos[(2k + 1)πx],
2 π
(2k + 1)2
∀x ∈ [0, 1].
k=0
So the solution is:
u(x, t) =
∞
1
4 X −(2k+1)2 π2 t cos[(2k + 1)πx]
− 2
e
·
.
2 π
(2k + 1)2
k=0
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