This page contains a routine that numerically finds roots of the equation presented above on the interval specified by the user. It is written in JavaScript, so make sure that JavaScript is enabled in your browser.

**References:**

Shampine, L. F. (SNLA) and H. A. Watts (SNLA)

"FZERO, A Root-solving Code" Report SC-TM-70-631

Sandia Laboratories

September, 1970

Dekker, T.J.

"Finding a Zero by Means of Successive Linear Interpolation"

"Constructive Aspects of the Fundamental Theorem of Algebra" edited by B. Dejon and P. Henrici

Wiley-Interscience

1969

The utility posted on this page is based on the program "FZERO.F", written by L. F. Shampine (SNLA) and H. A. Watts (SNLA), based upon a method by T. J. Dekker.

"FZERO.F" is part of the SLATEC library of programs, and its original code (written in FORTRAN) can be viewed there.

Before being posted on this page, "FZERO.F" was translated to Javascript and extensively edited, customizing the algorithm for this particular application. Although all care was taken to ensure that it was translated accurately, some errors may have crept into the translation. These errors are mine; the original FORTRAN routines have been thoroughly tested and work properly. Please contact the webmaster to report any errors.

To increase the flexibility of this utility, the user is given fields into which values must be entered for the *constants* **a _{1}**,

In addition to the **a** values, the user must enter a range, [b, c], over which a zero will be sought for this function. These values represent *time* variables, from which M is calculated as M = (2πt)/T. T is the period of the motion, which must be entered by the user as well.

The user should ensure that a zero is included on this interval before entering these values. In other words, the sign of f(b) should not be the same as the sign of f(c). If f(M) does not change sign over the specified interval, a message box pops up stating this feature and then drops out of the routine--no further action is taken. The user must try again, entering b and c values such that f(M) changes sign over the interval.

Even before using this utility, some observations may be made:

If **a _{1}** and

If

**IMPORTANT**: Note the Error Code returned.

Enter the **a** values for the function.

Error Code = 1: The zero is within the requested tolerance (on the order of Machine Epsilon), the interval has collapsed to the requested tolerance, the function changes sign over the interval, and the function decreased in magnitude as the interval collapsed.

Error Code = 2: A zero has been found, but the interval has not collapsed to the requested tolerance.

Error Code = 3: MAXIT (200) function evaluations. The solution may be meaningless. Check it.