Skip to content

The bisection method

4 min read

Short answer

If ff is continuous and f(a)f(a), f(b)f(b) have opposite signs, a root lies between them. Evaluate at the midpoint, keep the half where the sign still changes, and repeat. Each step halves the error bound, and it always converges, though slowly.

Steps1Find a, b with f(a) f(b) < 02Compute the midpoint m = (a + b)/23Keep [a, m] if f(a) f(m) < 0, otherwise [m, b]4Repeat until the interval isshorter than your toleranceAfter n steps the interval has length (b − a)/2ⁿ.
The Intermediate Value Theorem guarantees a root in the kept half.

How many steps

To shrink an interval of length b−ab-a below a tolerance ε\varepsilon you need n≥log⁡2b−aεn\ge\log_2\dfrac{b-a}{\varepsilon} steps. Each step gains one binary digit, about 0.30.3 decimal digits, so 1010 steps give roughly three digits.

Bisection versus Newton

Bisection needs no derivative and cannot fail once the root is bracketed, but converges linearly. Newton converges quadratically but needs f′f' and a good start. Hybrid methods (Brent's) use both ideas.

Worked example

Locate the root of f(x)=x3−x−2f(x)=x^3-x-2 in [1,2][1,2] with four bisection steps.

f(1)=−2f(1)=-2, f(2)=4f(2)=4. Midpoint 1.51.5: f=−0.125<0f=-0.125<0, keep [1.5,2][1.5,2]. Midpoint 1.751.75: f≈1.61>0f\approx1.61>0, keep [1.5,1.75][1.5,1.75]. Midpoint 1.6251.625: f≈0.67>0f\approx0.67>0, keep [1.5,1.625][1.5,1.625]. Midpoint 1.56251.5625: f≈0.25>0f\approx0.25>0, keep [1.5,1.5625][1.5,1.5625]. The root is about 1.521.52.

Try it yourself

How many bisection steps shrink [1,2][1,2] to length below 10−610^{-6}?

Show the answer

n≥log⁡2(106)≈19.9n\ge\log_2(10^6)\approx19.9, so 2020 steps.

Keep going with practice

Vidi's calculus lessons cover the Intermediate Value Theorem that guarantees this method works.