TEST_ZERO Zero Finder Tests

TEST_ZERO is a Python library which defines a number 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 functions, which are accessible by number, are

1. f(x) = sin ( x ) - x / 2.
2. f(x) = 2 * x - exp ( - x ).
3. f(x) = x * exp ( - x ).
4. f(x) = exp ( x ) - 1 / ( 10 * x )^2.
5. f(x) = ( x + 3 ) * ( x - 1 )^2.
6. f(x) = exp ( x ) - 2 - 1 / ( 10 * x )^2 + 2 / ( 100 * x )^3.
7. f(x) = x^3.
8. f(x) = cos ( x ) - x.
9. the Newton Baffler.
10. the Repeller.
12. Flat Stanley.
13. Lazy Boy.
14. the Camel.
15. a pathological function for Newton's method.
16. Kepler's Equation.
17. f(x) = x^3 - 2*x - 5, Wallis's function.
18. f(x) = (x-1)^7, written term by term.
19. f(x) = cos(100*x)-4*erf(30*x-10)

Languages:

TEST_ZERO is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Programs:

BISECTION_RC, a Python library which seeks a solution to the equation F(X)=0 using bisection within a user-supplied change of sign interval [A,B]. The procedure is written using reverse communication (RC).

ZERO_RC, a Python library which seeks solutions of a scalar nonlinear equation f(x) = 0, or a system of nonlinear equations, using reverse communication.

Reference:

1. George Donovan, Arnold Miller, Timothy Moreland,
Pathological Functions for Newton's Method,
American Mathematical Monthly, January 1993, pages 53-58.
2. Peter Colwell,
Solving Kepler's Equation Over Three Centuries,
Willmann-Bell, 1993
3. Arnold Krommer, Christoph Ueberhuber,
Springer, 1994.

PNG images of the graphs of some of the functions were made using MATLAB:

Source Code:

• p00.py, returns information for any problem, given its index.
• p01.py, returns information for problem 01.
• p02.py, returns information for problem 02.
• p03.py, returns information for problem 03.
• p04.py, returns information for problem 04.
• p05.py, returns information for problem 05.
• p06.py, returns information for problem 06.
• p07.py, returns information for problem 07.
• p08.py, returns information for problem 08.
• p09.py, returns information for problem 09.
• p10.py, returns information for problem 10.
• p11.py, returns information for problem 11.
• p12.py, returns information for problem 12.
• p13.py, returns information for problem 13.
• p14.py, returns information for problem 14.
• p15.py, returns information for problem 15.
• p16.py, returns information for problem 16.
• p17.py, returns information for problem 17.
• 1
• p18.py, returns information for problem 18.
• p19.py, returns information for problem 19.

Methods and utility functions:

You can go up one level to the Python source codes.

Last revised on 02 December 2016.