You are on page 1of 14

P e r g a mo n

Computers Math. Applic. Vol. 32, No. 6, pp. 15-28, 1996


Copyright~)1996 Elsevier Science Ltd
Printed in Great Britain. All rights reserved
0898-1221/96 $15.00 + 0.00
PII: S0898-1221 (96)00141.1
An Effi ci ent Ru n g e - Ku t t a (4, 5) Pai r
P. BOGACKI
Department of Mathematics and Statistics, Old Dominion University
Norfolk, VA 23529, U.S.A.
bogacki0math, odu. e d u
L . F . S H A M P I N E
M a t h e m a t i c s D e p a r t m e n t , S o u t h e r n M e t h o d i s t University
Dallas, T X 75275, U.S.A.
shampineOna-net, ornl. g o v
(Received and accepted May 1996)
A b s t r a c t - - A pair of explicit Runge-Kutta formulas of orders 4 a n d 5 is derived. It is significantly
m o r e efficient than the Fehlberg a n d Dormand-Prince pairs, a n d b y standard measures it is of at
least as high quality. There are t w o independent estimates of the local error. T h e local error of the
interpolant is, to leading order, a problem-independent function of the local error at the e n d of the
step.
K e y w o r d s - - O r d i n a r y differential equations, Runge-Kutta, R K S U I T E , Continuous extension, Lo-
cal error.
1. I NTRODUCTI ON
Four t h- or der expl i ci t Runge- Kut t a formul as have always been popul ar for t he sol ut i on of t he
i ni t i al val ue pr obl em for a fi rst -order syst em of or di nar y differential equat i ons ( ODEs)
y' = f ( x , y ) , a < x < b, y(a) given.
T h e error m a d e in a s t e p , t h e local error, is e s t i m a t e d b y t a k i n g e a c h s t e p w i t h a fifth-order
f o r m u l a a n d e s t i m a t i n g t h e error in t h e fourth-order f o r m u l a b y c o m p a r i s o n . A n a t u r a l m e a s u r e
o f t h e cost o f a R u n g e - K u t t a f o r m u l a is t h e n u m b e r o f stages i n v o l v e d - - t h e n u m b e r o f t i m e s
f ( x , 9 ) is evaluated. B y e m b e d d i n g t h e evaluation o f o n e f o r m u l a in t h e o t h e r , it is possible
t o m a k e evaluation o f t h e pair v e r y m u c h c h e a p e r t h a n s e p a r a t e evaluation o f t h e individual
formulas. A t least six stages are n e e d e d for a fifth-order formula, a n d it is possible t o derive pairs
t h a t require o n l y six stages.
T h e l a n d m a r k p a p e r o f H u l l e t al. [i] considers h o w t o assess t h e effectiveness o f m e t h o d s for
t h e n u m e r i c a l solution o f O D E s . T h e r e , t h e six stage F(4,5) pair d u e t o F e h l b e r g [2] p r o v e d t o b e
v e r y effective. P r o v i d e d t h a t t h e stability o f t h e fifth-order f o r m u l a is acceptable, a d v a n c i n g t h e
integration w i t h t h e higher-order result, called local extrapolation [3], results in a m o r e a c c u r a t e
integration a t n o additional c o s t . T h e c o m p a r i s o n [4] s h o w s t h e considerable a d v a n t a g e s o f
i m p l e m e n t i n g F(4,5) in t h i s w a y . F o r quite s o m e t i m e t h e F(4,5) pair in local extrapolation m o d e
T h e authors are grateful for the advice of I. Gladwell that has considerably improved this paper.
Typeset b y . A A , ~ T E X
15
16 P. BOGACKI AND L. F. SHAMPINE
was general l y accept ed as t he best way t o proceed at t hese orders. Dor mand and Pr i nce [5]
achi eved a consi derabl e i mpr ovement by expl oi t i ng t he idea of FSAL, Fi r st Same As Last . The
i dea is t o f or m t he resul t for advanci ng t he i nt egrat i on, form t he first st age of t he n e x t st ep, and
use t hi s st age as a l ast st age in t he cur r ent st ep for t he f or mat i on of t he ot her f or mul a of t he pair.
Pr ovi ded t ha t t he st ep is a success, an ext r a st age is obt ai ned for "free" in t hi s way. Theor et i cal
ar gument s [6] and exper i ence say t ha t t he Dor mand- Pr i nce pai r, DP5(4)TM, is consi der abl y mor e
efficient t ha n F(4, 5).
In t hi s paper , we present t he BS(4, 5) pai r t ha t represent s about as gr eat an i ncrease in efficiency
over t he Dor mand- Pr i nce pai r as t ha t pai r represent s over t he Fehl berg pair. The st abi l i t y of t he
new pai r is about t he same as DP5(4)TM on an equal cost basis. A ver y unusual aspect of t he
new pai r is t ha t we provi de t wo f our t h- or der formul as so as t o obt ai n t wo i ndependent est i mat es
of t he local er r or and enhance t he r obust ness of er r or cont rol . These and ot her i mpr ovement s are
obt ai ned by going t o a pai r t ha t involves seven stages. Subsequent l y, ot her aut hor s [7] recogni zed
t he advant ages of using one mor e t ha n t he mi ni mal number of stages.
A Runge - Kut t a formul a st ar t s wi t h an appr oxi mat e sol ut i on of t he differential equat i on at a
poi nt x~, and comput es an appr oxi mat i on at x n +l = x n + h. I t is possible t o deri ve a fami l y
of Runge - Kut t a formul as dependi ng on a par amet er a such t ha t t he member cor r espondi ng t o a
provi des an appr oxi mat e sol ut i on at x n a h , an "i nt erpol ant . " By reusi ng t he st ages f or med in
t he course of t he basic st ep t o Xn+l , at most a few addi t i onal stages are needed for t he eval uat i on
of all member s of t he family. Hor n [8] deri ved such a scheme for F(4, 5). One pr act i cal issue
is how s moot hl y t he i nt er pol ant for [xn, Xn+l] connect s wi t h t he i nt er pol ant for an adj acent
i nt erval [Xn+l , xn+2]. Hor n' s i nt er pol ant is not even cont i nuous, but gl obal l y C 1 i nt er pol ant s
are now available [9]. Shampi ne and his coworkers [10,11], pr oduced a number of i nt er pol ant s
for t he Dor mand- Pr i nce pair, as di d Dor mand and Pr i nce t hemsel ves [12]. At present , t he best
i nt er pol ant for t ha t pai r appear s t o be t ha t of Calvo, Mont i j ano and Randez [13]. The accur acy
of t hese i nt er pol ant s depends on t he probl em, but t her e are i nt er pol ant s [11] wi t h an er r or at
x n + a h t ha t is a known mul t i pl e of t he er r or at x n h i nde pe nde nt of t he probl em, at l east
asympt ot i cal l y. Recent research [14] expl oi t s such i nt er pol ant s for cont rol of t he defect . We have
deri ved an i nt er pol ant for t he BS(4, 5) pai r t hat has t hi s ver y desi rabl e pr oper t y.
In a sect i on devot ed t o numeri cal t est s we r epor t some exper i ment s of our own made wi t h a
versi on of t he well-known code RKF45 [15] modified so t hat we coul d compar e several pai rs of
formul as. We also descri be briefly some subst ant i al exper i ment s of Kr aut [16]. She compar ed t he
st at e- of - t he- ar t sui t e of expl i ci t Runge- Kut t a codes RKSUI TE [17-19], t o codes in t he NAG [20],
and I MSL [21] libraries. The BS(4, 5) pai r is t he s t andar d choice in RKSUI TE. Kr aut ' s exper -
i ment s and ot her exper i ence have shown RKSUI TE t o be so effective t ha t it was added t o t he
I MSL library, and it repl aced t he expl i ci t Runge- Kut t a code of t he NAG library. In t hi s sense,
t he BS(4, 5) pai r has been a ver y successful pair.
2 . PRELI MI NARI ES
We consi der t he initial val ue pr obl em for a syst em of or di nar y differential equat i ons
y ' ( x ) = f ( x , y ( x ) ) , a < x < b,
y ( a) given.
( 1 )
( 2 )
A Runge - Kut t a process pr oduces a sequence of appr oxi mat i ons 9~ t o y ( x n ) for a = x0 < xl <
. . < x n = b. Each st ep from x n t o xn+l = x n + h involves t wo appr oxi mat i ons t o y ( x n +l ) ,
namel y yn+l and Yn+I . The pair of formul as used for t hi s pur pose has t he f or m
8
i =1
Runge-Kut t a (4,5) Pair 17
wher e t he st ages
and
8
Yn +l = ~)n + h Z b~k~,
i =l
k l = f ( Xn, Y n ) ,
k i = f x n + c i h , ! ) n + h a i , 3 k j ,
3=1
i : 2 , 3 , . . . , s ,
( 4 )
( 5 )
i - I
c i : - ~ ~ a i , j , i = 2 , 3 , . . . , s .
j =l
The l ocal sol ut i on u ( x ) is t he sol ut i on of (1) t ha t satisfies u( x , ~) = ~),~. The local er r or of
f or mul a (3) at ( xn+l , Yn+l) is Yn+l - u ( x n + h ) . The closely r el at ed concept of local t r uncat i on
er r or refers t o t he sol ut i on y ( x ) of (12). For a Runge - Kut t a formul a, t he local er r or is t he local
t r uncat i on er r or associ at ed wi t h u ( x ) , so we, like ot her aut hor s, ma y use ei t her t e r m when deal i ng
wi t h t he sol ut i on of (1). For s moot h f unct i ons f , a Tayl or series expansi on of t hi s er r or has t he
f or m
Yn+i -- U( Xn "~- h) : ~ h j
The anal ogous expansi on for t he local er r or of f or mul a (4) is
oo f ~_~r j (j) r~(j) }
Y n T l - - U( X n ~- h) : ~- ~ h j
j =l
The D ( j ) her e ar e el ement ar y differentials, sums of pr oduct s of par t i al der i vat i ves of component s
of f eval uat ed at ( x n , Y n ) , and as such, t hey depend onl y on t he pr obl em. The ~(J) and T ( j ) ,
ar e t he t r uncat i on er r or coefficients of formul as (3) and (4), respect i vel y; t hey depend onl y on
t he coefficients ( a i , j , c i , bi , bi ) defining t he formul as. Expl i ci t expressi ons for t he t r uncat i on er r or
coefficients ar e l i st ed for k = 1 , . . . , 6 in [5]. Bet t i s and Hor n [22] list such expressi ons for k <_ 10,
and pr ovi de a FORTRAN pr ogr a m t o eval uat e t he coefficients for a gi ven Runge - Kut t a formul a.
A f or mul a (3) of or der five mus t sat i sfy t he equat i ons of condi t i on
~U) =O, k = 1 , 2 . . . . , r j , j = 1 , 2 , 3 , 4 , 5 , (8)
and a f or mul a (4) of or der four mus t sat i sfy
T ( j ) = 0 , k = l , 2 , . . . , r j , j = 1 , 2 , 3 , 4 . (9)
Whe n Y n +l is of or der four and Yn+l is of or der five, it is easy t o see t ha t t he difference Y n +l - ~ l n + l
es t i mat es t he local er r or of t he l ower-order formul a.
I n cont r as t t o t he Dor mand- Pr i nce pai r DP5( 4) 7M, t he BS(4, 5) pai r t ha t we pr esent her e does
not di r ect l y as s ume t ha t local ext r apol at i on is done. I n t he der i vat i on of t he pai r some choices
were i nfl uenced by t he i nt ended mode of i mpl ement at i on, but t he pai r coul d be used efficiently
in ei t her mode. Der i vat i on of an i nt er pol ant is di fferent because, t he mode of use affect s t he
or der of accur acy t ha t is appr opr i at e and t he da t a t ha t is avai l abl e for t he const r uct i on of t he
i nt er pol ant . As we feel t ha t f or mul a pai r s shoul d be used in local ext r apol at i on mode, t he
di scussi on and anal ysi s of i nt er pol ant s t ha t follows is based on t hi s assumpt i on.
A novel t y of our appr oach is t ha t we di d not use t he mi ni mum numbe r of st ages (s -- 6)
necessar y for a f or mul a of or der five. I nst ead, we t ook s = 7 in t he hope t ha t t he addi t i onal
C,~14WA32-6-~
18 P. BOGACKI AND L. F. SHAMPINE
fl exi bi l i t y woul d allow a new pai r t o be const r uct ed t ha t woul d be mor e efficient t ha n 6 st age
pairs. Si nce our i nvest i gat i on, ot her aut hor s [7] have recogni zed t he advant ages of an addi t i onal
st age. A nat ur al quest i on at t hi s poi nt is, why j ust 7 stages, why not even mor e? Wor k on
Runge - Kut t a formul as has concent r at ed on measures of qual i t y t ha t are scaled by t he cost of t he
formul as. Nevert hel ess, t he absol ut e cost of a st ep must be considered. One reason for t hi s is t he
cost of a failed st ep. A failed st ep wi t h F(4, 5) wastes 5 eval uat i ons of f . The DP5( 4) 7M pai r
gai ns a "free" st age, onl y when t he st ep is a success, so t ha t t he first eval uat i on of t he next st ep
is reused. On a failed st ep i t wast es 6 eval uat i ons of f , j ust like t he BS(4, 5) pair. In t hi s si t uat i on
t he Fehl ber g pai r has a small advant age. (As a consequence, t he "t uni ng" of codes based on t he
ot her pai rs shoul d pl ace a l i t t l e mor e emphasi s on avoiding failed steps. )
Anot her ma t t e r is mor e difficult t o quantify. To descri be it in concr et e t erms, let us consi der
one of t he si t uat i ons i nvest i gat ed exper i ment al l y in [23]. Ther e t he efficiency of a basic pai r was
compar ed t o t he efficiency of a pai r obt ai ned from t wo st eps wi t h t he basic pair. On an equal
cost basis, t he t wo pai rs obvi ousl y have exact l y t he same behavi or, but t he absol ut e cost of a
st ep wi t h one pai r is t wi ce t he cost of t he ot her . Exper i ment s show t ha t t he pai r involving mor e
st ages is consi der abl y less efficient for t wo reasons. One is t ha t t he st ep size is less f r equent l y
adapt ed t o t he behavi or of t he solution. The ot her is t ha t t he pai r involving mor e stages must
t ake st ep sizes t wi ce as big, hence, must pr edi ct t he st ep size t wi ce as far i nt o t he f ut ur e. The
pr edi ct i ons are not as good for t he pai r involving mor e stages, so it has mor e failed steps. Thi s
is al r eady less efficient, but it is aggravat ed by t he large difference in t he cost of a failed st ep.
Thes e exper i ment s and rel at ed ones, s uppor t t he plausible ar gument t ha t even when t wo pai rs
have compar abl e pr oper t i es on an equal cost basis, if one pai r involves many mor e st ages t han
t he ot her pai r, it will be less sat i sf act or y in pract i ce. I t is t hese consi derat i ons of absol ut e cost
t ha t pr event us from addi ng many st ages wi t h a view t o increasing efficiency. The difference in
absol ut e cost bet ween t he Fehl berg and Dor mand- Pr i nce pairs has not in our exper i ence led t o
pr act i cal differences of t he ki nd descri bed, and we ant i ci pat e t ha t t he same will be t r ue of t he
smal l di fference in cost of our pair.
The pri nci pal goals in t he deri vat i on of a Runge- Kut t a pai r are efficiency and stability. Ther e
is no quest i on t ha t st abi l i t y is i mpor t ant , but in t he t ypi cal comput at i on t he st eps are chosen
t o yi el d accur acy r at her t ha n stability. For t hi s reason we ai med t o deri ve a pai r t ha t woul d be
si gni fi cant l y mor e accur at e t han DP5(4)7M, but mi ght be onl y compar abl e in t er ms of stability.
Wi t h 7 st ages it is possible t o const r uct a formul a of or der six, so t her e is no quest i on t ha t we can
cons t r uct formul as of or der five t ha t are as accur at e as we wish. Wha t is not cl ear is whet her we
can find accur at e formul as wi t h accept abl e st abi l i t y or t hat t her e will be an embedded accept abl e
f our t h- or der formul a. We pr oceeded as follows. We st ar t ed wi t h a fami l y of 7 st age formul as
of or der five t ha t includes formul as of or der six. Ther e are many free par amet er s. To nar r ow
t he sear ch for an accur at e formul a, we s t ar t ed from a f or mul a of or der six. Ther e is a fami l y of
such formul as, and we first searched for an accurat e, st abl e formula. On finding t ha t t her e is a
f or mul a of or der six in t he fami l y t ha t has a st abi l i t y compar abl e t o t ha t of t he DP5( 4) 7M pai r
on an equal cost basis, we had reason t o expect t hat we coul d find a formul a of or der five wi t h
t he pr oper t i es desi red t ha t had par amet er s not t oo different from t hose of t he formul a of or der
six. In poi nt of fact , t he fi ft h-order formul a was const r uct ed by modi fyi ng t he si xt h- or der one.
The resul t is descri bed in t he next section; here we descri be t he fami l y and t he search for our
st ar t i ng p o i n t - - t h e si xt h- or der formula.
We followed t he pr ocedur e of But cher [24] t o obt ai n a fami l y of si xt h-order, seven st age formul as
wi t h four free par amet er s, whi ch we chose t o be c2, c3, c5 and c6. (We use bars t o di st i ngui sh
quant i t i es associ at ed wi t h t he si xt h- or der formula. ) We want t o choose t hese par amet er s so
t ha t t he f or mul a will be ver y accurat e. Because t he local er r or (67) depends on t he probl em,
no f or mul a can mi ni mi ze i t for all probl ems. To get a formul a t ha t is "usual l y" accur at e, it
is convent i onal t o mi ni mi ze some nor m of t he vect or of t he t r uncat i on error, coefficients of t he
l eadi ng t e r m of t he local error. Thi s is all somewhat vague, but t he appr oach can be i nt er pr et ed
Runge-Kutta (4,5) Pair 19
ri gorousl y as mi ni mi zi ng (t o l eadi ng order) a bound on t he local er r or [11]. Ot her measures of
qual i t y involve hi gher-order t erms, and t hei r size is measur ed in t he same way. Like Dor mand
and Pr i nce, we use a Eucl i dean nor m, hence, concern ourselves wi t h
Ot her aut hor s have used different norms in t hi s cont ext , but it seems t o ma t t e r little, provi ded
t ha t t hey are used consistently.
When an expl i ci t Runge- Kut t a met hod is appl i ed t o t he t est equat i on y' -- Ay wi t h st ep size h,
9,~+1 = P( z ) gn wher e z = Ah. When Re(A) < 0, t he equat i on is st abl e. The Runge - Kut t a
me t hod is also st abl e in t ha t por t i on of t he compl ex pl ane where Re(A) <_ 0 and IP(z)] < 1, t he
absol ut e st abi l i t y regi on of t he met hod. For a met hod of or der p, t he st abi l i t y condi t i on can be
wr i t t en in t er ms of t he coefficients defining t he formul a as
zJ + Z wj z j <1,
-~" j=p+ l
' , ~ o )
wher e
1
W j = T(r~ ) + ~. = ~ " ' " b m , a m l , m 2 a m 2 , m 3 " " a m ~ _ 2 , m j _ 1 Cmj _ 1 .
Vnl =l mj - l =l
I t t ur ns out t hat in t he case of t he si xt h- or der formul as of seven stages consi dered, t he onl y
undet er mi ned quant i t y in (10) is 727, and this quant i t y has t he simple form
53 (1 - 353)
'~7 = 720 (15532 - 1063 + 1)'
Not e t ha t w7 depends onl y on one of t he four free par amet er s available in t he si xt h- or der formul a.
Searchi ng among t he values of 63 we found t hat if wT ~ 1/ 5040 (63 ~ 2/ 9 or 63 ~ 1/ 4), t hen on
an equal cost basis (rescaling t he region by a fact or of 6/ 7) , t he st abi l i t y region is al most exact l y
t he same as t hat of t he fi ft h-order formul a of DP5(4)7M, except t ha t near t he i magi nar y axis it
is somewhat bet t er . Thi s was an i mpor t ant resul t since it gave us a good reason t o t hi nk t hat
we coul d find a mor e accur at e formul a t han t hat of Dor mand and Pri nce, whi ch is of at least
compar abl e stability. Wi t h si mpl i ci t y of coefficients in mi nd, we f ur t her i nvest i gat ed t he t wo
possibilities 63 = 2/ 9 and 63 = 1/4. A search for par amet er s t ha t mi ni mi ze T7 led t o choosing
t he f or mer val ue al ong wi t h 52 = 1/ 6, 65 = 2/ 3, and 66 = 3/4. These values cor r espond t o
T7 ~ 2.133 x 10 -4.
3. THE BS(4,5) PAIR
With a stable and accurate sixth-order formula, we can consider "spoiling" it to obtain a fifth-
order formula, and furthermore, developing a companion fourth-order formula for the control of
error. The pair of our choice is presented in the subroutine CONST of [17]. In this section, we
discuss the criteria we considered in developing the new pair and some of its properties.
The major objectives we had in mind when looking for a fifth-order formula were that:
(i) its accuracy had to be significantly better than that of DP5(4)7M, and
(ii) its absolute stability region had to be comparable.
An important associated task is to provide an interpolant. It is a little awkward to discuss
this issue. Although we have chosen to describe interpolation in a separate section, it is not
independent of the construction of the basic pair--we considered other pairs with nearly the
2 0 P. B O G A C K I A N D L. F. S H A M P I N E
same pr oper t i es t ha t we di scarded because t hey were less well sui t ed t o i nt erpol at i on. One of t he
mi nor goals consi dered mi ght be ment i oned at t hi s poi nt ; we want ed t o avoid large coefficients.
The quant i t y D -- max( [ ai j I , I/hi, Ibil, Icil) di spl ayed in Tabl e 1 for t he t hr ee pai rs shows t ha t
we were qui t e successful in t hi s respect .
Al t hough t he goals (i) and (ii) seem st r ai ght f or war d, t he first involves f undament al issues of
quality. We cannot use T6 al one t o measure how well goal (i) is satisfied, because it can be made
ar bi t r ar i l y small. The difficulty caused by an ext r emel y small val ue of T6 is t ha t t he l eadi ng t er m
of t he t r uncat i on er r or t hen domi nat es onl y for ver y small st ep sizes h; for all pract i cal purposes
t he f or mul a is of si xt h-order. To reveal t hi s si t uat i on, we exami ne mor e t han t he l eadi ng t er m
in t he t r uncat i on er r or expansi on. We concent r at ed on t he r at i o 97/ 96, whi ch we insist not
t o be t oo large, so t ha t t he formul a is genui nel y of fifth-order. I t is necessary t o speci fy an
accept abl e val ue for t hi s rat i o, and we chose t o do t hi s by adopt i ng t he cor r espondi ng val ue for
DP5( 4) 7M, namel y 9.9. Our fi ft h-order formul a has 97/ 96 ~ 9.6. Still hi gher-order t er ms were
also i nvest i gat ed. Tabl e 1 displays 9s and T9, for all t hr ee pairs. For our pai r, t hese quant i t i es are
si mi l ar in size t o 97, whi ch we t ake t o mean t hat t he size of t he l eadi ng t er m 96, is a reasonabl e
measur e of accur acy of t he new formula.
Table 1. A comparison of three Runge-Kut t a pairs of orders 5 and 4.
s ~'6 ~'7 T8 T9 B2 C2 D
BS(4,5) 7 .000022 .00021 .00035 .00042 1.27 1.19 1.16
DP5(4)TM 6 .00040 .0040 .0043 .0042 1.54 1.67 11.6
F(4,5) 6 .0034 .0068 .0081 .0080 3.16 1.36 8.00
The f or mul a pr esent ed in [17] has T6 ~ 2.22 x 10 - 5, as compar ed t o 9 DR ~ 3.99 x 10 -4
and 9 F ,~ 3.36 x 10 - 3. Here we use "DP" and "F, " t o i dent i fy quant i t i es associ at ed wi t h t he
DP5( 4) 7M and F(4, 5) pairs, respectively. One way of compar i ng t he efficiency of formul as is
t o compar e t he st ep sizes t ha t woul d yield a given accur acy c, t aki ng t he cost of each st ep i nt o
account (cf. [6], wher e t hi s is referred t o as t he "second measur e of efficiency"). As we have
observed, t he Tayl or series expansi on (6) shows t hat t he errors behave in a di fferent way not
j ust because t he t r uncat i on er r or coefficients are different for t he formul as consi dered, but also
because t hese coefficients are wei ght ed by t he pr obl em- dependent el ement ar y differentials. To
make it possible t o compar e t he formul as' efficiency wi t hout havi ng t o refer t o a specific probl em,
it is convent i onal l y assumed t ha t "on average" t he errors are pr opor t i onal t o t he nor ms of t he
l eadi ng local t r uncat i on er r or coefficients: 96, 9 B, and 9 E for t he met hods consi dered here.
Thi s assumpt i on implies t ha t t he st ep size yielding t he accur acy e is pr opor t i onal t o (e/ 96) 1/6,
( e / T D P ) 1 / 6 , and ( e / TF) 1/6, respectively. I t was st at ed in [6] t hat t he rat i o of st ep size per uni t
cost for DP5( 4) TM and F(4, 5) is
9gp/ 1.4a,
whi ch shows a large gai n in efficiency for t he formul a of Dor mand and Pri nce, compar ed t o t he
one of Fehl berg. Thi s gai n has been confi rmed in numeri cal tests, and t he DP5( 4) TM pai r has
become wi del y accept ed as t he most effective pai r at t hese orders. Compar i ng our pai r t o t he
Dor mand- Pr i nce pai r in t he same way aft er scaling for equal cost, we find
( 9 ~ P ~ 1/6
(11)
Whe n accur acy det er mi nes t he st ep size, as it usual l y does, t hi s r ough compar i son suggests an
i mpr ovement over DP5(4)TM compar abl e t o t he i mpr ovement t ha t DP5( 4) 7M offers over F(4, 5).
Runge-Kutta (4,5) Pair 21
I n cons t r uct i ng t he fi ft h-order f or mul a of [17], we were abl e t o r et ai n t he st abi l i t y pr oper t i es
of t he si xt h- or der f or mul a used as a s t ar t i ng poi nt , but we were not abl e t o i mpr ove t hem. The
absol ut e st abi l i t y regi on is defi ned by (10) wi t h
17291 269
w6 - and w7 - - -
12418560 1379840
Whe n scal ed for equal cost, t he regi on closely mat ches t ha t of t he fi ft h-order f or mul a of Dor ma nd
and Pri nce, for mos t angl es arg(A) in t he second and t hi r d q u a d r a n t s - - t h e r adi us is never smal l er
by mor e t ha n 2%, and ma y be gr eat er by as much as 4%. Thi s is t he si t uat i on for mos t angles,
but near t he i magi nar y axis, t he new f or mul a is much be t t e r (up t o a bout 40%). The regi ons are
so si mi l ar t ha t a pl ot cont r ast i ng t he m is not helpful.
We now pr oceed t o t he const r uct i on of t he f our t h- or der compani on used for er r or est i mat i on.
Havi ng al r eady chosen t he val ues c~ and ai , j , onl y one degree of f r eedom r emai ns for t he det er -
mi nat i on of bl, b3, b4, b5, and b6. ( Const r ai nt s on t he f ami l y requi re t ha t b2 = 0 and b7 =/~7 .)
Pr i nce and Dor ma nd [25] list some measur es of qual i t y for t he compani on and t he er r or est i ma-
t or. J us t as wi t h t he fi ft h-order formul a, we want t o avoi d a l arge val ue of B2 = T6/T5. As we
obser ved earl i er, a l arge val ue means t ha t t he l eadi ng t e r m in t he t r uncat i on er r or domi nat es
onl y for ver y smal l st ep sizes. I t is t hi s l eadi ng t e r m t ha t is es t i mat ed for t he cont rol of error, so
when B2 is l arge, we ant i ci pat e t ha t t he error es t i mat e mi ght be unrel i abl e when t he s t ep size is
(5) r~5)
not ver y smal l . The quant i t y T5 measur es onl y t he general size of t he coefficients T 1 . . . . , .
I f one of t he coefficients shoul d vani sh, t her e would be a class of pr obl ems for whi ch t he l eadi ng
t e r m of t he t r uncat i on er r or vani shes and t he f or mul a is of or der five. Obvi ousl y, we mus t avoi d
zero coefficients, but we went f ar t her and a t t e mpt e d t o make t he coefficients all of a bout t he s ame
size so t ha t t he f or mul a woul d have a uni f or m behavi or. To assess t hi s we comput ed t he r at i o of
t he l ar gest irk(5) I t o t he smal l est . The val ue of 18 for t he BS(4, 5) pai r is r at her be t t e r t ha n t he
val ue of 64 for F(4, 5), and 74 for DP5(4)TM; t hi s gives us reason t o hope t ha t i t s behavi or will be
a l i t t l e mor e uni form. The er r or es t i mat e i t sel f has a Tayl or series expansi on t ha t we obt ai n f r om
t he di fference of t he expansi ons of t he local t r uncat i on er r or for t he t wo formul as. The quant i t y
2 0 [ 4 0 _ 6 / 1 2
E ~ = , - ~k j
0 2 - - - -
%
meas ur es t he domi nance of t he l eadi ng t e r m of t he er r or in t he expansi on of t he es t i mat e. A
l arge val ue of 6'2 i mpl i es t ha t t he er r or es t i mat e mi ght be unrel i abl e when t he st ep size is not
ver y smal l .
The cr i t er i a l i st ed so far still leave us wi t h a lot of freedom, especi al l y when deci di ng how
accur at e we want t o make t he f our t h- or der formul a. Al t hough t hese cr i t er i a pr event us f r om
mi ni mi zi ng t he l eadi ng er r or t er m, t her e is no l i mi t at i on wi t h r espect t o i ncreasi ng it. I f we make
it "l arge, " we get a smal l val ue of B2 and a l eadi ng t e r m in t he t r uncat i on er r or expansi on t ha t
s t r ongl y domi nat es subsequent t er ms. We have al r eady descri bed t hi s as desi rabl e, and now we
need t o expl ai n why it shoul d not be carri ed t o an ext r eme. Ther e are t wo c ommon ways of
meas ur i ng efficiency t ha t are di scussed in [6]. We have ment i oned compar i ng t he s t ep sizes t ha t
woul d yi el d a gi ven accur acy e, t he "second measur e of efficiency." The "first measur e" compar es
t he l ar gest s t ep sizes t ha t woul d sat i sfy a t ol er ance of e on t he local error. Thes e meas ur es are
di fferent when local ext r apol at i on is done. The accur acy achi eved is det er mi ned by t he f or mul a
used t o advance t he st ep, t he fi ft h-order f or mul a when local ext r apol at i on is done. The local er r or
cont r ol l ed is t h a t of t he l ower-order formul a, t he f our t h- or der formul a. Whe n B2 is except i onal l y
smal l , t he ot her cr i t er i a i mpl y t ha t t he fi ft h-order f or mul a is ver y much mor e accur at e t ha n t he
f our t h- or der formul a. Used in local ext r apol at i on mode, t hi s i mpl i es t ha t t he er r or of ~)n+l is
ver y much smal l er t ha n t he er r or t ol erance. A pai r of Zonnevel d [26] is shown by Shampi ne and
2 2 P. BOGACKI A N D L. F. SHAMPINE
Wat t s [6] t o behave in j ust t hi s way. It is preferabl e t o have a closer connect i on bet ween t he
i nput t ol er ance and t he accur acy achieved. Dependi ng on how efficiency is measured, a ver y
smal l val ue of B2 can mean an inefficient pair. Indeed, it has been argued [6] t ha t t he DPS( 4) 7M
pai r is undul y conservat i ve in t hi s regard. Despi t e t hi s ar gument , in our search for a f our t h- or der
formul a, we insisted t hat our pai r have t he same rel at i on t o DP5( 4) 7M in bot h measures of
efficiency. Thus, we insisted t ha t
whi ch requi res t ha t we const r uct our f our t h- or der f or mul a so t ha t
1 . 0 6 1 0 - ' . ( 1 2 )
Th e final sel ect i on of t he f our t h- or der formul a coefficients was made t aki ng t he st abi l i t y prop-
ert i es i nt o account . In local ext r apol at i on mode it is not cruci al t o make t he l ower-order f or mul a
ver y st abl e, but it is desi rabl e t o mat ch t he regions r easonabl y well. The st abi l i t y regions of t he
f our t h- and fi ft h-order formul as of our pai r are al most identical.
The f our t h- or der f or mul a discussed here provi des an er r or est i mat e of high quality, wi t hout
requi ri ng any f unct i on eval uat i ons beyond t hose al r eady needed for t he fi ft h-order formul a. How-
ever, t he const r ai nt b7 = b7 implies t ha t t he er r or est i mat e Yn+l - ~)n+l depends on f unct i on
eval uat i ons at cl , c3, c4, e5 and c6, which range from 0 t o 0.75, but not at c7 = 1. I f t he sol ut i on
shoul d have a shar p change bet ween xn + 0.75h and t he end of t he st ep, t hi s mi ght not be "no-
t i ced" by t he er r or est i mat e. The ma t t e r is much mor e serious when solving stiff pr obl ems [27]
because quasi di scont i nui t i es are not unusual in t ha t cont ext . Still, we woul d like our met hod t o
be r obust in t he presence of di scont i nui t i es in f , and as was observed by Gol l wi t zer, t he present
er r or est i mat e can be decei ved t hen. To enhance t he robust ness of t he met hod, we deci ded t o
suppl ement t he pai r wi t h an addi t i onal f our t h- or der formula,
Yn+i =y n+h( ~- ' ~bi k i +bs f ( x n+l ' ~) n+i ) ) ' i = 1
and a cor r espondi ng er r or est i mat e t hat t akes account of t he sol ut i on at t he end of t he step.
Because t he BS(4, 5) pai r is not itself FSAL, we have at our disposal t he first eval uat i on of t he
next st ep for t hi s purpose. Not i ce t ha t here we must speci fy t ha t local ext r apol at i on is t o be
done. Whe n sel ect i ng t he values of bi (see [17]), we were gui ded by t he same cr i t er i a as t hose
consi dered dur i ng t he sel ect i on of t he values b~. In part i cul ar, t he t r uncat i on er r or coefficients of
t he new f or mul a also s at i s f y (12), wi t h bot h rat i os B2 and C2 appr oxi mat el y equal 1.04. Also,
t he st abi l i t y regi on of t he formul a closely mat ches t hose of t he ot her formul as devel oped here.
As i mpl ement ed in RKSUI TE, two er r or est i mat es are formed at ever y st ep. The first er r or
es t i mat e is yn+l - ~n+l. I f t he est i mat ed er r or is t oo large, t he st ep is rej ect ed and t hi s est i mat e
is used for t he sel ect i on of a st ep size for anot her try. I f t he first er r or t est is passed, t he st ep is
compl et ed and t he second er r or est i mat e, Yn+I - ~n+l , formed. The st ep is accept ed or r ej ect ed
and t he next st ep size sel ect ed using t hi s est i mat e. As always wi t h FSAL, a failed st ep cost s a
f unct i on eval uat i on, but t hi s is even less likely t han usual for t he BS(4, 5) met hod because for a
s moot h pr obl em, a failed st ep is al most cer t ai n t o be recognized by t he first est i mat e.
4. I NT E RP OL AT I ON
We now wish t o const r uct a fami l y of formulas dependi ng on a par amet er a such t ha t t he re-
sul t Yn+a appr oxi mat es y(xn+a) where xn+q = Xn + ah. I t is permi ssi bl e for xn+a t o lie out si de
Runge-Kutta (4,5) Pair 23
t he i nt erval [xn, Xn+l], but t he f or mul a is usual l y much less accur at e t hen, so we r est r i ct our at -
t ent i on t o 0 < a < 1. Pr ovi di ng for "i nt erpol at i on" compl i cat es consi derabl y t he devel opment of
Runge - Kut t a met hods, and t her e are a number of quest i ons about t he goals and compromi ses t ha t
must be made. When we deri ved t he BS(2, 3) pai r [28], we found t ha t t he "nat ur al " i nt er pol ant
has a r emar kabl e propert y. Namely, t o l eadi ng or der t he rel at i ve accur acy of t he i nt er medi at e
resul t s is independent of t he probl em. More precisely, t he accur acy at Xn+a is r el at ed t o t he local
er r or cont rol l ed by t he code in a known way t ha t is i ndependent of t he probl em, and t he er r or is
never worse t ha n t he local er r or cont rol l ed at each step. Along wi t h its i nt er pol ant , t he BS(2, 3)
me t hod provi des a C 1 [a, b] sol ut i on t ha t can be subst i t ut ed i nt o t he differential equat i on t o define
its resi dual , or defect. Hi gham [14] shows t ha t if a Runge- Kut t a met hod has a C 1 i nt er pol ant
t ha t has an er r or i ndependent of t he probl em, it is possible t o derive a robust , i nexpensi ve cont rol
of t he defect . In t hi s section, we deri ve an i nt er pol ant for t he BS(4, 5) pai r wi t h pr oper t i es similar
t o t ha t of t he BS(2, 3) pair. Indeed, we go much f ur t her here because t he i nt er pol ant mai nt ai ns
t he accur acy of t he hi gher-order resul t of t he pair. RKSUI TE i mpl ement s t hr ee pai rs of formul as
of whi ch onl y t wo have i nt erpol ant s, namel y BS(2, 3) and BS(4, 5). Thi s is t he onl y maj or expl i ci t
Runge - Kut t a code wi t h i nt er pol ant s t o which Hi gham' s appr oach t o er r or cont rol is applicable.
One issue t o be addressed in t he const r uct i on of i nt er pol ant s is how smoot hl y t he i nt er pol ant
for one i nt erval connect s wi t h t hose of adj acent intervals. The fami l y of formul as is const r uct ed
f r om t he st ages formed in t aki ng t he st ep from xn t o xn + h wi t h t he pai r (34), and possi bl y
addi t i onal st ages t ha t resul t in a t ot al of s* stages. The member cor r espondi ng t o a is
8"
= 9 . + o h ( 13)
i =1
Her e t he k~ are defi ned as in (5), except for t he indices i r unni ng from s + 1 t o s*. The i mpor t ant
poi nt is t ha t none of t he stages depends on a, so t ha t t he cost in eval uat i ons of f of const r uct i ng
t hi s f ami l y is i ndependent of t he number of poi nt s xn+~ at whi ch answers are desired. By
r est r i ct i ng t he bi (a) of (13) t o be pol ynomi al s of degree at most 5, t he ri ght hand side of (13) is
a pol ynomi al in a, and we shall descri be it as t he "i nt er pol ant " for t he pair. Just as wi t h (6), for
a specific a t he local er r or of t he formul a (13) can be expanded as
% ( a) n (j . (14)
j = l ~,k=l
For t he i nt er pol ant (13) t o be of or der p*, t he t r uncat i on er r or coefficients ~-(J) ' k (a) have t o sat i sfy
t he appr opr i at e equat i ons of condi t i on
~(J)(a) = 0, k = 1 , 2 . . . . , r j , j = 1 , 2 , . . . , p * , (15)
whi ch are r el at ed in a simple manner t o (8), cf. [12].
I t has become general l y accept ed t hat t he i nt er pol ant shoul d be gl obal l y C 1. To accompl i sh
t hi s, it is obvi ousl y necessary t ha t t he slope at t he end of t he st ep be i ncl uded among t he ext r a
st ages
ks = f ( Xn +i , Yn+l ) ,
(hence, cs =: 1, and as,i = bi for i = 1, 2 , . . . , 7). Just as wi t h t he FSAL t echni que, t hi s st age
is "free" when t he i nt egr at i on is cont i nued because it is t he first st age of t he next st ep. One
difference, t hough, is t ha t i nt er pol at i on is onl y done aft er a successful st ep, so t her e is no wast e
on failed st eps as wi t h FSAL. For t he i nt er pol ant t o be globally C 1, t he pol ynomi al s bi (a) must
sat i sfy [29]
bi(1) =/ h , (16)
$ , + =
wher e 6i j is t he usual Kr onecker del t a, and bi = 0 for i = 8 , . . . , s*.
24 P. BOGACKI AND L. F. SHAMPINE
Nat ur al l y, we do not want t o add any mor e st ages t ha n necessar y t o do i nt er pol at i on, but we
shoul d not be t oo concer ned a bout t he cost of ext r a st ages: e xt r a st ages are f or med onl y on st eps
wher e i nt er pol at i on is done, and it is not likely t ha t t her e will be a l arge number of such st eps.
Fur t her , t he e xt r a st ages ar e f or med onl y once per st ep, regardl ess of t he numbe r of i nt er pol at i ons
t o be done at poi nt s in t he s pan of t he st ep. I t is nat ur al t o ask, what is t he smal l est numbe r
of e xt r a st ages t h a t will pr ovi de an i nt er pol ant of accept abl e qual i t y? I t t ur ns out t ha t wi t h no
e xt r a st ages, t he hi ghest - or der possi bl e is four. Some aut hor s favor i nt er pol ant s of t hi s or der of
accur acy for gener al use wi t h a (4,5) pai r. Al t hough we favor or der five because we want t o r el at e
t he accur acy of t he i nt er pol ant t o t he accur acy of t he resul t used t o advance t he i nt egr at i on, we
have der i ved a "free" f our t h- or der i nt er pol ant for use when t he accur acy of i nt er medi at e sol ut i on
val ues is not cri t i cal (for det ai l s see [30]).
Addi ng a ni nt h st age t o t he pai r in [17] per mi t s t he der i vat i on of fi ft h-order i nt er pol ant s.
Unf or t unat el y, t he accur acy of t hese i nt er pol ant s is not ver y good. When t he f or mul as have t he
s ame or der p, t he accur acy of t he f or mul a pr oduci ng ~)n+= can be compar ed t o t ha t of t he basi c
f or mul a pr oduci ng Yn+l in t he convent i onal way. Thus, we i nt r oduce
~k=l
and l ook at i b6(a)/ T6 t o assess t he accur acy of t he i nt er pol ant . The er r or of Y n - I - 1 is es t i mat ed and
t he s t ep r ej ect ed if t hi s er r or is bi gger t ha n a specified t ol erance. The st ep size is t hen adj ust ed
so t h a t t he pr edi ct ed er r or of t he next t r y will be smal l er t han, but compar abl e t o, t he t ol er ance,
and t he s t ep is r epeat ed unt i l it succeeds. By r el at i ng t he accur acy of t he i nt er pol at ed val ue Yn+~
t o t h a t of an accept ed sol ut i on yn+l , we can assess t he accur acy at poi nt s i nt eri or t o t he s pan
of t he st ep. For t hi s r eason we do not want t o have a r at i o t ha t is much bi gger t ha n 1 for any a
in [0, 1]. Ther e is no poi nt bei ng t oo fast i di ous a bout t hi s t hough, because t he way we compar e
accur acy is ver y rough, and t he rel at i ve accur acy cer t ai nl y depends on t he pr obl em. Wi t h s* -- 9
we wer e abl e t o cons t r uct i nt er pol ant s for whi ch
[ e 6 ( o ) ]
ma x
O<a<l ~%6
is a bout 12, and t hi s is t he best t ha t can be done. Wi t h s* = 10 t he mos t accur at e i nt er pol ant s
we f ound have a r at i o of about 3. We di d not consi der t hese i nt er pol ant s t o be suffi ci ent l y
accur at e, hence, r esor t ed t o s* -- 11 t o get a sat i sf act or y i nt er pol ant . Wi t h t hi s ma n y st ages we
can make an i mpor t a nt qual i t at i ve i mpr ovement in t he i nt er pol ant t ha t we expl ai n in a moment .
Consi der i ng t he numbe r of st ages requi red t o get an accept abl e i nt er pol ant wi t h t he ot her pai r s
and t he ext r a st age we have at our di sposal , it was sur pr i si ng t o us t ha t so ma n y e xt r a st ages
a ppe a r e d t o be necessary. We a t t r i but e t hi s t o t he gr eat er demands pl aced on t he accur acy of
t he i nt er pol ant by t he ext r emel y smal l t r uncat i on er r or coefficients of our fi ft h-order formul a.
We woul d descr i be an "ideal" i nt er pol ant as one for whi ch
[l~9,~+~-u(x. ~h)ll<_ll~9,~+x-u(x,~ h)ll, for all 0 < a < 1.
( 1 7 )
Besi des t he obvi ous wi sh for accur at e appr oxi mat i ons, t hi s pr ope r t y means t ha t t he usual cont rol
of t he er r or at t he end of t he s t ep cont rol s t he er r or of t he i nt er pol ant as well. I t seems unl i kel y
t h a t (17) coul d hol d for all pr obl ems and all h, but t her e ar e exampl es for whi ch it is t r ue as ymp-
t ot i cal l y, one of whi ch is BS(2, 3) [11]. Consi der i ng t he cr udi t y of t he convent i onal compar i s on of
r el at i ve accuracy, we consi der t hi s t o be a ver y desi rabl e pr oper t y. None of t he i nt er pol ant s for
R u n g e - K u t t a ( 4 , 5 ) Pair 25
F(4, 5) or DP5( 4) TM have it. For (17) t o hol d t o l eadi ng or der it is necessary t ha t
= (18)
: i '
wher e p(a) is a scal ar funct i on of a such t ha t I p ( a ) l _< 1 for 0 < a < 1. We found t ha t wi t h
s* = 11, it is possible t o const r uct an i nt er pol ant for t he BS(4, 5) pai r t ha t does sat i sfy (17) t o
l eadi ng order. Even mor e is t r ue; t he er r or of ~)n+a is, t o l eadi ng order, preci sel y [p(a)l t i mes
t he er r or of 9n+z, and we know what p(a) is. The i nt er pol ant wi t h s* = 11 is pr esent ed in t he
s ubr out i ne CONST of [17]. Recall t ha t t he quant i t y D pr esent ed in Tabl e 1 is a bound on t he
magni t ude of t he coefficients defining t he basic pair. The i nt er pol ant was const r uct ed so t ha t
t he coefficients bi ( a) of (13) defining t he i nt er pol at ed val ue Yn+~ sat i sfy t he same bound D. The
quant i t y p(a) is pl ot t ed in Fi gur e 1, wher e it can be seen t ha t t he l eadi ng t er m of t he er r or has
a ver y s moot h behavi or t hr oughout t he st ep. Not e t ha t p(a) does not vani sh on (0, 1); if it did,
t he fi ft h-order i nt er pol ant woul d degener at e t her e t o a formul a of or der six.
1.2
I I I I
0.8
p(e) 0 . 6
0.4
0.2
0 1 / I I I I
0 0.2 0.4 0.6 0.8
a
Figure 1.
Thr oughout t hi s i nvest i gat i on we have been caut i ous about t he assumpt i on t ha t t he l eadi ng
t e r m domi nat es in t he t r uncat i on er r or expansi on. To assess t he effect of hi gher-order t er ms we
r esor t t o t he cr ude compar i son of accur acy in t er ms of t he rel at i ve sizes of t r uncat i on er r or co-
26 P. BOCACI<I AND L. F. SHAMPINE
efficients. Specifically, we consi dered t he sevent h-order t er ms by exami ni ng t he r at i o ~ ' 7 ( a ) l T 6 ( a ) .
The val ue of t hi s r at i o at a -- 1 is det er mi ned by t he basic pair; it is about 9.6. We woul d like
t he r at i o t o be, not much l arger for 0 < a < 1. A numeri cal i nvest i gat i on revealed no val ue of a
wher e i t is bigger t han 9.6. Thi s increases our confidence t ha t t he i nt er pol at ed val ue shoul d be
at l east as accur at e in t he span of t he st ep, as t he resul t at t he end of t he st ep.
5. NUME RI CAL T E S T S
We believe t ha t under st andi ng of t he qual i t y of Runge- Kut t a formul as has progressed t o t he
poi nt t ha t t he t heor et i cal measures consi dered in t he const r uct i on of our pair, do i ndi cat e how
formul as will per f or m in pract i ce. Of course, we cl ai m onl y t hat a r ough assessment of rel at i ve
efficiency is pr ovi ded by t he t heory. Because efficiency depends on t he pr obl em and t he qual i t y of
t he i mpl ement at i on of t he formulas, we consi der t he role of numeri cal t est s t o be a conf i r mat i on
of t he t heor et i cal predi ct i ons. We r epor t here t wo subst ant i al sets of exper i ment s t ha t are ent i r el y
consi st ent wi t h our predi ct i ons.
We carri ed out one set of exper i ment s ourselves [31]. I t is general l y accept ed t ha t F(4, 5) is
si gni fi cant l y less efficient t han DP5(4)7M, so we compar ed t hese t wo pai rs at t he same t i me t ha t
we compar ed t he Dor mand- Pr i nce pai r t o our own. The fact t ha t t he compar i son of F(4, 5) t o
DP5( 4) 7M is consi st ent wi t h a consi derabl e body of experi ence increases our confi dence in t he
numer i cal compar i son of DP5(4)TM t o BS(4, 5). We used t wo sets of probl ems. Six pr obl ems
f r om [32], II.10 make up one set. The second pr obl em in t hi s set is t he t wo body pr obl em wi t h
eccent r i ci t y 0.5. The t wo body pr obl em wi t h eccent ri ci t i es 0.1, 0.3, 0.5, 0.7, and 0.9 f or m an
i mpor t ant fami l y in t he nonst i ff DETEST t est set of [1], so we added t he ot her eccent ri ci t i es as a
second set of t est probl ems. We modi fi ed t he RKF45 code of Wat t s and Shampi ne [15] so t ha t any
one of t he Fehl berg, Dor mand- Pr i nce, or Bogacki -Shampi ne pai rs mi ght be used. Wi t h each pai r
all t he pr obl ems were i nt egr at ed wi t h a pur e absol ut e er r or cont rol for t ol erances 1 0 - 3 , . . . , 10 -12.
The maxi mum nor m of t he er r or at t he end of t he i nt erval of i nt egr at i on was comput ed using
"exact " values obt ai ned wi t h a hi gh-order Runge- Kut t a pair, and a t ol er ance of 10 -14. Pl ot s of
t he efficiency of sol ut i on are found in [31]. To rel at e t he comput at i ons t o t he t heory, we want
t he r el at i ve cost of achi evi ng a given error. Because t he er r or achieved is not t he same as t he
t ol er ance i nput , we had t o i nt er pol at e t he da t a gat her ed t o det er mi ne t hese costs. Thi s present s
some difficulties at bot h ext r emes of t he range of t ol erances, because all t hr ee pairs had t o achi eve
t he accur acy i f we were t o comput e t he rel at i ve costs. Tabl e 2 present s t he mean of t he rel at i ve
cost s for all t he t ol erances wher e t he comput at i ons were meani ngful , and t he s t andar d devi at i on
of t hese cost s for t he first set of probl ems. We would ant i ci pat e t ha t t he rel at i ve efficiency of
t wo pai rs depends on t he pr obl em solved, but onl y weakl y on t he accur acy achi eved for a given
probl em. As expect ed, t her e is an er r at i c dependence on t he accuracy, especi al l y at t ol er ances for
whi ch t he absol ut e cost is small so t ha t a difference of even one st ep affects t he results. Theor et i cal
ar gument s and comput at i onal exper i ence say t ha t t he DP5( 4) 7M is significantly mor e efficient
t ha n F(4, 5). The same t heor y says t ha t BS(4, 5) is about equal l y mor e efficient t han DP5(4)7M.
The numer i cal resul t s of Tabl e 2 are consi st ent wi t h t hese predi ct i ons.
The ver y subst ant i al t est s of Kr aut [16] had a different goal. By t he t i me of her t est s t he BS(4, 5)
pai r had been i mpl ement ed, al ong wi t h a (2,3) pai r and a (7,8) pair, in a sui t e of pr oduct i on-
gr ade Runge - Kut t a codes called RKSUI TE [17-19]. Her goal was t o compar e RKSUI TE t o t he
expl i ci t Runge- Kut t a codes of t he wi del y-used IMSL [21], NAG [20], and SLATEC [33] libraries.
As it happens, t he code in t he SLATEC l i br ar y is a vari ant of t he RKF45 code used in our t est s.
Kr a ut used t he pr obl ems of our t wo t est sets plus a di scont i nuous pr obl em from [1], and t wo
st i ff pr obl ems from t he stiff DETEST t est set [34]. The last probl ems were added t o t hose we
used so as t o i nvest i gat e how well t he codes r esponded t o difficulties. She used a wi der r ange of
t ol erances, par t l y t o i nvest i gat e how well t he codes cope wi t h cr ude t ol erances and ver y st r i ngent
t ol erances. Kr a ut also i nvest i gat ed t he effectiveness of i nt er pol at i on in t he codes t ha t have t he
Table 2.
BS(4,5).
Runge-Kutta (4,5) Pair
Relative cost to achieve a given accuracy with F(4,5), DP5(4)7M, and
Problem nfeF / nf eD P nfeD P / nf eBS
mean std mean std
Jacobian elliptic functions
Two body problem
van der Pol equation
Brusselator
Hanging string
Pleiades
1.37 0.09 1.57 0.07
1.48 0.06 1.45 0.42
0.97 0.16 1.55 0.08
1.55 0.11 1.95 0.21
1.28 0.02 1.80 0.26
1.27 0.18 1.11 0.06
27
capability. The various codes implement formulas of different orders, so Kraut drew conclusions
for three ranges of tolerances. Full details of her tests can be found in [16]. Here it will suffice
to quote her conclusion that "For moderate accuracy requests the BS(4,5) pair is more efficient
than the corresponding codes in the NAG, SLATEC, and IMSL libraries . . . . No code without
an interpolation capability, and no formula pair like the PD(7,8) pair in RKSUITE can compete
with pairs t hat do have this capability, like the BS(2,3) and BS(4,5) pairs, when dense output is
required." Subsequently RKSUITE was added to the IMSL library and it replaced the explicit
Runge-Kutta code of the NAG library.
R E F E R E N C E S
1. T.E. Hull, W.H. Enright, B.M. Fellen and A.E. Sedgwick, Comparing numerical methods for ordinary differ-
ential equations, S I AM J. Numer. Anal. 4, 603-637, (1972).
2. E. Fehlberg, Klassische Runge-Kutta-Formeln vierter und niedriger Ordnung mit Schrittweiten-Kontrolle und
ihre Anwendung auf Wiirmeleitungsprobleme, Comput i ng 7, 61-71, (1970).
3. L.F. Shampine, Local extrapolation in the solution of ordinary differential equations, Math. Comp. 27, 91-97,
(1973).
4. L.F. Shampine, H.A. Watts and S.M. Davenport, Solving nonstiff ordinary differential equations--The state
of the art, S I AM Revi ew 18, 376-411, (1976).
5. J.R. Dormand and P.J. Prince, A family of embedded Runge-Kutta formulas, J. Comp. Appl. Math. 6, 19-26,
(1980).
6. L.F. Shampine, Some practical Runge-Kutta formulas, Math. Comp. 46, 135-150, (1986).
7. P.W. Sharp and E. Smart, Explicit Runge-Kutta pairs with one more derivative evaluation than the minimum,
S I AM J. Sci. Comput. 14, 338-348, (1993).
8. M.K. Horn, Fourth- and fifth-order, scaled Runge-Kutta algorithms for treating dense output, S I AM J.
Numer. Anat. 20, 558-568, (1983).
9. W.H. Enright, K.R. Jackson, S.P. Ncrsett and P.G. Thomsen, Interpolants for Runge-Kutta formulas, A CM
Trans. Math. Soft. 12, 193-218, (1986).
10. L.F. Shampine, Interpolation for Runge-Kutta methods, S I AM J. Numer. Anat. 22, 1014-1027, (1985).
11. I. Gladweil, L.F. Shampine, L. Baca and R.W. Brankin, Practical aspects of interpolation in Runge-Kutta
codes, S I AM J. Sci. Star. Comput. 8, 322-341, (1987).
12. J.R. Dormand and P.J. Prince, Runge-Kutta triples, Computers Math. Applic. 12A (9), 1007-1017, (1986).
13. M. Calvo, J.I. Montijano and L. Randez, New continuous extensions for the Dormand and Prince l=tK method,
In Comput at i onal Ordinary Differential Equations, (Edited by J.R. Cash and I. Gladwell), pp. 135--144,
Clarendon Press, Oxford, U.K., (1992).
14. D.J. Higham, Robust defect control with Runge-Kutta schemes, S I AM J. Numer. Anal. 26, 1175-1183,
(1989).
15. L.F. Shampine and H.A. Watts, Practical solution of ordinary differential equations by Runge-Kutta methods,
Rept. SAND 76-0585, Sandia National Laboratories, Albuquerque, NM, (1976).
16. G.L. Kraut, A comparison of RKSUITE with Runge-Kutta codes from the NAG, SLATEC, and IMSL
libraries, Math. Dept., Southern Methodist University, Dallas, TX, (1991).
17. RKSUITE: ht t p: / / ~, net ] l b. or g/ ode / r ks ul t e / .
18. R.W. Brankin, I. Gladwell and L.F. Shampine, RKSUITE: A suite of Runge-Kutta codes for the initial value
problem for ODEs, Softreport 91-1, Math. Dept., Southern Methodist University, Dallas, TX, (1991).
19. R.W. Brankin, I. Gladwell and L.F. Shampine, RKSUITE: A suite of explicit Runge-Kutta codes, World
Scientific, Singapore, (1993).
20. NAG Fortran Library Manual, Mark 13, NAG Ltd., Wilkinson House, JordanhUl Road, Oxford, U.K., (1988).
21. IMSL Math/Library User's Manual, Version 1.1, IMSL, 2500 Park West Tower One, 2500 City West Boule-
yard, Houston, TX, (1989).
28 P. BOGACKI AND L. F. SHAMPINE
22. D.G. Bettis and M.K. Horn, Computation of truncation error terms for Runge-Kutta methods, Math. Inst.
report, Tech. Univ. Munich, (private communication).
23. L.F. Shampine, The quality of Runge-Kutta formulas, Rept. SAND 76-0370, Sandia National Laboratories,
Albuquerque, NM, (1976).
24. J.C. Butcher, The Numerical Analysis of Ordinary Differential Equations, Wiley, Chichester, U.K., (1987).
25. P.J. Prince and J.R. Dormand, High order embedded Runge-Kutta formulas, J. Comp. Appl. Math. 7, 67-75,
(1981).
26. J.A. Zonneveld, Automatic Numerical Integration, Math. Centre Tracts 8, Amsterdam, (1964).
27. L.F. Shampine, Implementation of Rosenbrock methods, ACM Trans. Math. Software 8, 93-113, (1982).
28. P. Bogacki and L.F. Shampine, A 3(2) pair of Runge-Kutta formulas, Appl. Math. Lett. 2 (4), 1-9, (1989).
29. J.R. Dormand, M.A. Lockyear, N.E. McGorrigan and P.J. Prince, Global error estimation with Runge-Kutta
triples, Computers Math. Applic. 18 (9), 835-846, (1989).
30. P. Bogacki, Efficient Runge-Kutta pairs and their interpolants, Ph.D. Thesis, Math. Dept., Southern Metho-
dist University, Dallas, TX, (1990).
31. P. Bogacki and L.F. Shampine, An efficient Runge-Kutta (4,5) pair, Rept. 89-20, Math. Dept., Southern
Methodist University, Dallas, TX, (1989).
32. E. Hairer, S.P. Norsett and G. Wanner, Solving Ordinary Differential Equations I Nonst i f f Problems,
Springer, Berlin, (1987).
33. B.L. Buzbee, The SLATEC common mathematical library, Chapter 11, In Sources and Development of
Mathematical Software, (Edited by W.R. Cowell), Prentice Hall, Englewood Cliffs, N J, (1984).
34. W.H. Enright, T.E. Hull and B. Lindberg, Comparing numerical methods for stiff systems for O.D.E.'s, BI T
15, 10-48, (1975).

You might also like