The bisection method is a reliable numerical algorithm for finding a real root of a function by repeatedly halving an interval that brackets a sign change. It is based on the Intermediate Value Theorem: if a function is continuous on an interval and takes opposite signs at the endpoints, then it must cross zero somewhere between them.
f(x) should be continuous on [a,b].f(a)·f(b) < 0 (opposite signs).Start with an interval [a,b] where the root is bracketed. At each iteration, compute the midpoint:
Evaluate f(m). If f(a)·f(m) < 0, the root remains in [a,m] so set b = m. Otherwise (if f(m)·f(b) < 0), set a = m. Repeat.
After n iterations, the interval width is:
(b-a)/2^n
A common absolute error bound for the midpoint estimate is:
|x* - m_n| ≤ (b-a)/2^(n+1), where x* is the true root.
Your tolerance can be interpreted as an interval-width target (e.g., stop when |b-a| ≤ tol) or a function-residual target (e.g., stop when |f(m)| ≤ tol). If your calculator uses one specific rule, interpret the output accordingly.
m.[a,b] that still contains a root (under the assumptions).f(m); smaller residual generally indicates you are closer to a true root, but the interval-width bound is the convergence guarantee.Find a root of f(x)=x^3-2x-5 on [2,3].
f(2)=8-4-5=-1f(3)=27-6-5=16Because the signs differ, a root is bracketed. Midpoint m=2.5, and f(2.5)=15.625-5-5=5.625 (positive), so the root lies in [2,2.5]. Repeating this halving process quickly narrows the interval until the requested tolerance or maximum iterations is reached. The true root is approximately 2.09455…, so you should see an answer near that value with a small final bracket.
| Method | Needs derivative? | Convergence | Pros | Cons |
|---|---|---|---|---|
| Bisection | No | Linear (guaranteed if bracketed) | Robust, simple, predictable error bound | Slower than Newton/secant |
| Newton–Raphson | Yes | Quadratic (near root) | Very fast when it works | Can diverge; sensitive to initial guess |
| Secant | No | Superlinear (often) | Fast without derivatives | No guaranteed bracket; can fail on some functions |
f(a)·f(b) > 0, there may be zero, one (even multiplicity), or multiple roots; bisection cannot certify a root without a sign change.tan(x) across π/2) can produce misleading behavior. Continuity on [a,b] is essential.|f(m)| may not decrease smoothly; the interval-width error bound is the more dependable indicator.x^2, sin(x), exp(x)) and use parentheses where needed.f(a) and f(b) have the same sign?Then the interval does not bracket a sign change, so bisection cannot guarantee a root. Try expanding the interval or plotting/inspecting values to find endpoints with opposite signs.
To make the interval width ≤ tol, you can use: n ≥ log2((b-a)/tol). Some implementations use the midpoint error bound, which differs by a factor of 2.
Interval width gives a direct worst-case bound on the root location (under continuity + bracketing). |f(m)| can be useful, but may be misleading if the function is very flat or steep.
It converges to a root as long as f is continuous on [a,b] and f(a)·f(b) < 0.
Burden, R. L., & Faires, J. D. Numerical Analysis. (Bisection method and bracketing root-finding.)