SINGLE-STEP AND RUNGE-KUTTA METHODS 429
where !Jln(xn)
is
determined from ·
trunc
IPn(xJ = 2hm+1
With the new value of
h,
the
new
truncation error should lie near the midpoint
of
(6.10.38). This form of algorithm has been implemented with a number of
methods.
For
example, see Gear (1971, pp.
83-84)
for a similar algorithm for a
fourth-order
RK
method.
With many programs, the error estimation
(6.10.37)
is
added to the current
calculated value of
yh(xn +
2h),
giving a more accurate result. This
is
called local
extrapolation. When it
is
used, the error per unit step criterion of (6.10.38)
is
replaced by an error per step criterion:
(6.10.39)
In such cases, it can be shown that the local error in the extrapolated value of
Yh(xn +
2h)
satisfies a modified error per unit step criteria [see Shampine and
Gordon
(1975), p. 100]. For implementations of the same method, programs that
use local extrapolation and the error per step criterion appear to be more efficient
than those using
(6.10.38) and not using local extrapolation.
To
better understand the expense of RK methods with the error estimation
previously given, consider only fourth-order
RK
methods with four evaluations
of
f(x,
y)
per
RK
step. In going from xn to
xn
+
2h,
eight evaluations will be
required to obtain
Yh(xn +
2h),
and three additional evaluations to obtain
Y2h(xn +
2h).
Thus a single step of the variable-step algorithms will require
eleven evaluations of
f-
Although fairly expensive
to
use when compared with a
multistep method, a variable-stepsize RK method
is
very stable, reliable, and
is
comparatively easy to program for a computer.
Runge-Kutta-Fehlberg methods The Runge-Kutta-Fehlberg methods are
RK
methods.in.which the truncation error
is
computed by comparing the computed
answer
Yn+I
with the result
ofan
associated higher order··RKformula.The most
popular of such methods are due to
E.
Fehlberg, [e.g., see Fehlberg (1970)]; these
are currently the most popular RK methods. To clarify the presentation, we
consider only the most popular pair of Runge-Kutta-Fehlberg (RKF) formulas
of order 4 and
5.
These formulas are computed simultaneously, and their
difference is taken as an estimate of the truncation error in the fourth-order
method.
Note from Table
6.23 that a fifth-order RK method requires six evaluations
of
f per step. Consequently, Fehlberg chose to use
five
evaluations of f for the
fourth-order formula, rather than the usual four. This extra degree of freedom
in
choosing the fourth-order formula allowed
it
to be chosen with a smaller
truncation error, and this
is
illustrated later.
As before, define
j = 2,
...
,6
(6.10.40)