Interactive Educational Modules in
Scientific Computing

Interval Bisection

This module demonstrates the interval bisection method for solving a nonlinear equation f(x) = 0 in one dimension. Beginning with an initial interval in which the function f has a change in sign, the interval is successively halved until the solution has been isolated as accurately as desired.

The user selects a problem either by choosing a preset example or typing in a desired function f(x) and initial interval [a, b]. The successive steps of interval bisection are then carried out sequentially by repeatedly clicking on NEXT or on the currently highlighted step. The current interval [a, b] and its computed midpoint m are shown on the plot by labeled hash marks, and corresponding function values are shown by bullets. In addition, all these values are shown numerically in the table below. At each iteration, the length of the interval is halved by taking either a = m or b = m, depending on the sign of f(m), and the process is then repeated. The zero of the function, which always remains within the retained interval, is eventually located as accurately as desired.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 5.5.1, especially Algorithm 5.1 and Example 5.7.

Developers: Jeffrey Naisbitt and Michael Heath