BVP of ODE
1Boundary-Value Problems for Ordinary Differential Equations
NTNU
Tsung-Min Hwang December 20, 2003
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
21 – Mathematical Theories . . . 4
2 – Finite Difference Method For Linear Problems . . . 15
2.1 – The Finite Difference Formulation . . . 15
2.2 – Convergence Analysis . . . 19
3 – Shooting Methods . . . 22
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
3The two-point boundary-value problems (BVP) considered in this chapter involve a
second-order differential equation together with boundary condition in the following form:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(1)
The numerical procedures for finding approximate solutions to the initial-value problems can not be adapted to the solution of this problem since the specification of conditions involve two different points,
x = a
andx = b
. New techniques are introduced in this chapter for handling problems (1) in which the conditions imposed are of a boundary-value rather than an initial-value type.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
3The two-point boundary-value problems (BVP) considered in this chapter involve a
second-order differential equation together with boundary condition in the following form:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(1)
The numerical procedures for finding approximate solutions to the initial-value problems can not be adapted to the solution of this problem since the specification of conditions involve two different points,
x = a
andx = b
.New techniques are introduced in this chapter for handling problems (1) in which the conditions imposed are of a boundary-value rather than an initial-value type.
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
3The two-point boundary-value problems (BVP) considered in this chapter involve a
second-order differential equation together with boundary condition in the following form:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(1)
The numerical procedures for finding approximate solutions to the initial-value problems can not be adapted to the solution of this problem since the specification of conditions involve two different points,
x = a
andx = b
. New techniques are introduced in this chapter for handling problems (1) in which the conditions imposed are of a boundary-value rather than an initial-value type.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
41 – Mathematical Theories
Before considering numerical methods, a few mathematical theories about the two-point boundary-value problem (1), such as the existence and uniqueness of solution, shall be discussed in this section.
Theorem 1 Suppose that
f
in (1) is continuous on the setD = {(x, y, y
0)|a ≤ x ≤ b, −∞ < y < ∞, −∞ < y
0< ∞} ,
and that
∂f
∂y
and∂f
∂y
0 are also continuous onD
. If1.
∂f
∂y (x, y, y
0) > 0
for all(x, y, y
0) ∈ D
, and2. a constant
M
exists, with∂f
∂y
0(x, y, y
0)
≤ M
,∀ (x, y, y
0) ∈ D
,then (1) has a unique solution.
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
5When the function
f (x, y, y
0)
has the special formf (x, y, y
0) = p(x)y
0+ q(x)y + r(x),
the differential equation become a so-called linear problem. The previous theorem can be simplified for this case.
Corollary 1 If the linear two-point boundary-value problem
y
00= p(x)y
0+ q(x)y + r(x) y(a) = α, y(b) = β
satisfies
1.
p(x), q(x)
, andr(x)
are continuous on[a, b]
, and2.
q(x) > 0
on[a, b]
,then the problem has a unique solution.
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
6Many theories and application models consider the boundary-value problem in a special form as follows.
y
00= f (x, y)
y(0) = 0, y(1) = 0
We will show that this simple form can be derived from the original problem by simple
techniques such as changes of variables and linear transformation. To do this, we begin by changing the variable. Suppose that the original problem is
y
00= f (x, y)
y(a) = α, y(b) = β
(2)where
y = y(x)
. Now letλ = b − a
and define a new variablet = x − a
b − a = 1
λ (x − a).
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
7That is,
x = a + λt
. Notice thatt = 0
corresponds tox = a
, andt = 1
corresponds tox = b
. Then we definez(t) = y(a + λt) = y(x)
with
λ = b − a
. This givesz
0(t) = d
dt z(t) = d
dt y(a + λt) = d
dx y(x) d
dt (a + λt)
= λy
0(x)
and, analogously,
z
00(t) = d
dt z
0(t) = λ
2y
00(x) = λ
2f (x, y(x)) = λ
2f (a + λt, z(t)).
Likewise the boundary conditions are changed to
z(0) = y(a) = α
andz(1) = y(b) = β.
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
8With all these together, the problem (2) is transformed into
z
00(t) = λ
2f (a + λt, z(t))
z(0) = α, z(1) = β
(3)Thus, if
y(x)
is a solution for (2), thenz(t) = y(a + λt)
is a solution for the boundary-value problem (3). Conversely, ifz(t)
is a solution for (3), theny(x) = z(
λ1(x − a))
is a solution for (2).Example 1 Simplify the boundary conditions of the following equation by use of changing variables.
y
00= sin(xy) + y
2y(1) = 3, y(4) = 7
Solution: In this problem
a = 1, b = 4
, henceλ = 3
. Now define the new variablet =
13(x − 1)
, hencex = 1 + 3t
, and letz(t) = y(x) = y(1 + 3t)
. ThenDepartment of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
9λ
2f (a + λt, z) = 9 sin(1 + 3t)z + z
2,
and the original equation is reduced to
z
00(t) = 9 sin((1 + 3t)z) + 9z
2z(0) = 3, z(1) = 7
To reduce a two-point boundary-value problem
z
00(t) = g(t, z)
z(0) = α, z(1) = β
to a homogeneous system, let
u(t) = z(t) − [α + (β − α)t]
then
u
00(t) = z
00(t)
, andu(0) = z(0) − α = 0
andu(1) = z(1) − β = 0
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
10Moreover,
g(t, z) = g(t, u + α + (β − α)t) ≡ h(t, u).
The system is now transformed into
u
00(t) = h(t, u)
u(0) = 0, u(1) = 0
Example 2 Reduce the system
z
00= [5z − 10t + 35 + sin(3z − 6t + 21)]e
tz(0) = −7, z(1) = −5
to a homogeneous problem by linear transformation technique.
Solution: Let
u(t) = z(t) − [−7 + (−5 + 7)t] = z(t) − 2t + 7.
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
11Then
z(t) = u(t) + 2t − 7
, andu
00= z
00= [5z − 10t + 35 + sin(3z − 6t + 21)]e
t= [5(u + 2t − 7) − 10t + 35 + sin(3(u + 2t − 7) − 6t + 21)]e
t= [5u + sin(3u)]e
tThe system is transformed to
u
00(t) = [5u + sin(3u)]e
tu(0) = u(1) = 0
Example 3 Reduce the following two-point boundary-value problem
y
00= y
2+ 3 − x
2+ xy y(3) = 7, y(5) = 9
to a homogeneous system.
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
12Solution: In the original system,
a = 3, b = 5, α = 7, β = 9
. Letλ = b − a = 2
anddefine a new variable
t = 1
2 (x − 3) =⇒ x = 2t + 3.
Let the function
z(t) = y(x) = y(2t + 3)
. Thenz
00(t) = λ
2y
00(2t + 3) = λ
2f (2t + 3, u)
= 4[z
2+ 3 − (2t + 3)
2+ (2t + 3)z]
= 4[z
2+ 3z + 2tz − 4t
2− 12t − 6]
The original problem is first transformed into
z
00(t) = 4[z
2+ 3z + 2tz − 4t
2− 12t − 6]
z(0) = 7, z(1) = 9
Next let
u(t) = z(t) − [7 + 2t],
or equivalently,z(t) = u(t) + 2t + 7.
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
13Then
u
00(t) = 4[(z + 2t + 7)
2+ 3(u + 2t + 7) + 2t(u + 2t + 7) − 4t
2− 12t − 6]
= 4[u
2+ 6tu + 17u + 4t
2+ 36t + 64].
The original problem is transformed into the following homogeneous system
u
00(t) = 4[u
2+ 6tu + 17u + 4t
2+ 36t + 64]
u(0) = u(1) = 0
Theorem 2 The boundary-value problem
y
00= f (x, y)
y(0) = 0, y(1) = 0
has a unique solution if
∂f
∂y
is continuous, non-negative, and bounded in the strip0 ≤ x ≤ 1
and−∞ < y < ∞
.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
14Theorem 3 If
f
is a continuous function of(s, t)
in the domain0 ≤ s ≤ 1
and−∞ < t < ∞
such that|f (s, t
1) − f (s, t
2)| ≤ K|t
1− t
2|, (K < 8).
Then the boundary-value problem
y
00= f (x, y)
y(0) = 0, y(1) = 0
has a unique solution in
C[0, 1]
.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
152 – Finite Difference Method For Linear Problems
We consider finite difference method for solving the linear two-point boundary-value problem of the form
y
00= p(x)y
0+ q(x)y + r(x)
y(a) = α, y(b) = β.
(4)Methods involving finite differences for solving boundary-value problems replace each of the derivatives in the differential equation by an appropriate difference-quotient approximation.
2.1 – The Finite Difference Formulation
First, partition the interval
[a, b]
inton
equally-spaced subintervals by pointsa = x
0< x
1< . . . < x
n< x
n= b
. Each mesh pointx
i can be computed byx
i= a + i ∗ h, i = 0, 1, . . . , n,
withh = b − a n
where
h
is called the mesh size. Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
152 – Finite Difference Method For Linear Problems
We consider finite difference method for solving the linear two-point boundary-value problem of the form
y
00= p(x)y
0+ q(x)y + r(x)
y(a) = α, y(b) = β.
(4)Methods involving finite differences for solving boundary-value problems replace each of the derivatives in the differential equation by an appropriate difference-quotient approximation.
2.1 – The Finite Difference Formulation
First, partition the interval
[a, b]
inton
equally-spaced subintervals by pointsa = x
0< x
1< . . . < x
n< x
n= b
. Each mesh pointx
i can be computed byx
i= a + i ∗ h, i = 0, 1, . . . , n,
withh = b − a n
where
h
is called the mesh size. Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
152 – Finite Difference Method For Linear Problems
We consider finite difference method for solving the linear two-point boundary-value problem of the form
y
00= p(x)y
0+ q(x)y + r(x)
y(a) = α, y(b) = β.
(4)Methods involving finite differences for solving boundary-value problems replace each of the derivatives in the differential equation by an appropriate difference-quotient approximation.
2.1 – The Finite Difference Formulation
First, partition the interval
[a, b]
inton
equally-spaced subintervals by pointsa = x
0< x
1< . . . < x
n< x
n= b
. Each mesh pointx
i can be computed byx
i= a + i ∗ h, i = 0, 1, . . . , n,
withh = b − a n
where
h
is called the mesh size. Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
152 – Finite Difference Method For Linear Problems
We consider finite difference method for solving the linear two-point boundary-value problem of the form
y
00= p(x)y
0+ q(x)y + r(x)
y(a) = α, y(b) = β.
(4)Methods involving finite differences for solving boundary-value problems replace each of the derivatives in the differential equation by an appropriate difference-quotient approximation.
2.1 – The Finite Difference Formulation
First, partition the interval
[a, b]
inton
equally-spaced subintervals by pointsa = x
0< x
1< . . . < x
n< x
n= b
.Each mesh point
x
i can be computed byx
i= a + i ∗ h, i = 0, 1, . . . , n,
withh = b − a n
where
h
is called the mesh size. Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
152 – Finite Difference Method For Linear Problems
We consider finite difference method for solving the linear two-point boundary-value problem of the form
y
00= p(x)y
0+ q(x)y + r(x)
y(a) = α, y(b) = β.
(4)Methods involving finite differences for solving boundary-value problems replace each of the derivatives in the differential equation by an appropriate difference-quotient approximation.
2.1 – The Finite Difference Formulation
First, partition the interval
[a, b]
inton
equally-spaced subintervals by pointsa = x
0< x
1< . . . < x
n< x
n= b
. Each mesh pointx
i can be computed byx
i= a + i ∗ h, i = 0, 1, . . . , n,
withh = b − a n
where
h
is called the mesh size.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
16At the interior mesh points,
x
i, fori = 1, 2, . . . , n − 1
, the differential equation to be approximated satisfiesy
00(x
i) = p(x
i)y
0(x
i) + q(x
i)y(x
i) + r(x
i).
(5)The central finite difference formulae
y
0(x
i) = y(x
i+1) − y(x
i−1)
2h − h
26 y
(3)(η
i),
(6)for some
η
i in the interval(x
i−1, x
i+1)
, andy
00(x
i) = y(x
i+1) − 2y(x
i) + y(x
i−1)
h
2− h
212 y
(4)(ξ
i),
(7)for some
ξ
i in the interval(x
i−1, x
i+1)
, can be derived from Taylor’s theorem by expandingy
aboutx
i.Let
u
i denote the approximate value ofy
i= y(x
i)
. Ify ∈ C
4[a, b]
, then a finite difference method with truncation error of orderO(h
2)
can be obtained by using the approximations Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
16At the interior mesh points,
x
i, fori = 1, 2, . . . , n − 1
, the differential equation to be approximated satisfiesy
00(x
i) = p(x
i)y
0(x
i) + q(x
i)y(x
i) + r(x
i).
(5)The central finite difference formulae
y
0(x
i) = y(x
i+1) − y(x
i−1)
2h − h
26 y
(3)(η
i),
(6)for some
η
i in the interval(x
i−1, x
i+1)
,and
y
00(x
i) = y(x
i+1) − 2y(x
i) + y(x
i−1)
h
2− h
212 y
(4)(ξ
i),
(7)for some
ξ
i in the interval(x
i−1, x
i+1)
, can be derived from Taylor’s theorem by expandingy
aboutx
i.Let
u
i denote the approximate value ofy
i= y(x
i)
. Ify ∈ C
4[a, b]
, then a finite difference method with truncation error of orderO(h
2)
can be obtained by using the approximations Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
16At the interior mesh points,
x
i, fori = 1, 2, . . . , n − 1
, the differential equation to be approximated satisfiesy
00(x
i) = p(x
i)y
0(x
i) + q(x
i)y(x
i) + r(x
i).
(5)The central finite difference formulae
y
0(x
i) = y(x
i+1) − y(x
i−1)
2h − h
26 y
(3)(η
i),
(6)for some
η
i in the interval(x
i−1, x
i+1)
, andy
00(x
i) = y(x
i+1) − 2y(x
i) + y(x
i−1)
h
2− h
212 y
(4)(ξ
i),
(7)for some
ξ
i in the interval(x
i−1, x
i+1)
, can be derived from Taylor’s theorem by expandingy
aboutx
i.Let
u
i denote the approximate value ofy
i= y(x
i)
. Ify ∈ C
4[a, b]
, then a finite difference method with truncation error of orderO(h
2)
can be obtained by using the approximations Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
16At the interior mesh points,
x
i, fori = 1, 2, . . . , n − 1
, the differential equation to be approximated satisfiesy
00(x
i) = p(x
i)y
0(x
i) + q(x
i)y(x
i) + r(x
i).
(5)The central finite difference formulae
y
0(x
i) = y(x
i+1) − y(x
i−1)
2h − h
26 y
(3)(η
i),
(6)for some
η
i in the interval(x
i−1, x
i+1)
, andy
00(x
i) = y(x
i+1) − 2y(x
i) + y(x
i−1)
h
2− h
212 y
(4)(ξ
i),
(7)for some
ξ
i in the interval(x
i−1, x
i+1)
, can be derived from Taylor’s theorem by expandingy
aboutx
i.Let
u
i denote the approximate value ofy
i= y(x
i)
.If
y ∈ C
4[a, b]
, then a finite difference method with truncation error of orderO(h
2)
can be obtained by using the approximations Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003BVP of ODE
16At the interior mesh points,
x
i, fori = 1, 2, . . . , n − 1
, the differential equation to be approximated satisfiesy
00(x
i) = p(x
i)y
0(x
i) + q(x
i)y(x
i) + r(x
i).
(5)The central finite difference formulae
y
0(x
i) = y(x
i+1) − y(x
i−1)
2h − h
26 y
(3)(η
i),
(6)for some
η
i in the interval(x
i−1, x
i+1)
, andy
00(x
i) = y(x
i+1) − 2y(x
i) + y(x
i−1)
h
2− h
212 y
(4)(ξ
i),
(7)for some
ξ
i in the interval(x
i−1, x
i+1)
, can be derived from Taylor’s theorem by expandingy
aboutx
i.Let
u
i denote the approximate value ofy
i= y(x
i)
. Ify ∈ C
4[a, b]
, then a finite difference method with truncation error of orderO(h
2)
can be obtained by using the approximationsDepartment of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
17y
0(x
i) ≈ u
i+1− u
i−12h
andy
00(x
i) ≈ u
i+1− 2u
i+ u
i−1h
2for
y
0(x
i)
andy
00(x
i)
, respectively.Furthermore, let
p
i= p(x
i), q
i= q(x
i), r
i= r(x
i).
The discrete version of equation (4) is then
u
i+1− 2u
i+ u
i−1h
2= p
iu
i+1− u
i−12h + q
iu
i+ r
i, i = 1, 2, . . . , n − 1,
(8)together with boundary conditions
u
0= α
andu
n= β
. Equation (8) can be written in theform
1 + h 2 p
iu
i−1− 2 + h
2q
iu
i+
1 − h 2 p
iu
i+1= h
2r
i,
(9)for
i = 1, 2, . . . , n − 1
. In (8),u
1, u
2, . . . , u
n−1 are the unknown, and there aren − 1
linear equations to be solved. The resulting system of linear equations can be expressed in the matrix form
Au = f,
(10)Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
17y
0(x
i) ≈ u
i+1− u
i−12h
andy
00(x
i) ≈ u
i+1− 2u
i+ u
i−1h
2for
y
0(x
i)
andy
00(x
i)
, respectively. Furthermore, letp
i= p(x
i), q
i= q(x
i), r
i= r(x
i).
The discrete version of equation (4) is then
u
i+1− 2u
i+ u
i−1h
2= p
iu
i+1− u
i−12h + q
iu
i+ r
i, i = 1, 2, . . . , n − 1,
(8)together with boundary conditions
u
0= α
andu
n= β
. Equation (8) can be written in theform
1 + h 2 p
iu
i−1− 2 + h
2q
iu
i+
1 − h 2 p
iu
i+1= h
2r
i,
(9)for
i = 1, 2, . . . , n − 1
. In (8),u
1, u
2, . . . , u
n−1 are the unknown, and there aren − 1
linear equations to be solved. The resulting system of linear equations can be expressed in the matrix form
Au = f,
(10)Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
17y
0(x
i) ≈ u
i+1− u
i−12h
andy
00(x
i) ≈ u
i+1− 2u
i+ u
i−1h
2for
y
0(x
i)
andy
00(x
i)
, respectively. Furthermore, letp
i= p(x
i), q
i= q(x
i), r
i= r(x
i).
The discrete version of equation (4) is then
u
i+1− 2u
i+ u
i−1h
2= p
iu
i+1− u
i−12h + q
iu
i+ r
i, i = 1, 2, . . . , n − 1,
(8)together with boundary conditions
u
0= α
andu
n= β
.Equation (8) can be written in the
form
1 + h 2 p
iu
i−1− 2 + h
2q
iu
i+
1 − h 2 p
iu
i+1= h
2r
i,
(9)for
i = 1, 2, . . . , n − 1
. In (8),u
1, u
2, . . . , u
n−1 are the unknown, and there aren − 1
linear equations to be solved. The resulting system of linear equations can be expressed in the matrix form
Au = f,
(10)Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
17y
0(x
i) ≈ u
i+1− u
i−12h
andy
00(x
i) ≈ u
i+1− 2u
i+ u
i−1h
2for
y
0(x
i)
andy
00(x
i)
, respectively. Furthermore, letp
i= p(x
i), q
i= q(x
i), r
i= r(x
i).
The discrete version of equation (4) is then
u
i+1− 2u
i+ u
i−1h
2= p
iu
i+1− u
i−12h + q
iu
i+ r
i, i = 1, 2, . . . , n − 1,
(8)together with boundary conditions
u
0= α
andu
n= β
. Equation (8) can be written in theform
1 + h 2 p
iu
i−1− 2 + h
2q
iu
i+
1 − h 2 p
iu
i+1= h
2r
i,
(9)for
i = 1, 2, . . . , n − 1
.In (8),
u
1, u
2, . . . , u
n−1 are the unknown, and there aren − 1
linear equations to be solved. The resulting system of linear equations can be expressed in the matrix form
Au = f,
(10)Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
17y
0(x
i) ≈ u
i+1− u
i−12h
andy
00(x
i) ≈ u
i+1− 2u
i+ u
i−1h
2for
y
0(x
i)
andy
00(x
i)
, respectively. Furthermore, letp
i= p(x
i), q
i= q(x
i), r
i= r(x
i).
The discrete version of equation (4) is then
u
i+1− 2u
i+ u
i−1h
2= p
iu
i+1− u
i−12h + q
iu
i+ r
i, i = 1, 2, . . . , n − 1,
(8)together with boundary conditions
u
0= α
andu
n= β
. Equation (8) can be written in theform
1 + h 2 p
iu
i−1− 2 + h
2q
iu
i+
1 − h 2 p
iu
i+1= h
2r
i,
(9)for
i = 1, 2, . . . , n − 1
. In (8),u
1, u
2, . . . , u
n−1 are the unknown, and there aren − 1
linear equations to be solved.
The resulting system of linear equations can be expressed in the matrix form
Au = f,
(10)Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
17y
0(x
i) ≈ u
i+1− u
i−12h
andy
00(x
i) ≈ u
i+1− 2u
i+ u
i−1h
2for
y
0(x
i)
andy
00(x
i)
, respectively. Furthermore, letp
i= p(x
i), q
i= q(x
i), r
i= r(x
i).
The discrete version of equation (4) is then
u
i+1− 2u
i+ u
i−1h
2= p
iu
i+1− u
i−12h + q
iu
i+ r
i, i = 1, 2, . . . , n − 1,
(8)together with boundary conditions
u
0= α
andu
n= β
. Equation (8) can be written in theform
1 + h 2 p
iu
i−1− 2 + h
2q
iu
i+
1 − h 2 p
iu
i+1= h
2r
i,
(9)for
i = 1, 2, . . . , n − 1
. In (8),u
1, u
2, . . . , u
n−1 are the unknown, and there aren − 1
linear equations to be solved. The resulting system of linear equations can be expressed in the matrix form
Au = f,
(10)Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
18where A =
−2 − h2q1 1 −
h 2 p1 1 + h
2p2 −2 − h2q2 1 −
h 2p2
. .. . .. . ..
. .. . .. . ..
1 + h
2pn−2 −2 − h2qn−2 1 −
h
2pn−2 1 + h
2pn−1 −2 − h2qn−1
,
u =
u
1u
2.. .
u
n−2u
n−1
,
andf =
h
2r
1− 1 +
h2p
1α h
2r
2.. .
h
2r
n−2h
2r
n−1− 1 −
h2p
n−1β
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
19Since the matrix
A
is tridiagonal, this system can be solved by a special Gaussian elimination inO(n
2)
flops.Theorem 4 Suppose that
p(x), q(x)
, andr(x)
in (4) are continuous on[a, b]
, andq(x) > 0
on[a, b]
. Then (10) has a unique solution provided thath < 2/L
, whereL = max
a≤x≤b|p(x)|
.2.2 – Convergence Analysis
We shall analyze that when
h
converges to zero, the solutionu
i of the discrete problem (8) converges to the solutiony
i of the original continuous problem (5).y
i satisfies the following system of equationsy
i+1− 2y
i+ y
i−1h
2− h
212 y
(4)(ξ
i) = p
iy
i+1− y
i−12h − h
26 y
(3)(η
i)
+ q
iy
i+ r
i,
(11) for
i = 1, 2, . . . , n − 1
. Subtract (8) from (11) and lete
i= y
i− u
i, the result ise
i+1− 2e
i+ e
i−1h
2= p
ie
i+1− e
i−12h + q
ie
i+ h
2g
i, i = 1, 2, . . . , n − 1,
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
19Since the matrix
A
is tridiagonal, this system can be solved by a special Gaussian elimination inO(n
2)
flops.Theorem 4 Suppose that
p(x), q(x)
, andr(x)
in (4) are continuous on[a, b]
, andq(x) > 0
on[a, b]
. Then (10) has a unique solution provided thath < 2/L
, whereL = max
a≤x≤b|p(x)|
.2.2 – Convergence Analysis
We shall analyze that when
h
converges to zero, the solutionu
i of the discrete problem (8) converges to the solutiony
i of the original continuous problem (5).y
i satisfies the following system of equationsy
i+1− 2y
i+ y
i−1h
2− h
212 y
(4)(ξ
i) = p
iy
i+1− y
i−12h − h
26 y
(3)(η
i)
+ q
iy
i+ r
i,
(11) for
i = 1, 2, . . . , n − 1
. Subtract (8) from (11) and lete
i= y
i− u
i, the result ise
i+1− 2e
i+ e
i−1h
2= p
ie
i+1− e
i−12h + q
ie
i+ h
2g
i, i = 1, 2, . . . , n − 1,
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
19Since the matrix
A
is tridiagonal, this system can be solved by a special Gaussian elimination inO(n
2)
flops.Theorem 4 Suppose that
p(x), q(x)
, andr(x)
in (4) are continuous on[a, b]
, andq(x) > 0
on[a, b]
. Then (10) has a unique solution provided thath < 2/L
, whereL = max
a≤x≤b|p(x)|
.2.2 – Convergence Analysis
We shall analyze that when
h
converges to zero, the solutionu
i of the discrete problem (8) converges to the solutiony
i of the original continuous problem (5).y
i satisfies the following system of equationsy
i+1− 2y
i+ y
i−1h
2− h
212 y
(4)(ξ
i) = p
iy
i+1− y
i−12h − h
26 y
(3)(η
i)
+ q
iy
i+ r
i,
(11) for
i = 1, 2, . . . , n − 1
. Subtract (8) from (11) and lete
i= y
i− u
i, the result ise
i+1− 2e
i+ e
i−1h
2= p
ie
i+1− e
i−12h + q
ie
i+ h
2g
i, i = 1, 2, . . . , n − 1,
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
19Since the matrix
A
is tridiagonal, this system can be solved by a special Gaussian elimination inO(n
2)
flops.Theorem 4 Suppose that
p(x), q(x)
, andr(x)
in (4) are continuous on[a, b]
, andq(x) > 0
on[a, b]
. Then (10) has a unique solution provided thath < 2/L
, whereL = max
a≤x≤b|p(x)|
.2.2 – Convergence Analysis
We shall analyze that when
h
converges to zero, the solutionu
i of the discrete problem (8) converges to the solutiony
i of the original continuous problem (5).y
i satisfies the following system of equationsy
i+1− 2y
i+ y
i−1h
2− h
212 y
(4)(ξ
i) = p
iy
i+1− y
i−12h − h
26 y
(3)(η
i)
+ q
iy
i+ r
i,
(11) for
i = 1, 2, . . . , n − 1
.Subtract (8) from (11) and let
e
i= y
i− u
i, the result ise
i+1− 2e
i+ e
i−1h
2= p
ie
i+1− e
i−12h + q
ie
i+ h
2g
i, i = 1, 2, . . . , n − 1,
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
19Since the matrix
A
is tridiagonal, this system can be solved by a special Gaussian elimination inO(n
2)
flops.Theorem 4 Suppose that
p(x), q(x)
, andr(x)
in (4) are continuous on[a, b]
, andq(x) > 0
on[a, b]
. Then (10) has a unique solution provided thath < 2/L
, whereL = max
a≤x≤b|p(x)|
.2.2 – Convergence Analysis
We shall analyze that when
h
converges to zero, the solutionu
i of the discrete problem (8) converges to the solutiony
i of the original continuous problem (5).y
i satisfies the following system of equationsy
i+1− 2y
i+ y
i−1h
2− h
212 y
(4)(ξ
i) = p
iy
i+1− y
i−12h − h
26 y
(3)(η
i)
+ q
iy
i+ r
i,
(11) for
i = 1, 2, . . . , n − 1
. Subtract (8) from (11) and lete
i= y
i− u
i, the result ise
i+1− 2e
i+ e
i−1h
2= p
ie
i+1− e
i−12h + q
ie
i+ h
2g
i, i = 1, 2, . . . , n − 1,
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
20where
g
i= 1
12 y
(4)(ξ
i) − 1
6 p
iy
(3)(η
i).
After collecting terms and multiplying by
h
2, we have1 + h 2 p
ie
i−1− 2 + h
2q
ie
i+
1 − h 2 p
ie
i+1= h
4g
i, i = 1, 2, . . . , n − 1.
Let
e = [e
1, e
2, . . . , e
n−1]
T and|e
k| = kek
∞. Then2 + h
2q
ke
k=
1 + h 2 p
ke
k−1+
1 − h 2 p
ke
k+1− h
4g
k,
and, hence
2 + h
2q
k|e
k| ≤
1 + h 2 p
k|e
k−1| +
1 − h 2 p
k|e
k+1| + h
4|g
k|
≤
1 + h 2 p
kkek
∞+
1 − h 2 p
kkek
∞+ h
4kgk
∞Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
20where
g
i= 1
12 y
(4)(ξ
i) − 1
6 p
iy
(3)(η
i).
After collecting terms and multiplying by
h
2, we have1 + h 2 p
ie
i−1− 2 + h
2q
ie
i+
1 − h 2 p
ie
i+1= h
4g
i, i = 1, 2, . . . , n − 1.
Let
e = [e
1, e
2, . . . , e
n−1]
T and|e
k| = kek
∞. Then2 + h
2q
ke
k=
1 + h 2 p
ke
k−1+
1 − h 2 p
ke
k+1− h
4g
k,
and, hence
2 + h
2q
k|e
k| ≤
1 + h 2 p
k|e
k−1| +
1 − h 2 p
k|e
k+1| + h
4|g
k|
≤
1 + h 2 p
kkek
∞+
1 − h 2 p
kkek
∞+ h
4kgk
∞Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
20where
g
i= 1
12 y
(4)(ξ
i) − 1
6 p
iy
(3)(η
i).
After collecting terms and multiplying by
h
2, we have1 + h 2 p
ie
i−1− 2 + h
2q
ie
i+
1 − h 2 p
ie
i+1= h
4g
i, i = 1, 2, . . . , n − 1.
Let
e = [e
1, e
2, . . . , e
n−1]
T and|e
k| = kek
∞.Then
2 + h
2q
ke
k=
1 + h 2 p
ke
k−1+
1 − h 2 p
ke
k+1− h
4g
k,
and, hence
2 + h
2q
k|e
k| ≤
1 + h 2 p
k|e
k−1| +
1 − h 2 p
k|e
k+1| + h
4|g
k|
≤
1 + h 2 p
kkek
∞+
1 − h 2 p
kkek
∞+ h
4kgk
∞Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003