Professional Documents
Culture Documents
Ode 7
Ode 7
7.1 Introduction
We'd like to extend the initial-value or shooting procedures to vector systems of m rst-
order ODEs. However, before studying nonlinear problems, let's focus on the linear
system
y = Ay + b
0
(7.1.1a)
Ly(a) = l (7.1.1b)
Ry(b) = r (7.1.1c)
v = Av + b
0
v(a) = (7.1.2b)
1
for some convenient choice of the vector (e.g., = 0). The m m matrix Y(x) is a
set of fundamental solutions satisfying
Y = AY
0
Y(a) = I (7.1.2c)
where I is the m m identity matrix. The constant vector c is determined by satisfying
the initial and terminal conditions (7.1.1b,c) give
Ly(a) = Qc + Lv(a) = l : (7.1.3a)
Ry(b) Rv(b) r
The solution exists since
Q = RY LY(a) = L (7.1.3b)
(b) RY(b)
has full rank m for a well-posed problem. Once c has been determined, the solution of
the BVP is determined by (7.1.2a). The procedure requires the solution of the m + 1
vector IVPs (7.1.2b,c).
Although this technique seems straight forward, we recall that the stability of BVPs
is quite dierent from that for IVPs. An IVP for (7.1.1a) is stable when the eigenvalues
of A have non-positive real parts. This is generally not the case for BVPs where the
eigenvalues of A for stable problems can have positive and negative real parts. Let's
explore a simple example.
Example 7.1.1 (1], Section 4.2). Consider the second-order linear BVP
y ; R2 y = 1
00
y(0) = y(1) = 0
and write this as a rst-order system by letting
y2 = yR :
0
y1 = y
This leads to the symmetric system
y = R0 R0 y + 1=R
0
0
Thus,
v(x) = ;10=R :
2
Diculties arise when R 1. In this case, the solution y1(x) is asymptotically given
by
y1 R12 e ;Rx + e R(1 x) ; 1]:
; ;
3
Thus, it is approximately ;1=R2 away from the boundaries at x = 0 and 1 with narrow
boundary layers near both ends.
When Rx is large, we would not be able to distinguish between sinh Rx and cosh Rx
and, instead of the exact result, we would compute
y(x) 12 eeRx eeRx c + ;10=R
Rx Rx 2
x > 0:
The matrix Y(x) would be singular in this case. With small discernable dierences
between sinh Rx and cosh Rx, Y would be ill-conditioned. Assuming this to be so, let's
write the solution as
Rx (1 + ) eRx (1 ; )
y(x) 12 eeRx (1 c + ;1=R2 x>0
; ) eRx (1 + ) 0
where 1. (If = e ; 2R
then the above relation is exact at x = 1.) We would then
determine c as
c R12 ;11
and the solution as
y(x) e
Rx 1
2R ;1
2
x > 0:
With R large, there is the possibility of having catastrophic growth in the solution even
when is small. In order to demonstrate this, we solved this problem using the MATLAB
Runge-Kutta procedure ode45. While an explicit Runge-Kutta code is not the most
ecient solution procedure for this problem, eciency was not our main concern. The
maximum errors in the solution component y1 with R = 1 10 are reported in Table 7.1.1.
The error has grown by six decades for a ten-fold increase in R. Indeed, the procedure
failed to nd a solution of the BVP with R = 100.
R ke1k =ky1k 1 1
1 2:445 10 8 ;
10 2:940 10 2 ;
Let's pursue this diculty with a bit more formality. The exact solution of the linear
4
BVP (7.1.1) can be written as (Problem 1)
y(x) = Y(x)Q 1 l + Z b G(x )b( )d (7.1.4a)
r
;
G(x ) = > 0
: (7.1.4b)
: ;Y(x)Q
R Y(b)Y ( ) if > x
> 1 1 ; ;
The Green's function behaves like the inverse of the dierential operator. We may
use it to dene the stability of BVP.
Denition 7.1.1. The BVP (7.1.1) is stable if there exists a constant such that
Z b
ky()k jlj + jrj +
1 1 1 jb( )j d ]
1 (7.1.5a)
a
where
ky()k = amax
1
x b
jy(x)j
1 jbj = 1max
1 jb j:
i m i
(7.1.5b)
assuming that all quantities are bounded. Thus, the solution of a stable BVP is bounded
by its data. Following the techniques used for IVPs, we may show that this also applies
to a perturbation of the data associated with the BVP (7.1.1) (2], Chapter 6) hence,
the reason for the name stability.
Denition 7.1.2. The BVP (7.1.1) has exponential dichotomy if there are positive con-
stants K , , and such that
kG( )k K ee(x
( ; x) if x : (7.1.6)
1 ; ) if > x
The BVP has dichotomy if (7.1.6) holds with = = 0.
5
Remark 1. The notions of dichotomy and exponential dichotomy correspond to sta-
bility and asymptotic stability, respectively, for an IVP
It is relatively easy to show that the stability constant for Example 7.1.1 has a modest
size and that this problem has exponential dichotomy (Problem 2). The problem, once
again, is that the IVP is unstable and this renders Q ill conditioned.
There is a alternative shooting procedure for linear systems that is slightly more
ecient than (7.1.2 - 7.1.3) when m is large. We'll present it, although it will not solve
our diculties.
1. Obtain a particular solution v that satises
v = Av + b
0
Lv(a) = l: (7.1.7)
We'll have to describe a means of computing v(a) so that it satises the initial
condition (7.1.1b), but let's postpone this.
2. Obtain linearly-independent solutions u(1) u(2) : : : u(r), to the IVPs
(u(i) ) = Au(i)
0
Lu(i) (a) = 0 i = 1 2 : : : r: (7.1.8)
condition (7.1.1b) can be found. With this, we observe that the work of solving
this system is about half that of the previous procedure (7.1.2c) when the number
of terminal conditions r is approximately m=2.
3. Write the general solution of the linear BVP (7.1.1) as
where
6
4. By construction, this representation satises the ODE (7.1.1a) and the initial con-
ditions (7.1.1b). It remains to satisfy the terminal conditions (7.1.1c) and this can
be done by determining c so that
Ry(b) = RU(b)c + v(b)] = r
or
RU(b)c = r ; Rv(b): (7.1.10)
As noted, the main savings of this procedure relative to (7.1.2-7.1.3) is the reduced
number of ODEs that have to be solved. This is oset by (possible) diculties associated
with selecting a basis U, v to satisfy the initial conditions (7.1.1b).
Example 7.1.2. Conte 5] constructed the constant-coecient fourth-order BVP
y(0) = y (0) = 1
0
y(1) = 23 + sinh 1 y (1) = 1 + cosh 1:
0
to try to explain diculties that researchers were having when solving certain ow-
instability problems. We'll rewrite the problem as the rst-order system
2 3 2 3 2 3
0 1 0 0 y1 0
A = 64 00 00 10 01 75 y = 64 yy23 75 0
6 7 6 7 6 7
b = 64 0
7:
5
;R 0 1 + R 0 y4 ;1 + Rx =2
2
L = R = 10 01 00 00 l = 11 r = 12 ++ cosh
sinh 1 :
3
1
Let's go through the steps in solving this problem by the shooting procedure that we
just described. We note that
v(0) = 1 1 0 0]T
satises the initial conditions and, thus, the particular-solution problem (7.1.7) has been
specied. Similarly, 2 3 2 3
0 0
6 0 7
u(1) = 64 1 75 u(2) = 64 00 75 :
6 7
0 1
7
satisfy trivial versions of the initial conditions hence, the homogeneous problems (7.1.9)
are specied.
Conte 5] solved the IVPs (7.1.7, 7.1.9) using a xed-step Runge-Kutta method. (It
was done in the 1960s.) His results for the error ke1 k in the rst component y1(x) of
1
the solution are reported in Table 7.1.2 for R = 400 3600. The exact solution of this
problem is
y1(x) = 1 + x2 + sinh x:
2
R jje1jj 1
400 0.00173
3600 4000
Table 7.1.2: Maximum errors of Example 7.1.2 using Conte's 5] linear shooting proce-
dure.
The diculties with this problem are similar to those of Example 7.1.1. The funda-
mental solutions of the ODE are
p p
sinh x cosh x sinh Rx cosh Rx:
p
Although the exact solution doesn't depend on the rapidly growing components (sinh Rx
p
and cosh Rx), the IVPs (7.1.7) and (7.1.9) do. Thus, the matrix RU(b) appearing in
(7.1.10) will be ill-conditioned when the parameter R is large. The two components of
p p
the fundamental solution sinh Rx and cosh Rx are numerically linearly dependent for
p
large values of Rx. Although the exact solution of the BVP is independent of these
rapidly growing components, small round o errors introduce them and they eventually
dominate the exact solution.
Problems
1. Show that the solution representation (7.1.4 satises the linear BVP (7.1.1).
2. Find the Green's function for the BVP of Example 7.1.1. Find the stability con-
stant. Show that this problem is stable and has exponential dichotomy.
8
y
Yj (x)
x
a=x 0
x1 x j-1 xj xN
Ly(a) = l (7.2.1b)
Ry(b) = r (7.2.1c)
with L of dimension l m and R of dimension r m. Let us further divide a b] into
N subintervals as shown in Figure 7.2.1. Multiple shooting procedures that are based on
the strategies (7.1.2 - 7.1.3) and (7.1.7 - 7.1.10) have been developed. The rst approach
is the simpler of the two, so let's begin there.
1. On each subinterval (xj ; 1 xj ], j = 1 2 : : : N , solve the IVPs
vj = Avj + b
0
vj (a) = 0 (7.2.2a)
9
Yj = AYj
0
Yj (a) = I xj 1 < x xj
; j = 1 2 ::: N (7.2.2b)
where j, j = 1 2 : : : N , are chosen and I is the m m identity matrix.
2. As with simple shooting, consider the solution of the BVP in the form (7.1.2a),
which now becomes
y(x) = Yj (x)cj + vj (x) xj 1 < x xj
; j = 1 2 : : : N: (7.2.3)
The solution must be continuous at the interior shooting points xj , j = 1 2 : : : N ;
1 thus, with the initial conditions specied by (7.2.2)
Yj (xj )cj + vj (xj ) = cj+1 j = 1 2 : : : N ; 1:
The boundary conditions (7.2.1b,c) must also be satised and, with (7.2.3) and
(7.2.2), this implies
Ly(a) = LY1c1 + Lv(a) = Lc1 = l Ry(b) = RYN (b)cN + RvN (b) = r:
Writing this system in matrix form
Ac = g (7.2.4a)
where
2 3
L
6 ;Y1 (x1 ) I 7
6 7
6 ;Y2(x2 ) I 7
A = 666 ... ...
7
7
7
(7.2.4b)
6 7
4 ;YN 1(xN 1 ) I 5
RYN (b)
; ;
2 3
2
c1
3 l
6 c2 7
6
6 v1(x1 ) 7
7
c = 664 ...
7
7
6
g = 66 ... 7
7: (7.2.4c)
5 7
4 vN 1 (xN 1 ) 5
cN r ; RvN (b)
; ;
We will encounter algebraic systems like this in this and the following chapters.
We'll describe procedures for solving them in Chapter 8 that only require O(N )
operations.
10
3. Once c has been determined, the BVP solution may be reconstructed from (7.2.3).
Remark 1. All of the IVPs (7.2.2) can be solved in parallel on a computer with N
processors. This is why multiple shooting is also called parallel shooting.
Conte 5] described a method for stabilizing the procedure (7.1.7 - 7.1.10) which was
later automated and improved by Scott and Watts 11]. The technique is less parallel
than the one that we just described, but it does oer some advantages. To begin, we
calculate solutions of the IVPs
U1 = AU1
0
x0 < x < x1 LU1 (a) = 0
v1 = Av1 + b
0
x0 < x x1 Lv1(a) = l
and write the solution of the BVP as
y(x) = U1(x)c1 + v1 (x) x0 < x < x1 :
As in Section 7.1,
U1 = u(1)
1 u(2)
1 : : : u(1r) ]:
The integration proceeds to a point x1 where, due to the accumulation of round o errors,
the columns of U1 no longer form a good linearly independent basis for the solution. The
point x1 is determined as part of the solution process but, for the present, let's assume
that it is known.
New initial conditions U2(x1 ) are determined by orthogonalizing the columns of
U1 (x1). We'll subsequently show that this is equivalent to nding an upper triangu-
lar matrix P1 such that
U2(x1 )P1 = U1 (x1):
We also select new initial conditions v2 (x1) for the particular solution that are in the
orthogonal complement of U2 (x1 ). Again, we'll postpone the details and note that this
is equivalent to determining a vector w1 such that
v2 (x1 ) = v1(x1 ) ; U2(x1 )w1 :
The time integration can now continue by solving
U2 = AU2
0
x1 < x < x2
11
v2 = Av2 + b
0
x1 < x < x2 :
The quantities U2 (x1 ) and v2(x1 ) are used as initial conditions. The process continues
to x2 where the columns of U2 (x2 ) fail to satisfy a linear independence test.
The general procedure is summarized as follows.
1. Determine U1 (a) and v1 (a) as solutions of
LU1(a) = 0 (7.2.5a)
Lv1(a) = l: (7.2.5b)
vj = Avj + b
0
xj 1 < x < xj :
; (7.2.6b)
Let the solution of the BVP have the form
y(x) = Uj (x)cj + vj (x) xj 1 < x < xj :
; (7.2.6c)
4. Repeat the previous two steps until reaching the terminal point xN = b. The BVP
solution at b is
y(b) = UN (b)cN + vN (b):
5. Using the terminal condition
Ry(b) = RUN (b)cN + RvN (b) = r
determine cN as the solution of
RUN (b)cN = RvN (b) ; r (7.2.8)
12
6. Once cN has been determined, the remaining cj , j = 1 2 : : : N ; 1, are determined
by enforcing solution continuity at the orthogonalization points, i.e.,
Uj (xj )cj + vj (xj ) = Uj+1(xj )cj+1 + vj+1(xj ):
This relation can be simplied by the use of (7.2.7) to
Uj+1(xj )Pj cj + vj (xj ) = Uj+1(xj )cj+1 + vj (xj ) + Uj+1(xj )wj
or
Uj+1(xj )Pj cj ; cj+1 ; wj ] = 0:
Since Pj is non-singular, we may take the solution of this system as
Pj cj = cj+1 + wj j = N ; 1 N ; 2 : : : 1: (7.2.9)
where T is n n.
The procedure can be done in many ways, but we'll focus on the use of plane re
ections
or Householder transformations
H(!) = I ; 2 !!
T
!T ! : (7.2.17)
HT H = H2 = (I ; 2 !!!T ! )(I ; 2 !!
T T
!T ! )
or
HT H = I ; 4 !!!T ! + 4 !!
T T !!T
(!T !)2 = I:
4. H(!)v = v, if and only if vT ! = 0.
5. H(!)! = ;!.
H(!)(v + !) = v ; !:
Thus, the Householder transformation reects ! + v in a plane through the origin
perpendicular to !.
16
In order to perform the QR reduction (7.2.16), let a1 be the rst column of A and
choose
! = a1 1e1
where e1 is the rst column of the identity matrix and
q
1 = aT1 a1 :
Letting H(1) = H(!), we have
2 3
1
6 0 7
H(1) A = 664 .. 7
7=
1 (v(1) )T = A(1) :
. ... 5 0 A(1)
0
The same process is repeated on the (m ; 1) (n ; 1) portion of A. Thus, if a(1)
1 is
where e(1)
1 is the rst column of the (m ; 1) (m ; 1) identity matrix. The transformation
H (2) is
1
H = 0 H(!(1) )
(2) 0
and the result after an application of H(2) is
2 3
0 6 7
6 7
H A
(2) (1) 0 0 = 666 7
7:
... 4 ... 7
5
0 0
After p = min(m ; 1 n) steps, we have
H H (p) (p;1)
: : : H A = T0
(1)
thus,
Q = H(p)H(p 1) : : : H(1)
;
and
I 0
H = 0 H(!(k 1) )
(k)
;
17
where the identity matrix is (k ; 1) (k ; 1).
At each stage of the procedure, the sign of k is chosen so that cancellation is avoided.
Thus, if a11 0 choose the positive sign for 1 , and if a11 < 0 choose the negative
sign. The reduction can be done eciently in about 2n2(m ; n=3) multiplications plus
additions and approximately n square roots. Techniques to save storage and avoid explicit
multiplication to determine Q are described by Demmel 6].
Substituting these results into (7.3.1) and neglecting the O(y2) terms
y + y = f (x y )y + f (x y )
0 0
y
or
y = f (x y )y + f (x y ) ; y :
0
y
0
L y(a) = l (7.3.4a)
with
Ry(b) = r (7.3.5a)
with
The linearized system (7.3.3 - 7.3.5) may be solved by iteration using the procedures
of Section 7.2 thus,
1. Beginning with an initial guess y(0) (x), 0 x 1,
2. Solve the linear system
19
20
Bibliography
3] G. Birkho and G.-C. Rota. Ordinary Dierential Equations. John Wiley and Sons,
New York, third edition, 1978.
4] W.E. Boyce and R.C. DiPrima. Elementary Dierential Equations and Boundary
Value Problems. John Wiley and Sons, New York, third edition, 1977.
5] S.D. Conte. The numerical solution of linear boundary value problems. SIAM
Review, 8:309{321, 1975.
8] J.E. Flaherty and W. Mathon. Collocation with polynomial and tension splines
for singularly perturbed boundary value problems. SIAM J. Sci. Stat. Comput,
1:260{289, 1980.
9] G. Golub. Numerical methods for solving linear least squares problems. Numer.
Math., 7:206{216, 1965.
21
10] H.B. Keller. Accurate dierence methods for nonlinear two-point boundary value
problems. SIAM J. Numer. Anal., 11:305{320, 1974.
11] M.R. Scott and H.A. Watts. Computational solution of linear two point boundary
value problems via orthonormalization. SIAM J. Numer. Anal., 14:40{70, 1977.
12] J.M. Varah. Alternate row and column elimination for solving certain linear systems.
SIAM J. Numer. Anal., 13:71{75, 1976.
22