C200: Zero of a Function of One Real Variable

Author(s): K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 01.05.1990
Language: Fortran Revised: 01.12.1994

Function subprograms RZEROX and DZEROX compute, to an attempted specified accuracy, a zero tex2html_wrap_inline107 of a real-valued function f(x) lying in a given interval [a,b], where tex2html_wrap_inline113 .

On computers other than CDC or Cray, only the double precision version DZEROX is available. On CDC and Cray computers, only the single-precision version RZEROX is available.

Structure:

FUNCTION subprograms
User Entry Names: RZEROX, DZEROX
Obsolete User Entry Names: ZEROX tex2html_wrap_inline115 RZEROX
Files Referenced: Unit 6
External References: User-supplied FUNCTION subprogram

Usage:

For tex2html_wrap_inline117 (type REAL), tex2html_wrap_inline119 (type DOUBLE PRECISION),

    tZEROX(A,B,EPS,MAXF,F,MODE)
has, in any arithmetic expression, the value tex2html_wrap_inline121 .
A,B
(type according to t) On entry, A and B must specify the end points of the search interval. Unchanged on exit.
EPS
(type according to t) On entry, EPS must be equal to the accuracy parameter (see Accuracy). Unchanged on exit.
MAXF
(INTEGER) On entry, MAXF must be equal to the maximum permitted number of references to the function F within the iteration loop. Unchanged on exit.
F
(type according to t) Name of a user-supplied FUNCTION subprogram, declared EXTERNAL in the calling program. This subprogram must set tex2html_wrap_inline123 .
MODE
(INTEGER) On entry, tex2html_wrap_inline125 or tex2html_wrap_inline127 defines the algorithm for finding tex2html_wrap_inline129 (see Method and Notes).

Method:

Two algorithims are incorporated in this subprogram. These are described in Ref. 1 as ``Algorithm M'' ( tex2html_wrap_inline131 ) and ``Algorithm R'' ( tex2html_wrap_inline133 ). Both are mixtures of linear interpolation, rational interpolation and bisection.

Accuracy:

These subprograms try to compute two numbers tex2html_wrap_inline135 and tex2html_wrap_inline137 lying in the interval [a,b] such that

  1. tex2html_wrap_inline141
  2. tex2html_wrap_inline143
  3. tex2html_wrap_inline145
If successful, the value of tex2html_wrap_inline147 is assigned to the function name.

Notes:

  1. tex2html_wrap_inline149 should be used for fairly simple functions whose evaluation is cheap in comparison with the calculations performed in one iteration step of RZEROX or DZEROX.
  2. tex2html_wrap_inline151 should be used for more expensive functions. Convergence should be faster than for tex2html_wrap_inline153 , but the evaluation steps are more expensive.
  3. For functions which have a pole near the exact zero, tex2html_wrap_inline155 is recommended because of the special character of the interpolation formula which is used.

Error handling:

  1. tex2html_wrap_inline157 . The function value is set equal to zero.
  2. MODE has a value other than 1 or 2. The function value is set equal to zero.
  3. The number of references to F exceeds MAXF. The function value is set equal to the last computed value of tex2html_wrap_inline159 (see Accuracy)
For each error a message is printed.

The subprogram is based on Algol programs described in Ref. 1.

References:

  1. J.C.P. Bus and T.J. Dekker, Two efficient algorithms with garanteed convergence for finding a zero of a function, ACM Trans. Math. Software 1 (1975) 330-345.
tex2html_wrap_inline161

Michel Goossens Tue Jun 4 20:22:55 METDST 1996