Bisection Method

Numerical Methods

Source inspiration: (Mathew 2000-2019).

Animations

Each animation below shows the bracket-halving diagram for the bisection method. The shaded region marks the current bracket \([a, b]\) that is known to contain a root (by the Intermediate Value Theorem). Each frame computes the midpoint \(c = \tfrac{a+b}{2}\), evaluates \(f(c)\), and narrows the bracket to the half that still contains the sign change.

Julia source scripts that generated these animations are linked under each case.

Case 1 — Convergent, \(f(x) = x^3 + 4x^2 - 10\), \([a_0, b_0] = [1, 2]\)

Behavior: \(f(1) = -5 < 0\) and \(f(2) = 14 > 0\), so the IVT guarantees a root in \([1, 2]\). The true root is \(x^* \approx 1.3688\). The bracket halves each step and the midpoints converge monotonically.

Julia source

Bisection animation on f(x)=x³+4x²−10: bracket narrows around the root at x≈1.3688 over 12 steps

Case 2 — Spurious convergence (cautionary), \(f(x) = \tan(x)\), \([a_0, b_0] = [1, 2]\)

Behavior: \(f(1) = \tan(1) > 0\) and \(f(2) = \tan(2) < 0\), so there is a sign change on \([1, 2]\). However, this sign change is caused by the vertical asymptote at \(x = \tfrac{\pi}{2} \approx 1.5708\), not a true root. Bisection converges to the asymptote — illustrating that the IVT guarantee requires \(f\) to be continuous on \([a, b]\).

Julia source

Bisection animation on f(x)=tan(x): method converges to the asymptote at π/2, not a root, as a cautionary example

References

Mathew, John H. 2000-2019. Numerical Analysis - Numerical Methods Modules. https://web.archive.org/web/20190808102217/http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html.