CSC270 Tutorial on Root Finding

A ``root'' or ``zero'' of a function f(x) is a value z at which f(z) = 0. Root finding is used in many applications.

See the lecture notes on the Newton and Secant methods of root finding. The bisection method, which is not described in the notes, just keeps dividing a root-containing interval in half. This interval [a,b] must be initially chosen such that f(a)*f(b) < 0 (i.e. there must be a root in [a,b]).

Instructions



Things to check out

Notes

No error checking is done on the initial inputs. In particular, the bisection method doesn't check that the function has different signs at each end of the interval. The Newton and secant methods stop when |f(x)| < 0.01. The bisection method stops when the interval size is smaller than 0.04.

If nothing appears above, read this.


Java source code

(Other applets by James Stewart)