C205: Zero of a Function of One Real Variable

Author(s): T. Pomentale Library: MATHLIB
Submitter: K.S. Kölbig Submitted: 20.04.1970
Language: Fortran Revised: 15.03.1993

Subroutine subprograms RZERO and DZERO compute, to an attempted specified accuracy, a zero of a real-valued function f(x) lying in a given interval [a,b], where tex2html_wrap_inline124 .

On CDC and Cray computers, the double-precision version DZERO is not available.

Structure:

SUBROUTINE subprograms
User Entry Names: RZERO, DZERO
Files Referenced: Unit 6
External References: MTLMTR, ABEND, user-supplied FUNCTION subprogram

Usage:

For tex2html_wrap_inline126 (type REAL), tex2html_wrap_inline128 (type DOUBLE PRECISION),

    CALL tZERO(A,B,X0,R,EPS,MAXF,F)
A,B
(type according to t) On entry, A and B must specify the end-points of the search interval. Unchanged on exit.
X0
(type according to t) On exit, X0 is the computed approximation to a zero tex2html_wrap_inline130 of the function f(x).
R
(type according to t) On exit, the value of R is such that X0 tex2html_wrap_inline134 R, unless an error condition is detected (see Error Handling).
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.
The user-supplied function subprogram F must be of the form FUNCTION F(X,I) and must set tex2html_wrap_inline136 . The INTEGER argument I is set by RZERO before each reference to F as follows:
tex2html_wrap_inline138 First reference.
tex2html_wrap_inline140 Subsequent references.
tex2html_wrap_inline142 Final reference, before a normal ( tex2html_wrap_inline144 ) exit.

Method:

A mixed strategy is used, based on the Muller method of parabolic interpolation supplemented by bisection.

Accuracy:

The routine tries to compute a value X0 such that

tex2html_wrap_inline146

If this accuracy is obtained with fewer than MAXF references to the function F within the iteration loop, the subroutine exits with R positive.

Error handling:

Error C205.1: tex2html_wrap_inline148 . X0 is set equal to zero and R is set equal to tex2html_wrap_inline150 .
Error C205.2: The number of calls to F exceeds MAXF. X0 is set equal to zero and R is set to tex2html_wrap_inline152 .
A message is written on Unit 6, unless subroutine MTLSET (N002) has been called.
tex2html_wrap_inline154


Michel Goossens Tue Jun 4 20:41:56 METDST 1996