TEST_ZERO
Zero Finder Tests
TEST_ZERO is a MATLAB routine containing a library of
nonlinear functions.
The nonlinear functions are intended for use in demonstrating or
testing zero finder algorithms, that is, programs that seek a
root of a scalar equation F(X)=0.
The MATLAB function TEST_ZERO evaluates one of several scalar
nonlinear test functions, and has the form:
function [ fx, fp ] = test_zero ( x )
To make use of this function while running MATLAB, you must issue
the command
global IPROB
and then set IPROB to a value between 1 and 18 to select a
particular problem.
The functions, which are accessible by number, are
-
f(x) = sin ( x ) - x / 2.
-
f(x) = 2 * x - exp ( - x ).
-
f(x) = x * exp ( - x ).
-
f(x) = exp ( x ) - 1 / ( 10 * x )^2.
-
f(x) = ( x + 3 ) * ( x - 1 )^2.
-
f(x) = exp ( x ) - 2 - 1 / ( 10 * x )^2 + 2 / ( 100 * x )^3.
-
f(x) = x^3.
-
f(x) = cos ( x ) - x.
-
the Newton Baffler.
-
the Repeller.
-
the Pinhead.
-
Flat Stanley.
-
Lazy Boy.
-
the Camel.
-
a pathological function for Newton's method.
-
Kepler's Equation.
-
f(x) = random number.
-
f(x) = x^3 - 2*x - 5, Wallis's function.
-
f(x) = x^2 + 1 + log((x-pi)^2)/pi^4, the "thin pole".
Related Data and Programs:
TEST_ZERO is also available in
a FORTRAN90 version.
Reference:
-
George Donovan, Arnold Miller, Timothy Moreland,
Pathological Functions for Newton's Method,
American Mathematical Monthly, January 1993, pages 53-58.
-
Peter Colwell,
Solving Kepler's Equation Over Three Centuries,
Willmann-Bell, 1993
-
Arnold Krommer, Christoph Ueberhuber,
Numerical Integration on Advanced Systems,
Springer, 1994.
Source Code:
-
test_zero.m, an implementation of
the test functions as a MATLAB function.
You can go up one level to
the MATLAB source codes.
Last revised on 01 September 2005.