In mathematics, the bisection method is a root-finding algorithm which works by repeatedly dividing an interval in half and then selecting the subinterval in which a root exists.
Suppose we want to solve the equation . Given two points
and
such that
and
have opposite signs, we know by the intermediate value theorem that
must have at least one root in the interval
as long as
is continuous on this interval. The bisection method divides the interval in two by computing
. There are now two possibilities: either
and
have opposite signs, or
and
have opposite signs. The bisection algorithm is then applied recursively to the sub-interval where the sign change occurs.
The function bisection.method() gives a visual demonstration of this process of finding the root of an equation .
ani.start(nmax = 50, ani.height = 400, ani.width = 600, interval = 2, title = "The Bisection Method for Root-finding on an Interval", description = "The bisection method is a root-finding algorithm which works by repeatedly dividing an interval in half and then selecting the subinterval in which a root exists.") par(mar = c(4, 4, 1, 1)) bisection.method(main = "") ani.stop()