Table of Contents

The Bisection Method for Root-finding on an Interval

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 \normalsize f(x) = 0. Given two points \normalsize a and \normalsize b such that \normalsize f(a) and \normalsize f(b) have opposite signs, we know by the intermediate value theorem that \normalsize f must have at least one root in the interval \normalsize [a, b] as long as \normalsize f is continuous on this interval. The bisection method divides the interval in two by computing \normalsize c = (a + b) / 2. There are now two possibilities: either \normalsize f(a) and \normalsize f(c) have opposite signs, or \normalsize f(c) and \normalsize f(b) 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 \normalsize f(x) = 0.

Animation

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. </ani>

R code

library(animation)
saveHTML({
    ani.options(nmax = 50, interval = 2)
    par(mar = c(4, 4, 1, 1))
    bisection.method(main = "")
}, img.name = "bisection_method", htmlfile = "bisection_method.html", 
    ani.height = 500, ani.width = 600, title = "The Bisection Method for Root-finding on an Interval", 
    description = c("The bisection method is a root-finding algorithm\nwhich works by repeatedly dividing an interval in half and then\nselecting the subinterval in which a root exists."))