Bisection Method (Root Finding)

Locate a root of \(f(x)=0\) inside a sign-changing bracket \([a, b]\) by repeatedly halving the interval. Guaranteed to converge linearly whenever \(f(a)\cdot f(b) < 0\).

Function \(f(x)\) & Active Bracket \([a_n, b_n]\)

f(x) Active bracket [a, b] Midpoint c = (a+b)/2

Iteration Table

Half-Width Convergence (Log Scale)

Scilab & Python Code (Minimal Exam-Ready)

Algorithm & Convergence

By the Intermediate Value Theorem, if \(f(x)\) is continuous on \([a, b]\) and \(f(a)\cdot f(b) < 0\), at least one root exists inside \((a,b)\).

$$ c_n = \frac{a_n + b_n}{2} $$
  • If \(f(a_n)\cdot f(c_n) < 0\), set \(b_{n+1} = c_n\); otherwise set \(a_{n+1} = c_n\).
  • After \(n\) steps, the maximum error is bounded by \(\varepsilon_n \le \dfrac{b_0 - a_0}{2^n}\).

Exam Notes

  • Guaranteed convergence: Unlike Newton–Raphson, bisection never diverges once a valid bracket is chosen.
  • Linear rate: Each iteration gains roughly \(0.301\) decimal digits (\(\log_{10} 2\)); ~14 iterations reach \(10^{-4}\).