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 for Root-finding on an Interval
loading animation frames... 0%

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.

R code

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()