BVP of ODE
22BVP of ODE
223 – Shooting Methods
We consider solving the following 2-point boundary-value problem:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(12)The idea of shooting method for (12) is to solve a related initial-value problem with a guess for
y
0(a)
, sayz
.The corresponding IVP
y
00= f (x, y, y
0)
y(a) = α, y
0(a) = z
(13)can then be solved by, for example, Runge-Kutta method. We denote this approximate
solution
y
z and hopey
z(b) = β
. If not, we use another guess fory
0(a)
, and try to solve an altered IVP (13) again. This process is repeated and can be done systematically.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
223 – Shooting Methods
We consider solving the following 2-point boundary-value problem:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(12)The idea of shooting method for (12) is to solve a related initial-value problem with a guess for
y
0(a)
, sayz
. The corresponding IVP
y
00= f (x, y, y
0)
y(a) = α, y
0(a) = z
(13)can then be solved by, for example, Runge-Kutta method.
We denote this approximate
solution
y
z and hopey
z(b) = β
. If not, we use another guess fory
0(a)
, and try to solve an altered IVP (13) again. This process is repeated and can be done systematically.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
223 – Shooting Methods
We consider solving the following 2-point boundary-value problem:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(12)The idea of shooting method for (12) is to solve a related initial-value problem with a guess for
y
0(a)
, sayz
. The corresponding IVP
y
00= f (x, y, y
0)
y(a) = α, y
0(a) = z
(13)can then be solved by, for example, Runge-Kutta method. We denote this approximate solution
y
z and hopey
z(b) = β
.If not, we use another guess for
y
0(a)
, and try to solve an altered IVP (13) again. This process is repeated and can be done systematically.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
223 – Shooting Methods
We consider solving the following 2-point boundary-value problem:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(12)The idea of shooting method for (12) is to solve a related initial-value problem with a guess for
y
0(a)
, sayz
. The corresponding IVP
y
00= f (x, y, y
0)
y(a) = α, y
0(a) = z
(13)can then be solved by, for example, Runge-Kutta method. We denote this approximate
solution
y
z and hopey
z(b) = β
. If not, we use another guess fory
0(a)
, and try to solve an altered IVP (13) again.This process is repeated and can be done systematically. Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
223 – Shooting Methods
We consider solving the following 2-point boundary-value problem:
y
00= f (x, y, y
0)
y(a) = α, y(b) = β
(12)The idea of shooting method for (12) is to solve a related initial-value problem with a guess for
y
0(a)
, sayz
. The corresponding IVP
y
00= f (x, y, y
0)
y(a) = α, y
0(a) = z
(13)can then be solved by, for example, Runge-Kutta method. We denote this approximate
solution
y
z and hopey
z(b) = β
. If not, we use another guess fory
0(a)
, and try to solve an altered IVP (13) again. This process is repeated and can be done systematically.Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
. Hence secant method can be used.☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
. Hence secant method can be used.☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
.Hence secant method can be used.
☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
. Hence secant method can be used.☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
. Hence secant method can be used.☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
. Hence secant method can be used.☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
. Hence secant method can be used.☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
23☞
Objective: selectz
, so thaty
z(b) = β
.Let
φ(z) = y
z(b) − β.
Now our objective is simply to solve the equation
φ(z) = 0
. Hence secant method can be used.☞
How to computez
?Suppose we have solutions
y
z1, y
z2 with guessesz
1, z
2 and obtainφ(z
1)
andφ(z
2)
.If these guesses can not generate satisfactory solutions, we can obtain another guess
z
3 by the secant methodz
3= z
2− φ(z
2) z
2− z
1φ(z
2) − φ(z
1) .
In general
z
k+1= z
k− φ(z
k) z
k− z
k−1φ(z
k) − φ(z
k−1) .
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
24☞
Special BVP:
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y(b) = β
(14)where
u(x), v(x), w(x)
are continuous in[a, b]
.Suppose we have solved (14) twice with initial guesses
z
1 andz
2, and obtain approximate solutionsy
1 andy
2, hence
y
100= u + vy
1+ wy
10y
1(a) = α, y
10(a) = z
1 and
y
200= u + vy
2+ wy
20y
2(a) = α, y
20(a) = z
2Now let
y(x) = λy
1(x) + (1 − λ)y
2(x)
for some parameter
λ
, we can showy
00= u + vy + wy
0Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
24☞
Special BVP:
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y(b) = β
(14)where
u(x), v(x), w(x)
are continuous in[a, b]
.Suppose we have solved (14) twice with initial guesses
z
1 andz
2, and obtain approximate solutionsy
1 andy
2,hence
y
100= u + vy
1+ wy
10y
1(a) = α, y
10(a) = z
1 and
y
200= u + vy
2+ wy
20y
2(a) = α, y
20(a) = z
2Now let
y(x) = λy
1(x) + (1 − λ)y
2(x)
for some parameter
λ
, we can showy
00= u + vy + wy
0Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
24☞
Special BVP:
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y(b) = β
(14)where
u(x), v(x), w(x)
are continuous in[a, b]
.Suppose we have solved (14) twice with initial guesses
z
1 andz
2, and obtain approximate solutionsy
1 andy
2, hence
y
100= u + vy
1+ wy
10y
1(a) = α, y
10(a) = z
1 and
y
200= u + vy
2+ wy
20y
2(a) = α, y
20(a) = z
2Now let
y(x) = λy
1(x) + (1 − λ)y
2(x)
for some parameter
λ
, we can showy
00= u + vy + wy
0Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
24☞
Special BVP:
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y(b) = β
(14)where
u(x), v(x), w(x)
are continuous in[a, b]
.Suppose we have solved (14) twice with initial guesses
z
1 andz
2, and obtain approximate solutionsy
1 andy
2, hence
y
100= u + vy
1+ wy
10y
1(a) = α, y
10(a) = z
1 and
y
200= u + vy
2+ wy
20y
2(a) = α, y
20(a) = z
2Now let
y(x) = λy
1(x) + (1 − λ)y
2(x)
for some parameter
λ
,we can show
y
00= u + vy + wy
0Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
24☞
Special BVP:
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y(b) = β
(14)where
u(x), v(x), w(x)
are continuous in[a, b]
.Suppose we have solved (14) twice with initial guesses
z
1 andz
2, and obtain approximate solutionsy
1 andy
2, hence
y
100= u + vy
1+ wy
10y
1(a) = α, y
10(a) = z
1 and
y
200= u + vy
2+ wy
20y
2(a) = α, y
20(a) = z
2Now let
y(x) = λy
1(x) + (1 − λ)y
2(x)
for some parameter
λ
, we can showy
00= u + vy + wy
0Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
25and
y(a) = λy
1(a) + (1 − λ)y
2(a) = α
We can select
λ
so thaty(b) = β
.β = y(b) = λy
1(b) + (1 − λ)y
2(b)
= λ(y
1(b) − y
2(b)) + y
2(b)
⇒ λ = β − y
2(b) (y
1(b) − y
2(b))
In practice, we can solve the following two IVPs (in parallel)
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 0
and
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 1
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
25and
y(a) = λy
1(a) + (1 − λ)y
2(a) = α
We can select
λ
so thaty(b) = β
.β = y(b) = λy
1(b) + (1 − λ)y
2(b)
= λ(y
1(b) − y
2(b)) + y
2(b)
⇒ λ = β − y
2(b) (y
1(b) − y
2(b))
In practice, we can solve the following two IVPs (in parallel)
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 0
and
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 1
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
25and
y(a) = λy
1(a) + (1 − λ)y
2(a) = α
We can select
λ
so thaty(b) = β
.β = y(b) = λy
1(b) + (1 − λ)y
2(b)
= λ(y
1(b) − y
2(b)) + y
2(b)
⇒ λ = β − y
2(b) (y
1(b) − y
2(b))
In practice, we can solve the following two IVPs (in parallel)
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 0
and
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 1
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
25and
y(a) = λy
1(a) + (1 − λ)y
2(a) = α
We can select
λ
so thaty(b) = β
.β = y(b) = λy
1(b) + (1 − λ)y
2(b)
= λ(y
1(b) − y
2(b)) + y
2(b)
⇒ λ = β − y
2(b) (y
1(b) − y
2(b))
In practice, we can solve the following two IVPs (in parallel)
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 0
and
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 1
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003
BVP of ODE
25and
y(a) = λy
1(a) + (1 − λ)y
2(a) = α
We can select
λ
so thaty(b) = β
.β = y(b) = λy
1(b) + (1 − λ)y
2(b)
= λ(y
1(b) − y
2(b)) + y
2(b)
⇒ λ = β − y
2(b) (y
1(b) − y
2(b))
In practice, we can solve the following two IVPs (in parallel)
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 0
and
y
00= u(x) + v(x)y + w(x)y
0y(a) = α, y
0(a) = 1
Department of Mathematics – NTNU Tsung-Min Hwang December 20, 2003