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