DERIVATION OF HIGHER
ORDER
MULTISTEP METHODS 391
In the program DE of Shampine and Gordon (1985, 186-209), the truncation
error at
xn+l [call it trunc]
is
required to satisfy
jtruncjj
::::;;
ABSERR + RELERR*
IYn)
(6.7.30)
This
is
to hold for each component of the truncation error and for each
corresponding component
Yn,
j of the solution
Yn
of the given system of differen-
tial equations. The values
ABSERR and RELERR are supplied by the user. The
value of trunc
is
given, roughly speaking, by
t
-'-hl.'
'l"'7p+l'
rune-
~p+lv
Yn+l
assuming the spacing
is
uniform. This
is
the truncation error for the p-step
formula
p
Y~!i
=
Yn
+ h L
8pjy~+l
j=O
Once the test (6.7.30)
is
satisfied, the value of
Yn+l
is
Yn+l
=
Y~!i
1
>
=
Y~!l
+ trunc
(6.7.31)
Thus the actual truncation error
is
O(hP+
3
),
and combined with (6.7.30), it can
be shown that the truncation error in
Yn+l
satisfies an error per unit step criteria,
which
is
similar to that of (6.6.1) for the algorithm Detrap of Section 6.6. For a
detailed discussion, see Shampine and Gordon
(1975, p. 100).
The program
DE
(and its successor DDEABM)
is
very sophisticated in its
error control, including the choosing of the order and the stepsize. It cannot be
discussed adequately in the limited space available in this text, but the best
reference is the text of
Shampine and Gordon (1975), which
is
devoted to
variable-order Adams algorithms. The
programs
DE
and DDEABM have been
well
designed .from both the viewpoint of error control and user convenience.
Each
is
also written in a portable form, and generally,
is
a well-recommended
program for solving differential equations.
Example Consider the problem
which has the solution
y(O)
= 1
20
Y(x)=
-----
(1
+ 19e-<xf
4
l)
·
(6.7.32)
DDEABM was used to solve this problem with values output
at
x =
2,
4,
6,
...
, 20.
Three values of. ABSERR were used, and
RELERR
= 0
in
all cases. The true
global errors are shown in Table
6.15. The column labeled
NFE
gives the number
of evaluations of
f(x,
y)
necessary to obtain the value
yh(x),
beginning from x
0
.