
160 11. Adaptive Step Size Selection
tol = 10
−2
tol = 10
−4
No. steps Max. |GE| No. steps Max. |GE|
TS(1) 23(10) 0.081 209(8) 0.0084
Euler 25(7) 0.083 213(6) 0.0084
Backward Euler 24(5) 0.081 213(7) 0.0084
RK(1,2) 27(8) 0.079 216(9) 0.0083
tol = 10
−2
tol = 10
−5
TS(2) 12(7) 0.023 102(13) 0.00018
trapezoidal 13(2) 0.012 86(11) 0.00014
RK(2,3) 15(4) 0.027 98(11) 0.00015
RK(2,3)(Extrapolated) 14(4) 0.010 98(11) 0.00005
Table 11.2 Summary of numerical results for the methods described in this
chapter showing the number of steps to integrate over the interval (0, 4), the
number of rejected steps in parentheses, and the maximum |GE| taken over the
interval
Exercise 11.8) rather than TS(1), we obtain the results shown in Figure 11.8.
On comparing Figures 11.3 and 11.8 we see that for the more relaxed tolerance
of 10
−2
the implicit method is allowed to use time steps that grow smoothly
with t because the error control strategy is not detecting any instability.
Rejected time steps impose an additional computational burden; in order
to reduce their occurrence, the main formula (11.4) for updating the step size
is often altered by including a “safety factor” of 0.9 on the right. The step size
used is therefore just 90% of the theoretically predicted value and will lead
to roughly 10% more steps being required—thus, this adjustment need only
be made if the number of rejected steps (which should be monitored as the
integration proceeds) approaches 10% of the number of steps used to date.
In RK methods the choice of step size is based on the estimate of the LTE
of the lower order method (x
hpi
). However, the solution x
hp+1i
would normally
be expected to give a more accurate approximation. It is common, therefore, to
use x
n+1
= x
hp+1i
n+1
when a step is accepted—the RK process is then said to be in
local extrapolation mode. The results for RK(2,3) operated in this way are shown
in the final row of Table 11.2 and, despite the lack of theoretical justification,
we see superior results to the basic RK(2,3) method. The codes for solving
IVPs presented in Matlab, for instance, use local extrapolation. Information
on these may be found in the book by Shampine et al. [63]. Moler [53] gives
a detailed description of the implementation of a simplified version of a (2,3)
Runge–Kutta pair devised by Bogacki and Shampine [4] that is the basis of the
Matlab function ode23.