Vous êtes sur la page 1sur 21

Numer. Math.

27, 449--469 (1977) by Springer-Verlag 1977

Comparing Routines for the Numerical Solution of Initial Value Problems of Ordinary Differential Equations in Multiple Shooting
H.-J. Diekhoff, P. Lory, H. J. Oberle, H.-J. Pesch, P. Rentrop, and R. Seydel Received July 26, 1976
Summary. The numerical solution of two-point boundary value problems and problems of optimal control by shooting techniques requires integration routines. By solving 15 real-life problems four well-known integrators are compared relative to reliability, fastness and precision. Hints are given, which routines could be used for a problem.

1. Introduction In recent years a series of refined numerical methods has been developed for the solution of initial value problems in ordinary differential equations. The large number of published integration routines necessitates a comparison of all these methods. Enright et al. It61, Hull I23], and Davenport et al. L10] have tested and compared integration routines by solving carefully selected initial value problems. In applications many nonlinear two-point boundary value problems and problems of optimal control arise. Convenient methods for the numerical solution of these problems are shooting algorithms. Since these require a repeated computation of initial value problems, integration routines also play an important role. In this paper the authors have tested the suitability and the behaviour of certain integrators for a multiple shooting method. They are mainly interested in a comparison of integration routines, which help a user select a method for a particular problem. Secondly several boundary value problems and optimal con trol problems are proposed and treated, which are realistic and representative of real-life applications. This may stimulate further comparisons of algorithms for solving boundary value problems. In order to compare the integrators, 15 two-point boundary value problems are solved, which arise in different application areas: mathematics, physics, engineering, space science and economics. This report is concerned only with non-stiff problems. All the selected examples are solved by means of a multiple shooting technique described, for example, in Stoer and Bulirsch [40]. In this algorithm a modification of Newton's method due to Deuflhard [lt ] is used. It may be recalled that in multiple shooting, sequences of initial value problems must be solved with iteratively determined initial values (for realistic prob-

450

H.-J. Diekhoff et al.

lems about t00 initial value problems in every iteration involving numerical differentiation). Because of the artificial character of these initial values the integration routines have to overcome harder difficulties than in the solution of natural initial value problems. In addition, the singularities of the solutions of nonlinear ordinary differential equations depend on the initial values (movable singularities). That is why the integration routines must be reliable, fast and

precise.
2. Integration Routines

The results of the investigations of 20 routines in [16] suggested the following four integrators: DIFSYt: Bulirsch-Gragg-Stoer extrapolation method. This is an extrapolation algorithm based on the midpoint rule with Gragg stabilization [211. It was first published by Bulirsch and Stoer [61. In Hussels [24] an improved stepsize control was implemented. VOAS: Adams-Sedgwick method of variable order and variable step. This is an implementation of a variable order variable step Adam's method developed by Sedgwick [391. R K F 7 : Runge-Kutta-Fehlberg method of seventh order, R K F 4 : Runge-Kutta-Fehlberg method of fourth order. These are Runge-Kutta methods with built-in estimators for the local error, see [i6]. They are based on the formulas of orders seven and four, respectively, developed by Fehlberg [t8, t9] and England [t7].
3. Multiple Shooting Method

A detailed description of the multiple shooting method for the solution of a two-point boundary value problem

y'=/(t,y);

y : [a, b]-+lR N,

/: [a, b] IRN-+]RN,

(2.t.a) (2.t.b)

r(y(a), y(b))=O;

r: IRN

~IR N

m a y be found e.g. in [40] and [7]. Here the interval [a, bJ is suitably subdivided

a=tl < t ~ ...t~_l <tM---b

(M nodes).

Denoting y (t; ti, sj), /'-----l. . . . . M--1 the solution of the initial value problem

y'=/(t,y);

y(tj)=s#

t~ [ti, tj+l]

the N-vectors s i have to be determined so, that the following N(M--t) conditions hold: continuity conditions (for M > 2) ~(si, s/+l) :=y(ti+l; ti, si)--si+l=O i=l ..... M--2 (2.2.a)

Numerical Solution of Problems of Ordinary Differential Equations boundary conditions


FM_ 1 (Sl, sltl_l) : = r (Sx,y (tu; tM- 1'
S31-- 1)) = 0,

45t

(2.2.b)

The conditions (2.2) define a system of N ( M - - t )

nonlinear equations

F(s) : =

FM-2(s~t-z, s,u-1) F31-1 (S1, SM-.1)

=0

with s : =
S lr_,

(23)

This system is solved numerically by the modified Newton-method:


s~+l=sk+2kAs k A s k = -- D F (s ~)-lF(s k)

0<2~<:t,

(2.4.a) (2.4.b)

(DF(s) denotes the Jacobian matrix).

A good strategy for choosing the ~k has been developed by Deuflhard [t 2]. Starting the process (2.4) the following initial data must be available

sj- ts~
With the following abbreviations
Gj : -OY(ti+l;ti'si) 0 sj 6r

o_

i=t

.....

M--t.

]'=1 . . . . . M - - l , Or

A : - - Oy(a)

B : = 0yib)

(2.4.b) can be written in more detail (the k-index is omitted) :

ii
with

a~

--I

o
A h=E-1 o),

c~_~ BOM_, L~sM-,J

0/1 1 L
A.s~ F2

l s -'l

(2.4.b')

/~-1

The A sj allow a recursive determination by (2.5.a)


1 ]'~2 ..... M--t

As/=Gi_IAsj_I+F/_

(2.5.b) (2.6.a) (2.6.b)

E :-----A+ B G M _ x G M - z . . . GI

iteration matrix,
... G2F1).

oJ : = -- ( F z ~ _ I + B G M - 1 F M - ~ + "'" + B G u _ ,

A, B and the Gj- are computed by numerical differentiation. This requires the calculation of N trajectories. The use of Broyden's approximation formulas [3] reduces computing time up to 30%. It is apparent that the choice of a reliable, /ast and precise integration routine plays an important role in multiple shooting.

452

H.-J. Diekhoff et al.

Remark. The piecewise constructed function y(t):=y(t;tj, si) for tEEtj, ti+l) 1"----t...... M - - t is called a traiectory. In particular for s i--s o y (t) is the starting trajectory.
4. Numerical Examples

To compare the four integration methods, problems were chosen from the areas of mathematics, physics, technical science, economics and space science. These examples include boundary value problems, integral equations, eigenvalue problems and problems of optimal control. The problems range from simple ones of theoretical nature to highly complex ones. All examples were transformed into two-point boundary value problems (examples t-1 t ) or into boundary value problems with switching functions (examples 12-15). They were solved by the standard multiple shooting algorithm BOUNDSOL and its modified version especially trimmed to handle optimal control problems. The experiments were run on the TR440 of the Leibniz-Rechenzentrum der Bayerischen Akademie der Wissenschaften. The computations were performed in FORTRAN single precision with a 38 bit mantissa (examples t - l t ) and in FORTRAN double precision with an 84 bit mantissa (examples t 2-t 5). The statistics of the comparisons include the following parameters: a) Parameters concerning the problem: N: M: NT: TOL: Number of differential equations. Number of nodes for the multiple shooting method. Number of trajectories. Tolerance for the initial value methods.

OVHB: Overhead time for BOUNDSOL, i.e. the difference between the total time and the time spent in solving initial value problems. EPS: Relative tolerance for BOUND SOL (t .10--6 for all examples).

b) Parameters concerning the comparison of the methods: TIME: Total time to solve the problem.

OVHM: Overhead time for METHOD, i.e. the difference between the time solving the initial value problems and the time spent in evaluating the functions.
NFC:

Number of function calls. NFC depends on the number and position of the nodes. A proper choice of the nodes, depending on a special integration routine, can produce a 30% reduction in computing time. An optimal choice for all four routines is not possible because of the different kinds of stepsize control.

Numerical Solution of Problems of Ordinary Differential Equations c) Parameter concerning the final assessment: NCT:

453

E x a c t time of solving an example by one method in per cent of the average time of the four methods. Because of the different length of the problems a final assessment of the methods and their properties is difficult. To overcome this difficulty, " a normed computing t i m e " NCT is introduced. This simply calculated number has the advantage of being independent of the computer used, and of the computing time. For the single examples tile NCT is not important, it is only used for the final comparison in the conclusion (see Chapter 5).

Example 1. A standard test problem (N = 2).


This linear two-point boundary value problem is discussed in [40], p. 205 (see also Pereyra [30] and Daniel and Martin [91): - - y " + 400y = -- 400 cos 2 (~t) -- 2 r# cos (2 ~t) y(0)=y(t)=0. Single shooting technique will fail to solve this problem I40j. Since the solution has one exponentially increasing and one exponentially decreasing component, the following transformation is introduced: Yl =Y Y2= 20y + y ' . Nodes: 0, 0.25, 0.5, 0.75, t. Zero initial data TIME DIFSY1 VOAS RKF7 RKF4 2.5 4.6 3.2 15.2 OVHM 1.t 3.7 t.8 8.7 NFC 390t 2222 4684 22635 NCT 39 72 50 238 M = NT = TOL = OVHB= 5 6 t.lo-- 6 0.3

Example 2. A singular bi]urcation problem (N = 2).

- u " + E(u')31'--~u, u(o)=u(t)=o.


This problem has been studied by Ktipper [27]. It approximates the partial differential equation of the model of a continuous vibrating string considered by Fermi et al. [20]. As discussed in [27], for hE [8, ~21 the problem has a positive solution which is symmetric and bifurcates from the trivial solution at $ = r # . Outside of [8, ~21 the problem has no positive solution. The solution at ; t = 8. is calculated. For this parameter value the problem possesses a numerical singularity at t = 0. For that reason a series approximation in the first subinterval is used.

454

H.-J. Diekhoff et al. Nodes: equidistant Initial d a t a : solution at 2 = 8.5 (obtained by continuation) TIME DIFSY1 VOAS RKF7 RKF4 t.2 2.2 1.6 1.0 OVHM NFC 0.6 t.6 0.9 0.4 2023 t667 2704 4300 NCT
M =t0

80 t47 t07 67

NT = 8 TOL = 1.10-- 6 OVHB=0.5 2 = 8.5-+~. = 8.

Example 8. An example due to Troesch (N---- 3).


The two-point b o u n d a r y value problem is given b y : y " = 2 sinh (2y), y(0)=0, y(t)=1. 2 -->0,

This problem had been discussed b y several authors (e.g. Scott and W a t t s [38],

p. 74/75, where further references are listed). It describes the confinement of a


plasma column by radiation pressure. The exact solution of the problem in terms of Jacobian elliptic functions can be found in E40], p. t69. For the numerical evaluation of the Jacobian elliptic functions it is recommended to employ the computationally economic, rapidly convergent m e t h o a of the arithmetic-geometric mean [4]. Multiple shooting was used as a background procedure for comparison purposes only. The problem was solved b y a modified continuation method [13], a trivial differential equation and a linear b o u n d a r y condition for the h o m o t o p y parameter 2 is added. The sensitivity of the problem is caused b y a logarithmic singularity at t = ta > t of the solution of the associated initial value problem. One might expect numerical difficulties for the multiple shooting method because ta depends on the parameter 2 and approaches t + as 2 increases. Indeed, the norm of the iteration matrix increased from i . 100 to t . 109 as 2 varied from I to t 7.5. Therefore single precision computation had to be terminated. Nodes: O, 0.3, 0.5, 0.5, 0.7, 0.8, 0.85, 0.9, 0.92, 0.94, 0.96, 0.97, 0.98, 0.99, I. Initial d a t a : solution at 2 = 7.25. TIME DIFSY1 VOAS RKF7 RKF4 3.5 1t.4 8.9 5.5 OVHM NFC t.7 9.0 5.3 3.2 3393 5224 9tt4 5212 NCT 48 156 t22 75 M =15 NT = 8 TOL = t.lo-- 6 OVHB=0.8 2 7.25 --+2 7.5
= =

Remark. For small values of 2 VOAS or R u n g e - K u t t a methods are faster t h a n D I F S Y 1, but for all 2 > 4 D I F S Y 1 turns out to be best. First of all, VOAS fails at 2 = 9 . 7 5 then R K F 7 at 2----1t.5 and R K F 4 at 2-----t4.0. The standard multiple shooting algorithm suggests a new node be inserted which coincides with 1. in the first four digits. The last successful step for D I F S Y t is 2 = t 7 . 5 .

Numerical Solution of Problems of Ordinary Differential Equations

455

Example 4. Artificial boundary laver problem ( N = 2). This linear problem was treated in Daniel and Martin [9], Lentini and Pereyra [28], and Pereyra [30]:
32y (a+t,), ' y(o)=0, o.I y ( 0 . 1 ) = V~srii.O 1 .

At t = o the problem has a boundary layer of thickness 1/2. One expects serious difficulties for the stepsize control of the four routines as 2 approaches zero. Nodes: 0, 89163 o.ol, OA. Initial data: solution at 2 = 1.1o--5.
TIME DIFSY1 VOAS RIKF7 RKF4 0.7 7.0 1.4 3.4 OVHM 0.4 6.6 t.0 3.1 NFC 1464 36t5 275t 7116 NCT 25 222 44 108 M =4 NT = 5 TOL = 1.1o-- 6 OVHB= 0.2 ~.= t.to-- 5--2=t.lo--

Remark. Solving this example D I F S Y i is the most reliable and VOAS the most susceptible routine. The last successful steps has been for
VOAS: 2 = 1 .lo--8 RKF4, R K F 7 : 2 = t .10--10 DIFSYt : }t= 1 . l o - - t 3 9 The stepsize control of the routines orders a new node which is too close to a given one.

Example 8. An integral equation o/ the second kind (N =5).


?1

6 ~ 9 (s) ----f (3 sin r sin s + 2 sin 2 s sin 2 r) (q0(z) + ~0 (z)) dr. ~


o

This equation has three different solutions in addition to the trivial solution (Pimbley [32]). Each of them can be obtained by multiple shooting, after transforming the integral equation into a boundary value problem by: Yl (t) = ~0(t),
t

y~ (t) = f sin r (~0 (r) + 9~ (r))dr,


0

ya(t)= f sin r(~0(z)+ 93(r))dr,


t f

Y4(t) = f sin (2 z) (q~(r) + q93(r)) dr,


0

y~ (t) = f sin (2 r) (q0(z) + 93 (r))dr.


| 3t Numer. Math., Bd. 27

456

H.-J. Diekhoff et al. Nodes: O, 0.5, ~/2, 2, :~. I n i t i a l d a t a : y ~ 2 e x c e p t for the given b o u n d a r y values. Using the chosen d a t a , multiple shooting yields the only positive solution. TIME DIFSYI VOAS RKF7 RKF4 7.5 10.9 5.8 7.0 OVHM NFC 3.5 8.0 3.0 3.6 5361 3411 3471 4379 NCT 96 140 74 90 M = NT = TOL = OVHB= 5 18 1.1o-- 6 O.8

Example 6. Membrane theory (N = 2).


This p r o b l e m arises in the t h e o r y of stress d i s t r i b u t i o n in a spherical m e m b r a n e h a v i n g n o r m a l a n d t a n g e n t i a l loads (see L e n t i n i a n d P e r e y r a [28], Russell and S h a m p i n e [36], a n d Scott [37]). The following differential equation holds:

Y"+(3 cot (t)+2 tan (t))y'+O.7y=O,


y(30~ y(60~

The s h a r p rise in y (t) a n d its d e r i v a t i v e s m a y cause difficulties. The problem is scaled b y a factor 1 .lo--4Nodes: 30 ~, 31~, 60 ~. I n i t i a l d a t a : y ~ 0, y ' ~ ~/1800. TIME DIFSYt VOAS RKF7 RKF4 7.9 5.3 4.3 5.4 OVHM NFC 4.4 4.5 2.6 3.4 15615 3097 6742 8796 NCT t38 93 75 94 M =3 NT = 6 TOL = 1.10-- 6 OVHB= 0.2

Example 7. Heat conduction ( N = 3).


The equations for one-dimensional h e a t conduction with nonlinear h e a t generation are t r e a t e d in N a a n d T a n g [29] and Stoer a n d Bulirsch [40] :

y " = - - Y " --2d,


t

y'(0) = y (t) = 0 where ~: h e a t generation c o n s t a n t 0 < ;t =< 0.8, y : t e m p e r a t u r e distribution. T h e p r o b l e m possesses a n u m e r i c a l s i n g u l a r i t y at t = 0 . I n a c t u a l c o m p u t a t i o n t h e differential equation m u s t be s e p a r a t e d (see [401 a n d [34]).

Numerical Solution of Problems of Ordinary Differential Equations Nodes" 0., 0.1 {matching point), t. Zero initial data. TIME DtFSYt VOAS RKF7 RKF4 1.O t.7 1.4 0.8 OVHM NFC 0.5 t.3 0.8 0.4 1573 804 2t32 10o8 NCT 82 t39 114 65 M =3 NT = 7 TOL =t.~o--6 OVHB= 0.2 2=0.8

457

Example 8. Lubrication theory (N----2).


The following nonlinear eigenvalue problem was t r e a t e d b y Cole et al. [8] a n d Keller [25]. I t arises in the theory of lubrication and concerns the flow of a viscous compressible fluid through a very narrow gap. Y'= ! / ~sinZt--2 sin*t\ : y );

--:rlZ<t<=~r/2

y (n/2) -----y - - ~/2) = 1 ; ( e is a p a r a m e t e r , 2 t h e required eigenvalue. This b o u n d a r y value problem was solved numerically for e = 1/t00. F o r this p a r a m e t e r value the solution y approaches zero a t t-----0. The single shooting m e t h o d was performed in the b a c k w a r d direction (integ r a t i n g from 7~/2 to --7~/2). In this case the norm of the iteration m a t r i x was a b o u t t.io 0. On the other hand, during forward integration the norm increased to 0.51010, indicating high sensitivity of the problem. Nodes : - - ~/2, ~/2 ( M = 2, single shooting). I n i t i a l d a t a : y ~ t, 2 ~ 4/3. TIME DIFSYt VOAS RKF7 1RKF4 15.4 7.5 Io.6 15.7 OVHM NFC 9.0 6.2 6.7 IO.1 22627 4o17
13326

NCT 125 61 86 t28 M =2 NT = 5 TOL = l.xo-- 6 OVHB= 0.2

19896

Example 9. Nonsymmetric bending o/ elliptic cylindrical tubes (N = 6).


R e c e n t l y W e i n i t s c h k e [43, 44] studied the nonlinear problem of bending a thin-walled cylindrical t u b e with elliptic cross section. No assumptions are m a d e of b e n d i n g t h e t u b e a b o u t the minor or major axis. The differential equations are: f l , , _ ~r f V c o s ~ + e ~ sin S~ (sin fl (cos ~ + 7 e sin ~) - - cos fl (7 cos ~ - - e sin ~))
--

q s i n ~ cos cos 2 ~ + e ~ sin ~ ~efl',

] " ~ V ~ s 2~ + e 2 sin 2s: (cos fl (cos ~ + 7 e sin ~) + sin fl (7 cos ~ - - e sin ~))
_

q sin ~ cos ~ /, cos 2 ~ + e * sin S

31"

458

H.-J. Diekhoff et al.

where: angle 0 ~ ~ ~ 2 n, 1 (~): dimensionless stress function, (~): dimensionless angular deflection, b: minor axis, a : major axis, projection of the deformed axis to the x - - z plane, assumed to be radius of a circle, : projection to the y - - z plane, D: flexural rigidity, I / A : extensional stiffness, b e = -a- , q = l --e *,
R x ~'= Ry' r a2 V~4~R~ 9

Symmetry of the problem leads to the boundary conditions: fl(O) =fl ( 2 ) = arctan y,

Additionally, two integrals for the moments m~, my are computed: rex= -7r
0

/[((t+C)cosfl+Ssinfl)cost--e((l+C)sinfl--Scosfl)sint]dt,

my=-0

][((l--C)sinfl+Scosfl)cost+e((l--C)cosfl--Ssinfl)sint]dt

where: S----sin (2 arctan 7), C----cos (2 arctan 7). In the simpler case of a cylindrical tube, e = t, solutions have been obtained b y means of a perturbation technique by Reissner and Weinitschke [33]. Quasilinearization has been successfully applied b y Thurston [42]. The problem was solved for the parameters: e=0.9, Nodes: 0., ~/4, ~[2. Initial data: fl ,8' ~ arctan 7 --= ~*/30 estimated from [3 3 ], 7=0.25, a=0.5.

t(o) =-~

,(-:)_-o.

1'(o) = o

mx~O,

m~,=O.

N u m e r i c a l S o l u t i o n of P r o b l e m s of O r d i n a r y D i f f e r e n t i a l E q u a t i o n s

459

TIME DIFSYI VOAS RKF7 RKF4 2.2 2.7 2.6 2.0

OVHM 0.8 t.7 1.2 0.9

NFC 1317 806 !387 t 064

NCT 93 114 t09 84 M NT TOL OVHB =3 = 12 =1.10--6 = 0.4

Example 10. A hydrodynamic problem (N---- 5). The problem describes a laminar boundary layer produced by the rotating flow of a viscous incompressible fluid over a stationary infinite disk. The external velocity should vary as some power of the radius: v,~r-*; further the fluid is assumed to be interacting with a magnetic field represented by the parameter s. A complete discussion of this problem can be found in King and Lewellen [26]. The original version leads to a two-point boundary value problem: ,,, [ 3 --n \ ,, ~r ( n - t) V q ~ - s ( a s - t) = o

i
U boundary conditions : ~0(O) = V (O) = q)(O) = O,
v" (tt) = o, 9 (tl) = t

where n and s are given parameters. For several parameters n, s, tt numerical solutions of this problem were obtained by Holt [22] using a combination of quasilinearization and finite difference methods and by Roberts and Shipman [35] using a shooting method. In E35] the solution is given for the parameters n - - --0A, Nodes : equidistant. Initial data: solution at t~= t 1.3.
TIME DIFSYt VOAS RKF7 ]RKF4 10.0 16.7 7.5 t4.3 OVHM 6.4 14.1 5.t t0.4 NFC 13015 7326 6876 15352 NCT 82 t38 62 1t8 M =tt NT = t2 TOL = t . l o - - 6 O V H B = 1.3

8=0.2,

tt= tt.3.

tt=tl.3-~tl=12.

Remark. Changing the direction of integration in the multiple shooting algorithm a more favorable iteration matrix was obtained (see [13]). Example 11. Re-entry problem/or an Apollo orbiter type vehide ( N = 7). Of all the many difficult problems due to manned interplanetary travel perhaps the most critical is that of returning the vehicle from outer space to the earth's surface. The chief problem with aerodynamic breaking is associated with the severe heating effects experienced by the vehicle. Therefore reentry trajectories are searched which minimize this quantity. This optimal control problem

460

H . - J . Diekhoff et al.

leads to s e v e n d i f f e r e n t i a l e q u a t i o n s i n v o l v i n g t h e a d j o i n t v a r i a b l e s ~,, 2~, 2, a n d

the free total flight time T (cf. [40]). Physical differential equations:
S 0 V2 g sin y ]

~'= - - - - 2 m - C w ( u ) - - ~ i Soy v cos y ~ = [ 2m CA(u)+ R(I+~)


~= vsin7 R .T

~ .T
gcosy
~i~T~2

(velocity),
[
. T

(flight path angle),


(normalized altitude).

Hamiltonian: where

Cw(u) ----t A 74-- 0.9 cos u, CA (u) = 0.6 sin u (u is the control variable),
sin u
COSU
= -- 0.6 2yl~,
=

-- 0.9

v2,/o~,
+ ( 0 . 9 v 2~)L

= V(6.6~)~

o~
R

@oe-#R~, =209, = 53 200. fl = 4.26, Q0= 2.7041o-- 3, g = 3.2t 721o--4,

S/m
v (0)

The boundary conditions are given by: =0.36

v(t) =0.27,

~,(o)

=-8.1
=41R

~t/t8o

r0)=0., ~:0) = 2.5/R,

~(0)

HI.=,=0. Nodes: Initial data:


v
y $

1.

0.2700E +00 --0.6000E +00 0.2750E +00 --0.3900E +00 0.2880E+00 -- 0.2280E + 00 0.33o0E+00 --0.t070E+00 0.3607E+00
-- o. 5000E -- 01

0.0 0.47500000000E +00 0.70685834705E--02 0.3 t 500000000E +00 0.24085543677E--01 0. t 2600000000E + 00 --o.2t 2930t6874E--01 -- 0.4000O00O000E--ot --0.t 22t 7304764E +00
-- O. 550000OOOOOE -- ot

0.t ~961722488E--0t --0.35100000000E+02 0.1 t 722488038E --0t --0.65700000000E + 0 t 0.t0574t 62680E--0t --0.34600000000E + 0t 0.82775t 19615E--o2 o.o
-- 0. t 3OOOOO0000E

o.23oE+o3 o.23oE+o3 0.230E+03 0.230E+03 0.230E+o3 0.230E+03

0.762
0.496 0.26 0.097 o.

0.14019t 38756E--01 - - ot 0A9t 3875598tE--01 + 00

0.3600E+00
-- 0.6000E -- 0 t

--0.t4t37166941E+00
-- 0.60000000000E -- 0t

-- 0.20000000000E

Numerical Solution of Problems of Ordinary Differential Equations


TIME DIFSYI VOAS RKF7 RKF4 1t3.5 194.4 t29.2 313.7 OVHM 39.6 143.1 58.6 137.9 NFC 67224 46058 65142 166992 NCT 60 104 69 t67 M 6 NT 100 TOL :=1qo--6 O V H B ~ 3.4
= =

461

Remark. In order to prevent an overflow of tile right hand side using RKFT, the argument of the exponential function must be limited. Example 12. Optimal control o/a ,,ass production (N = 3).
This optimal control problem is due to Bauer, Neumann [2] and describes an automatic machine producing a mass article: v : production velocity: ev: articles produced per unit-time"
1 --x:

v E [0,1 j, ,t > 0, x E [0,1 ],

percentage of refuse:

axv: returns of the production per unit-time, k (v, t) : production costs per unit-time : The profit I is to be maximized:
T

k (v, t) = 89 e r . v*

I(x,v)= f [~xv--k(v,t)jdt
o

under the restriction (depreciation) :

~c=--bxv

b>0,

x(O)=t
where ~ = 2 . , b--0.08 and T----t0. The associated two-point boundary value problem is given by

= --b x v

x (0) = t,

L=~(~b-~)
with the control variable 0, v= ~, [t,
|

~(1)=o

if ~ < 0 (this case does not occur in actual computation) if ~ e [ o J ] if g > t,

~,= e--r- [x (cx-- ;t,;b)]


switching function: S = ~-- t.

462

H.-J. Diekhoff et al. Nodes: equidistant. Zero initial data except for the given boundary values.
TIME DIFSYt VOAS RKF7 RKF4 6.1 7.3 17.0 19.2 OVHM t .9 4.6 11.3 12.5 NFC 2729 t42o 4389 5147 NCT 49 59 137 155 M = 3 NT = 15 TOL =t.lo--9 O V H B = O.7

Example 13. optimal economic planning o/a growing nation (N = 7).


This example describes the economy of a growing nation which suffers from great unemployment due to the business structure. A policy leading to full employment and stable growth is required. The data used held for Algeria in the year 1961. The economical model due to Stoleru [411 includes one constrained control variable and one first-order constrained state variable. Using multiple shooting technique Wick [451 has computed the associated two-point boundary value problem. The differential equations which consider two cases are given b y (x E [0,1 J is the independent variable):

Case 1. On unconstrained arcs (g:=mae~Xr--z < 0): =o~uy T,


= ~ (l -- u)y T, 2y----- - ( 4 y ~ u + 4 ~ ( I --u)) T,

~,=L=i0=~=o.
Case 2. On constrained arcs (g ~ 0) the differential equations for 4y, 4, and 2,
change to: ~, =
0,

4,---- (4y-- 4~)y*z T with the constants a = 0 . 2 5 , a = 3 A , A----B-----4, 7=0.125, and m = 0 . 4 5 . The adjoint variables 4, and 4, are discontinuous at the entry point x1 of the constrained arc: 4 + X = X l -- - 4 2 x = x l - - lO~ -

4+[.... =471 .... +loma7 ev'qr.


The control variable u satisfies:

u=

If
'

if x < x 1 (entry point) ;


~'z

g< 0 g~ 0 g < O.

[0,

~Y

on the constrained arc; if x > x~ (exit point) ;

Numerical Solution of Problems of Ordinary Differential Equations The boundary conditions are: y(O) = I z(O)=a
(o) = 1,

463

y ( t ) = A e vT , z ( t ) = B e yr,

H [~=0= [-- T + 2y~ + ;t~ + ~, 7"]~=o = 0 (Hamiltonian), H[~=~=O. Nodes: 0. 0.5 t. Initial data: z = 3.t z = 6. z=70. ~.r= I.
~y = 0.05

y=l. y=lS. y=70.

~v=0.
TIME

2,=0.2 ~., = 0.005 ~.,=0.005


NFC 11597 4893 14164 74486

T=20. 7"=20. T=20.


NCT 19 27 61 294

lo= 0.2 lo=0.2 1o=0.2

~r = 1

OVHM I9.0 32.9 84.8 410.9

DIFSYI VOAS RKF7 RKF4

29.0 42.4 94.9 460.6

M NT TOL OVHB

=3 = 28 = 1.to-- 9 = 3.0

Example 14. Planar Earth--Mars trans/er (N----9). In interplanetary space science it is required to pilot an ion rocket with minimal mass-loss. In this example a travel from the Earthian orbit to the Martian orbit is treated. Both orbits are assumed to be circular and coplanar. The influence of the gravitational field of the Earth is neglected. This leads to an optimal control problem with two control variables: the thrust fl E [0, fl~x] (linear control variable) and the thrust angle ~oE]--n, z~[ (nonlinear control variable). For the (normed) physical quantities (distance from the sun r, radial-velocity co, tangential-velocity v, mass m) the four differential equations hold:

~=

v~ r

r e +fire

--sin~p; cos ~

c = 1.872, flmax=0.075,

~=-~=-~.

~y_v+ t i c
r

The boundary values are given by:


r (0) = t . r (6) = t . 5 2 5 ,

co (0) = 0. v ((3)= I.

oa (tl) = 0, v (t/) = 0.8098,

re(o) = t .
The problem with free total flight time It is yet unsolved.

464

H.-J. Diekhoff et al. Nodes: equidistant. Initial data: solution at t t = 5.0. TIME DIFSYt VOAS RKF7 RKF4 46.4 54.8 82.2 t66.5 OVHM NFC 20.2 37.9 61.9 122.7 12203 5870 8967 19470 NCT 53 63 94 190 M =5 NT -- 23 TOL = t.lo--9 OVHB= 2.3 tl= 5.0--'-it= 5.05

Example 15. Heating constraint crossrange maximization problem [or a Space Shuttle orbiter--type vehicle ( N = 14). Since the development of the Space Shuttle atmospheric entry of lifting vehicles is studied. These lifting vehicles should be capable of considerable lateral range, which allows increased return frequencies from orbit to given landing sites. For maximum lateral range a heating constraint depending on velocity, altitude, and angle of attack is taken into account. The underlying mathematical model of this optimal control problem is due to Dickmanns [t4], who also prepared initial data for the unconstrained problem (no heating constraint) using an analytical approximate solution. In [311 the numerical solution of the constrained problem has been treated using multiple shooting techniques especially trimmed to handle ill-conditioned two-point houndary value problems (cf. [t11). An extensive presentation of tile whole model would be beyond the scope of this paper, it can be found in [131. The heating constraint was pushed down from 2850~ to 1700~ by means of a continuation method. The special homotopy step reduces the level of the permitted skin temperature of the Space Shuttle from 2057~ to 2000~ Using the modified continuation method [131 the system comprises t4 differential equations. The differential equations for the physical quantities (velocity v, heading angle Z, flight path angle 7I, cross-range angle A, altitude h, down-range angle 0) are : R 2 . FOo ~= -- (cw~ c~)-2m e - " v 2 - - g o ( - R ~ ) s i n } , ,
F 00 sin/z ~=Ca--fm-m e-ahv cosy v R+h c ~ 1 7 6

2-,
z l - - R + h c~ }, sinT~' v h=vsin~, 0.~_ v R+h cos ~ cos j$ cos A

-k-~

R~-h cos~,

where/z (aerodynamic bank angle) and cA (lift coefficient, constrained) are the two nonlinear control variables. The other quantities are constants. For a detailed discussion of the technical results see [t 5].

Numerical Solution of Problems of Ordinary Differential Equations

465

This example is one of the most complicated and most sensitive control problems to be solved so far by multiple shooting algorithm. Nodes and initial data can be found in [31]. TIME DIFSY1 VOAS RKF7 1RKF4 OVHM NFC NCT 35 28 66 272 M = i1 NT = 95 TOL =t.lo--9 OVHB= 24.7

3850.6 795.9 34637o 3071.9 1672.7 146689 7252.9 3970.7 384485 FAIL

Remark. R K F 4 did not succeed in 10800 sec (number of computed trajectories: N T = 3 0 , number of function evaluations: N C F = 582396). To make the calculation of NCT for R K F 4 possible, the time was extrapolated to 30000.
5. Summary of Results The 15 examples presented in this paper may be considered as representative two-point boundary value problems. They cover different degrees of difficulties. Some of the examples are rather simple and have been treated repeatedly in the literature (expl. I, 3, 4, 6), others are extremely difficult (expl. tt, t3, 14, 15). The criteria for judging the four integration routines are reliability, [astness and precision.

a) Reliability. As far as reliability is concerned, D I F S Y t obtained the best results. D I F S Y t is not sensitive to the choice of nodes (expl 3,4). It also runs well even in sensitive problems described by a large norm of the iteration matrix (cf. Chapter 3). A disadvantage of D I F S Y I is the increased computing time, if D I F S Y 1 is used with zero initial data in the case of a homogeneous differential equation. As can be seen from the examples (3, 4), VOAS was the most sensitive integrator. It does not allow large integration intervals, and requires the greatest number of nodes. Nevertheless, VOAS proved to be more favourable in applications in optimal control problems. The small integration steps of VOAS yielded a secure and fast determination of the switching points. R K F 7 and R K F 4 are very reliable, except that the stepsize control of R K F 7 did not avoid an overflow in the right hand side of example 11. Both of these integrators did not allow as large parameter values as DIFSY 1 did in the examples 3 and 4. b) Fastness. In order to compare the fastness of the four routines, the total amount of computing time is considered. The number of function calls, which has been measured in [28] and ~30], is not alone representative for fastness. Computing time must be paid, not the number of function calls. Even for complicated problems with a large number of operations in the right hand side, the overheadtime of the routines can not be neglected (see Table t). As is seen in Table 1, the mean of the overheadtime for all problems (in per cent) requires a larger portion of time than the time spent in the right hand side. Only in example t 5 TFC is dominant in all routines. It should be mentioned that VOAS

466

H.-J. Diekhoff et al. Table 1. Splitting of the total computing time (tO0%) averaged over all examples DIFSY 1 VOAS OVHM TFC OVHB 47% 40% t3% 75% 18% 7% RKF7 6t% 29% lo% RKF4 60% 30% to%

OVHM = percentage for the overheadtime of the routines; TFC = percentage for the time spent in the right hand side; OVHB = percentage for the overheadtime of Boundsol Table 2. Averaged normed computing time in per cent of the RKF 7-average Expl. t-1t DIFSYt VOAS RKF7 RKF4 95 t 52 tO0 t35 Expl. 12-t5 Expl. 1-t5 44 49 100 254 81 123 t00 169

needs the largest, D I F S Y t the smallest part of OVHM. The overheadtime of B O U N D S O L , however, is negligible. It is not possible to compare the four routines by adding the total computing times for each problem. The various difficulties and sizes of the problems caused computing times ranging between a few seconds (expl. 1) and several hours (expl. t 5). The normed computing times NCT introduced in Chapter 4 are comparable quantities. Table 2 includes the averaged NCT for each routine given in per cent of the R K F 7 - a v e r a g e in each column. This table illustrates the fastness of each routine for the examples t - t I with technical precision ( T O L = t q 0 - - 6 ) , and for the sensitive optimal control problems t 2-15 with higher precision (TOL = t .lo-- 9). Column three in Table 2 contains the averaged values over all problems. As is seen in examples t - l t D I F S Y I , and R K F 7 run similarly fast, whereas in examples t2-15 D I F S Y I and VOAS are equivalent. R K F 4 is out of business. Having considered all problems, one would most likely prefer D I F S Y t. The above division of the examples into two groups, however, is unfavourable for R K F 4 , since R K F 4 was the fastest routine in the examples 2, 7, 9.

c) Precision. I n shooting methods, the precision is prescribed ' a priori'. All methods obtained the required precision. Rule o/ Thumb. I n order to decide which routine should be applied for a particular problem, the t 5 examples are divided into four groups (according to their averaged total computing time). Simple examples: Less difficult examples: Difficult examples: Very diHicult examples:
2, 7, 9 1, 3, 4, 5, 6, 8 10, 12, 14 1 t, t 3, 15.

Numerical Solution of Problems of Ordinary Differential Equations

467

For these four groups the averaged normed computing times for each routine are compared in Table 3- Again they are given in per cent of the RKF7-average in each column. Table 3. Averaged normed computing time for the classification in per cent of the RKF 7-average Simple DIFSYi VOAS RKF 7 RKF4
77

Less difficult IO4 i65 t oo i63

Difficult 63 89 I oo t58

Very difficult 58 81 1oo 374

i2t I 0o 65

For simple problems (column 1) R K F 4 is the fastest routine, whereas for less difficult problems (column 2) one would prefer R K F 7 or D I F S Y t. In difficult and very difficult problems D I F S Y t and VOAS are tile fastest routines. Among very difficult problems, where the part of computing time spent in the right hand side dominates (see expl. 15), VOAS is faster than D I F S Y 1. This is caused by the larger percentage of overheadtime of VOAS (see Table l) (i.e. the smaller number of function calls). These statements are summed up in the Figure 1 which also includes the experience of the authors.
VOAS Good

---~"" i b e h ."a v ...... o u r ~

R KF 7

Bad

behav,ou

S,m p l e

problems

Complicoted ~
problems

Fig. 1. Behaviour of the integration routines

The results of these investigations validate the suggestions in [16], t h a t the four tested routines should be included in a program library. The choice of a suitable routine for a particular problem is made easier by the sketch.
Acknowledgements. The authors wish to thank Professor R. Bulirsch who stimulated and encouraged this work, they are indebted to Dr. D. Gerber for helpful comments. References

1. Aziz, A. K. led.) : Numerical solutions of boundary value problems for ordinary differential equations. Proceedings of a Symposium held at the University of Maryland, i 974. New York : Academic Press 1975 2. Bauer, H., Neumann, K. : Berechnung optimaler Steuerungen, Maximumprinzip und dynamische Optimierung. Lecture Notes in Operations Research and Mathematical Systems, Vol. 17. Berlin-Heidelberg-New York: Springer t969

468

H.-J. Diekhoff et al.

3. Broyden, C. G. : A class of methods for solving non-linear simultaneous equations. Math. Comp. 19, 577-593 (t965) 4. Bulirsch, R. : Numerical calculation of elliptic integrals and elliptic functions, I, II. Numer. Math. 7, 78-90, 353-354 (1965) 5. Bulirsch, R., Oettli, xAr., Stoer, J. (eds.): Optimization and optimal control. Proceedings of a Conference held at Oberwolfach, 1974, Lecture Notes, Vol. 477. Berlin-Heidelberg-New York: Springer 1975 6. ]3ulirsch, R., Stoer, J.: Numerical treatment of ordinary differential equations by extrapolation methods. Numer. Math. 8, 1-13 (1966) 7. ]3ulirsch, tL, Stoer, J., Deuflhard, P. : Numerical solution of nonlinear two-point boundary value problems, I. Numer. Math. (to be published) 8. Cole, J. D., Keller, H. B., Saffmann, P. G. : The flow a viscous compressible fluid through a very narrow gap. SIAM J. Appl. Math. 15, 605-6t7 (1967) 9. Daniel, J . W . , Martin, A. J.: Implementing deferred corrections for Numerov's difference method for second-order two-point boundary value problems. Tech. Rep. CNA-t 07, Center for Numerical Analysis, The University of Texas at Austin (1975) 10. Davenport, S.M., Shampine, L. F., Watts, H. A.: Comparison of some codes for the initial value problem for ordinary differential equations. In: [1 ], pp. 349-353 (1975) 11. Deuflhard, P.: A modified Newton method for the solution of ill-conditioned systems of nonlinear equations with application to multiple shooting. Numer. Math. 22, 289-315 (1974) 12. Deuflhard, P.: A relaxation strategy for the modified Newton method. In ES}, pp. 59-73 (1975) 13. Deuflhard, P., Pesch, H.-J., Rentrop, P.: A modified continuation method for the numerical solution of nonlinear two-point boundary value problems by shooting techniques. Numer. Math. 26, 327-343 (1976) 14. Dickmanns, E. D.: Maximum range, three-dimensional lifting planetary entry. NASA Tech. Rep. 1R-M 199, Marshall Space Flight Center, Alabama (1972) 15. Dickmanns, E. D., Pesch, H.-J. : Influence of a reradiative heating constraint on lifting entry trajectories for maximum lateral range. 11 th International Symposium on Space Technology and Science, Tokyo, July 1975 16. Enright, W. H., Bedet, R., Farkas, I., Hull, T. E.: Test results on initial value methods for non-stiff ordinary differential equations. Tech. Rep. No. 68, Department of Computer Science, University of Toronto (1974) !7. England, R.: Error estimates for Runge-Kutta type solutions to systems of ordinary differential equations. Comp. J. 12, 166-17o (1969) 18. Fehlberg, E.: Klassische Runge-Kutta-Formeln fiinfter und siebenter Ordnung mit Schrittweitenkontrolle. Computing 4, 93-106 (1969) 19. Fehlberg, E.: Klassische Runge-Kutta-Formeln Iiinfter und siebenter Ordnung mit Schrittweitenkontrolle und ihre Anwendung auI W~irmeleitungsprobleme. Computing 6, 61-71 (1970) 20. Fermi, E., Pasta, J. R., Ulam, S.: Studies of nonlinear problems, I. Tech. Rep. No. 1940, Los Alamos (1955) 21. Gragg, W. B. : On extrapolation algorithms for ordinary initial value problems. 'SIAM J. Numer. Anal. Ser. B 2, 384-403 (1965) 22. Holt, J. F. : Numerical solution of nonlinear two-point boundary value problems by finite difference methods. Comm. ACM. 7, 366-373 (1964) 23. Hull, T. E. : Numerical solutions of initial value problems for ordinary differential equations. In [t], pp. 3-26 (1975) 24. Itussels, H . G . : Schrittweitensteuerung bei der Integration gew6hnlicher Differentialgleichungen mit Extrapolationsverfahren. Universit/it zu K61n, Mathemathisches Institut, Diplomarbeit (1973) 9.5. Keller, H. 13.: Numerical methods for two-point boundary value problems. 9 Chapter 6: Practical examples and computational exercises. London: Blaisdell 1968

Numerical Solution of Problems of Ordinary Differential Equations

469

26. King, W. S., Lewellen, W. S.: Boundary-layer similarity solutions for rotating flows with and without magnetic interaction. Ref. ATN-63 (9227)-6, Aerodynamics and Propulsion Res. Lab., Aerospace Corp., El Segundo, Calif. (1963) 27. Kiipper, T. : A singular bifurcation problem Math. Rep. No. 99, Battelle Advanced Studies Center, Geneva (1976) 28. Lentini, M., Pereyra, V. : Boundary problem solvers for first order systems based on deferred corrections. In ~1], pp. 293-315 (1975) 2% Na, T. Y., Tang, S. C. : A method for the solution of conduction heat transfer with non-linear heat generation. ZAMM 49, 45-52 (1969) 30. Pereyra, V. : High order finite difference solution of differential equations. Report STAN-CS-73-348, Computer Science Department, Stantord University (1973) 31. Pesch, H.-J. : Numerische Berechnung optimaler Steuerungen mit Hilfe der Mehrzielmethode dokumentiert am Problem der Rfickfiihrung eines Raumgleiters unter Beriicksichtigung von Aufheizungsbegrenzungen. Universit/it zu K61n, Mathematisches Institut, Diplomarbeit (1973) 32. Pimbley, G.: Eigenfunction branches of nonlinear operators and their bifurcations. Lecture Notes, Vol. ~04. Berlin-Heidelherg-New York: Springer 1969 33. Reissner, E., Weinitschke, H. J. : Finite pure bending of circular cylindrical tubes. Quarterly Appl. Math. 20, 305-319 (1963) 34. Rentrop, P.: Numerical solution of the singular Ginzlmrg-Landau equations by multiple shooting. Computing 16, 61-67 (1976) 35. Roberts, S.M., Shipman, J. S.: Two-point boundary wdue problems: Shooting methods. New York: Elsevier 1972 36. Russel, R. D., Shampine, L. F.: A collocation method for boundary value problems. Numer. Math. 19, 1-28 (1972) 37. Scott, M. R.: Invariant imbedding and its applications to ordinary differential equations: An introduction. Reading, Massachusetts: Addison-Wesley t973 38. Scott, M. R., Watts, H. A.: SUPORT-A computer code for two-point boundaryvalue problems via orthonormalization. Tech. Rep. SAN1)-75-0198. Sandia Laboratories, Albuquerque, New Mexico (1975) 39. Sedgwick, A. E. : An effective variable order variable step Adams method. Ph. D. Thesis, Tech. Rep. No. 53, Department of Computer Science, University of Toronto (1973) 40. Stoer, J., Bulirsch, R.: Einfiihrung in die Numerische Mathematik, Ii. Heidelberger Taschenbuch, Bd. 114. Berlin-Heidelberg-New York: Springer t973 41. Stoleru, L. G. : An optimal policy for economic growth. Econometrica 33, 321-348 0965) 42. Thurston, G. A.: Newton's method applied to problems in nonlinear mechanics. J. Appl. Mech. 32, 383-388 (t965) 43. Weinitschke, H. J. : Die Stabilit/it elliptischer Zylinderschalen bei reiner Biegung. ZAMM 50, 411-422 (1970) 44. ~Veinitschke, H. J. : On nonsymmetric bending instability of elliptic cylindrical tubes. Unpublished manuscript, TU Berlin (to appear) 45. Wick, R. : Numerische L6sung volkswirtschafflicher Variationsprobleme mit Zustandsbeschr~inkungen unter Anwendung der Mehrzielmethode. Universit~it zu K61n, Mathematisches Institut, Diplomarbeit (1973) H.-J. Diekhoff P. Lory H. J. Oberle H.-J. Pesch P. Rentrop R. Seydel Institut fiir Mathematik der Technischen Universit~t Miinchen Arcisstr. 21 D-8000 Miinchen 2 Federal Republic of Germany

Vous aimerez peut-être aussi