What Is the Bisection Method?
The bisection method is the most reliable root-finding algorithm in numerical analysis. Given a continuous function f and an interval [a, b] where f(a) and f(b) have opposite signs, the Intermediate Value Theorem guarantees a root somewhere inside. Bisection then does the simplest possible thing, repeatedly:
evaluate f at the midpoint m = (a + b)/2, and keep whichever half still shows the sign change
Each iteration cuts the interval, and therefore the maximum possible error, exactly in half. After n halvings the root is pinned inside an interval of width (b − a)/2ⁿ, a guarantee no cleverness can void: bisection cannot diverge, cannot cycle, cannot be fooled by a bad starting guess. This calculator runs the algorithm with a full iteration log, endpoints, midpoint, sign decision, and the guaranteed error bound at every step, and plots the function with the bracket and root marked.
How to Use the Bisection Method Calculator
Enter f(x), a bracketing interval, and how many iterations to run. The tool first verifies f(a)·f(b) < 0; if the signs match it stops and tells you to widen or shift the bracket, since the method's guarantee starts with the sign change and cannot proceed without it. Each row of the log shows the shrinking interval and which half was kept, and the closing line states the final estimate with its error certificate (b₀ − a₀)/2ⁿ⁺¹. To find a bracket in the first place, sketch the function with the curve sketching calculator or evaluate it at a few integers and look for a sign flip.
Worked Example
Solve x³ − x − 2 = 0 on [1, 2]. Check the bracket: f(1) = −2 < 0 and f(2) = 4 > 0, opposite signs, so a root is trapped. The first midpoint is m = 1.5 with f(1.5) = −0.125 < 0: the sign change now lives in [1.5, 2]. Next, m = 1.75 gives f ≈ 1.609 > 0, keep [1.5, 1.75]. Continuing,
the interval shrinks 1 → 0.5 → 0.25 → 0.125 → … and after 20 iterations the root 1.52138 is certain to within about 10⁻⁶
Twenty evaluations for six guaranteed decimals: that is the bisection trade, roughly 3.3 iterations per decimal digit, since each step gains one binary digit. The certainty is the point; speed is what the Newton's method and secant method calculators sell, at the price of possible divergence.
The Convergence Guarantee, Quantified
Bisection converges linearly with ratio ½: errorₙ₊₁ = errorₙ/2, exactly, every time. Solving (b − a)/2ⁿ ≤ tol for n gives the a-priori iteration count n ≥ log₂((b − a)/tol), computable before you start, a luxury no super-linear method offers. For [1, 2] and tolerance 10⁻₁₀, n = 34: you know the budget in advance, which is why real-world root finders (including the celebrated Brent's method inside most scientific libraries) use bisection as the safety net wrapped around faster but riskier steps. The other pillar is the Intermediate Value Theorem itself: continuity on the bracket is the only smoothness demanded. No derivatives exist? Function only available as a black-box measurement? Bisection does not care.
Common Mistakes to Avoid
- Starting without a sign change. f(a)·f(b) > 0 does not mean no root, x² − 2 on [−2, 2] has two roots and equal signs at the ends, but bisection cannot begin. Find a bracket first; the method certifies what the bracket promises.
- Using it across a discontinuity. 1/x changes sign over [−1, 1] without any root; bisection will diligently converge to the pole at 0. The IVT hypothesis is continuity, and violating it converges to lies.
- Expecting even-multiplicity roots. x² touches zero without crossing, so no sign change exists and no bracket can be built. Bisection only sees roots where the function actually crosses the axis.
- Judging convergence by f(m) being small. Flat functions have tiny values far from the root; steep ones have large values close by. The trustworthy stopping criterion is the interval width, which is exactly what the error bound tracks.
- Grabbing an over-wide bracket with several roots. The method converges to one root of possibly many, and which one depends on midpoint signs along the way. Isolate roots first if you need a specific one.
Real-World Applications
Bisection's robustness makes it the method of last resort, and therefore of first deployment, in production software. Financial libraries compute implied volatility and bond yields by bracketing and bisecting, because a pricing function evaluated from market data is exactly the kind of black box whose derivatives are unavailable. Engineering codes bracket operating points, the temperature where stress crosses a limit, the load where deflection hits specification, and bisect to certainty, since a guaranteed interval is a safety statement. Computer graphics ray-marchers isolate surface intersections by sign change; embedded systems favor bisection because its iteration count, memory, and timing are known at compile time. Even the humble guessing game "higher or lower" is bisection, achieving log₂(range) guesses, the same bound derived above. For polynomial equations specifically, compare the algebraic route in the critical points calculator, which finds where derivatives cross zero, the same crossing problem in disguise.
Frequently Asked Questions
Why does bisection always converge?
Because it never gambles: the sign change is preserved by construction at every step, so a root remains trapped in every interval of the shrinking nested sequence, and the widths go to zero geometrically. Convergence is a logical consequence of the Intermediate Value Theorem, not a numerical hope.
How many iterations do I need for a given accuracy?
n ≥ log₂((b − a)/tolerance). A unit bracket to 10⁻⁶ needs 20 iterations; to 10⁻¹₂, about 40. Equivalently, ten iterations buy three decimal digits. The bound is exact and computable in advance, bisection's signature feature.
What does "linear convergence" mean and why is it considered slow?
The error shrinks by a constant factor (here exactly ½) per step, so correct digits accumulate at a constant rate. Newton's method, when it works, doubles the number of correct digits each step (quadratic convergence), reaching machine precision in five or six iterations where bisection needs fifty.
How do I find a bracketing interval in the first place?
Evaluate f on a coarse grid, integers, say, and record signs; any adjacent flip is a bracket. Plotting first is even better. For functions with known asymptotic behavior, sign at a large argument plus sign at zero often suffices. This is the "root isolation" phase preceding any bracketing method.
What happens if there are several roots inside my bracket?
An odd number of crossings must exist (counting multiplicity), and bisection homes in on one of them, determined by the midpoint signs encountered. If you need all roots, subdivide until each subinterval shows at most one sign change, then bisect each separately.
Why did the method converge to a point that is not a root?
Almost certainly a discontinuity: a pole flips the sign without a zero, and bisection faithfully converges to the sign-flip location. Check continuity on your bracket. The tool's plot makes poles obvious as vertical breaks in the curve.
Is the midpoint the best point to try?
For worst-case guarantees, provably yes: any other split leaves a larger possible interval after the decision. Methods like false position use an interpolated point instead, often faster, but their worst case stalls, keeping one endpoint frozen. The midpoint's mediocrity is uniform, which is exactly its strength.
How does bisection relate to binary search?
They are the same algorithm on different data: binary search halves a sorted array by comparing at the middle index; bisection halves an interval by testing the sign at the middle point. Both extract one bit of information per query, hence the shared log₂ complexity.
Can bisection find complex roots?
No: sign change is a real-line concept, and the method explores only the real interval. Complex roots need different machinery (companion matrices, Newton in the complex plane). A real polynomial with no real sign changes, like x² + 1, is invisible to bisection because it truly has no real roots.
What is Brent's method and why does it contain bisection?
Brent's method, the default root finder in most scientific libraries, tries fast steps (secant, inverse quadratic interpolation) but validates each against the bracket, falling back to a bisection step whenever the fast step misbehaves. It thereby inherits bisection's guarantee with superlinear typical speed, the best of both worlds.