nag_zero_cont_func_cntin_rcomm (c05axc) attempts to locate a zero of a continuous function using a continuation method based on a secant iteration. It uses reverse communication for evaluating the function.
nag_zero_cont_func_cntin_rcomm (c05axc) uses a modified version of an algorithm given in
Swift and Lindfield (1978) to compute a zero
of a continuous function
. The algorithm used is based on a continuation method in which a sequence of problems
are solved, where
(the value of
is determined as the algorithm proceeds) and where
is your initial estimate for the zero of
. For each
the current problem is solved by a robust secant iteration using the solution from earlier problems to compute an initial estimate.
You must supply an error tolerance
tol.
tol is used directly to control the accuracy of solution of the final problem (
)
in the continuation method, and
is used to control the accuracy in the intermediate problems
(
).
Swift A and Lindfield G R (1978) Comparison of a continuation method for the numerical solution of a single nonlinear equation Comput. J. 21 359–362
Note: this function uses
reverse communication. Its use involves an initial entry, intermediate exits and re-entries, and a final exit, as indicated by the argument
ind. Between intermediate exits and re-entries,
all arguments other than fx must remain unchanged.
The accuracy of the approximation to the zero depends on
tol and
ir. In general decreasing
tol will give more accurate results. Care must be exercised when using the relative error criterion (
).
If the zero is at
, or if the initial value of
x and the zero bracket the point
, it is likely that an error exit with
NE_CONTIN_AWAY_NOT_POSS,
NE_CONTIN_PROB_NOT_SOLVED or
NE_FINAL_PROB_NOT_SOLVED will occur.
It is possible to request too much or too little accuracy. Since it is not possible to achieve more than machine accuracy, a value of
should not be input and may lead to an error exit with
NE_CONTIN_AWAY_NOT_POSS,
NE_CONTIN_PROB_NOT_SOLVED or
NE_FINAL_PROB_NOT_SOLVED. For the reasons discussed under
NE_CONTIN_PROB_NOT_SOLVED in
Section 6,
tol should not be taken too large, say no larger than
.
Not applicable.
For most problems, the time taken on each call to nag_zero_cont_func_cntin_rcomm (c05axc) will be negligible compared with the time spent evaluating
between calls to nag_zero_cont_func_cntin_rcomm (c05axc). However, the initial value of
x and the choice of
tol will clearly affect the timing. The closer that
x is to the root, the less evaluations of
required. The effect of the choice of
tol will not be large, in general, unless
tol is very small, in which case the timing will increase.
None.