nag_zero_cont_func_bd_1 (c05sdc) locates a zero of a continuous function in a given interval by a combination of the methods of linear interpolation, extrapolation and bisection.
nag_zero_cont_func_bd_1 (c05sdc) attempts to obtain an approximation to a simple zero of the function
given an initial interval
such that
. The zero is found by a modified version of procedure ‘zeroin’ given by
Bus and Dekker (1975). The approximation
to the zero
is determined so that one or both of the following criteria are satisfied:
(i) |
, |
(ii) |
. |
The function combines the methods of bisection, linear interpolation and linear extrapolation (see
Dahlquist and Björck (1974)), to find a sequence of sub-intervals of the initial interval such that the final interval
contains the zero and is small enough to satisfy the tolerance specified by
xtol. Note that, since the intervals
are determined only so that they contain a change of sign of
, it is possible that the final interval may contain a discontinuity or a pole of
(violating the requirement that
be continuous). If the sign change is likely to correspond to a pole of
then the function gives an error return.
Bus J C P and Dekker T J (1975) Two efficient algorithms with guaranteed convergence for finding a zero of a function ACM Trans. Math. Software 1 330–345
This depends on the value of
xtol and
ftol. If full machine accuracy is required, they may be set very small, resulting in an error exit with error exit of
NE_XTOL_TOO_SMALL, although this may involve many more iterations than a lesser accuracy. You are recommended to set
and to use
xtol to control the accuracy, unless you have considerable knowledge of the size of
for values of
near the zero.
Not applicable.
The time taken by nag_zero_cont_func_bd_1 (c05sdc) depends primarily on the time spent evaluating
f (see
Section 5).
None.