Skip to content

Bisection Method

The bisection method is the most straightforward root-finding algorithm. It works by repeatedly halving an interval that is guaranteed to contain a root, narrowing in on the solution with each step. While not the fastest method, it is unconditionally convergent whenever its starting condition is satisfied.


The Sign-Change Condition

If a continuous function changes sign over an interval [a,b][a, b], then by the Intermediate Value Theorem it must cross the x-axis at least once inside that interval.

f(a)⋅f(b)<0  ⟹  a root exists in [a,b]f(a) \cdot f(b) < 0 \implies \text{a root exists in } [a, b]

Conversely, if f(a)⋅f(b)>0f(a) \cdot f(b) > 0, both endpoints have the same sign and the method cannot be applied to that interval.

Three graphs showing the same curve. Left: Both points positive. Middle: Both points negative. Right: One positive, one negative (root bracketed).

As seen in the figure above, when we choose an interval where the function values at the boundaries share the same sign (both positive or both negative), there is no guarantee that the function crosses the zero axis within that specific window. We must bracket the root by finding one positive and one negative point.


Algorithm

At each iteration kk, compute the midpoint mkm_k and evaluate the function there:

mk=ak+bk2m_k = \frac{a_k + b_k}{2}

Then update the interval by checking the signs. The algorithm strictly follows one of three paths:

  • Left Half: If f(ak)⋅f(mk)<0f(a_k) \cdot f(m_k) < 0, the root lies between aka_k and mkm_k. Set bk+1=mkb_{k+1} = m_k.
  • Right Half: If f(mk)⋅f(bk)<0f(m_k) \cdot f(b_k) < 0, the root lies between mkm_k and bkb_k. Set ak+1=mka_{k+1} = m_k.
  • Exact Root: If f(mk)=0f(m_k) = 0, then mkm_k is the root exactly, and the algorithm halts.
Three graphs demonstrating the interval update logic: selecting the left half, right half, or hitting the exact root.

By replacing one of the boundaries with the midpoint, the interval length halves after every single iteration:

∣bk−ak∣=∣b0−a0∣2k|b_k - a_k| = \frac{|b_0 - a_0|}{2^k}


Minimum Number of Iterations

Formula

Given an initial interval [a0,b0][a_0, b_0] and an error tolerance ϵ\epsilon, the minimum number of iterations nn required is:

n≥log⁡∣b0−a0∣−log⁡ϵlog⁡2−1n \ge \frac{\log|b_0 - a_0| - \log \epsilon}{\log 2} - 1

Proof

After kk iterations, the interval has length ∣b0−a0∣2k\dfrac{|b_0 - a_0|}{2^k}. The midpoint mkm_k is at most half an interval-width away from the true root x∗x^* (the worst case is when x∗x^* sits at one of the endpoints aka_k or bkb_k):

∣mk−x∗∣≤∣bk−ak∣2=∣b0−a0∣2k+1|m_k - x^*| \le \frac{|b_k - a_k|}{2} = \frac{|b_0 - a_0|}{2^{k+1}}

For the error to fall within tolerance ϵ\epsilon after nn iterations:

∣b0−a0∣2n+1≤ϵ\frac{|b_0 - a_0|}{2^{n+1}} \le \epsilon

Taking logarithms of both sides:

log⁡∣b0−a0∣−(n+1)log⁡2≤log⁡ϵ\log|b_0 - a_0| - (n+1)\log 2 \le \log \epsilon

log⁡∣b0−a0∣−nlog⁡2−log⁡2≤log⁡ϵ\log|b_0 - a_0| - n\log 2 - \log 2 \le \log \epsilon

nlog⁡2≥log⁡∣b0−a0∣−log⁡ϵ−log⁡2n\log 2 \ge \log|b_0 - a_0| - \log \epsilon - \log 2

n≥log⁡∣b0−a0∣−log⁡ϵlog⁡2−1\boxed{n \ge \frac{\log|b_0 - a_0| - \log \epsilon}{\log 2} - 1}


Worked Example 1: Minimum Iterations

Problem: Given interval [1.5,  3][1.5,\; 3] and machine epsilon ϵM=1.1×10−16\epsilon_M = 1.1 \times 10^{-16}, find the minimum number of bisection iterations required.

Step 1 — Identify the inputs

a0=1.5,b0=3,ϵ=1.1×10−16a_0 = 1.5, \quad b_0 = 3, \quad \epsilon = 1.1 \times 10^{-16}

∣b0−a0∣=∣3−1.5∣=1.5|b_0 - a_0| = |3 - 1.5| = 1.5

Step 2 — Apply the formula

n≥log⁡(1.5)−log⁡(1.1×10−16)log⁡(2)−1≈52.59n \ge \frac{\log(1.5) - \log(1.1 \times 10^{-16})}{\log(2)} - 1 \approx 52.59

Step 3 — Round up

Since nn must be an integer:

n=53 iterations\boxed{n = 53 \text{ iterations}}


Worked Example 2: Running Bisection

Problem: Use the bisection method to find the root of f(x)=x3−7x2+14x−6f(x) = x^3 - 7x^2 + 14x - 6 on [1,  3.2][1,\; 3.2] accurate within 10−310^{-3}.

Step 1 — Verify the sign-change condition

f(1)=1−7+14−6=2(>0)f(1) = 1 - 7 + 14 - 6 = 2 \quad (> 0)

f(3.2)=(3.2)3−7(3.2)2+14(3.2)−6=32.768−71.68+44.8−6=−0.112(<0)f(3.2) = (3.2)^3 - 7(3.2)^2 + 14(3.2) - 6 = 32.768 - 71.68 + 44.8 - 6 = -0.112 \quad (< 0)

Since f(1)⋅f(3.2)<0f(1) \cdot f(3.2) < 0, a root exists in [1,  3.2][1,\; 3.2].

Step 2 — Iterate

At each step, compute the midpoint and decide which half contains the root. The table below shows 10 iterations:

kkaka_kmkm_kbkb_kf(ak)f(a_k)f(mk)f(m_k)f(bk)f(b_k)
01.0000002.1000003.2000002.0000001.791000−-0.112000
12.1000002.6500003.2000001.7910000.552125−-0.112000
22.6500002.9250003.2000000.5521250.085828−-0.112000
32.9250003.0625003.2000000.085828−-0.054443−-0.112000
42.9250002.9937503.0625000.0858280.006328−-0.054443
52.9937503.0281253.0625000.006328−-0.026521−-0.054443
62.9937503.0109383.0281250.006328−-0.010697−-0.026521
72.9937503.0023443.0109380.006328−-0.002333−-0.010697
82.9937502.9980473.0023440.0063280.001961−-0.002333
92.9980473.0001953.0023440.001961−-0.000195−-0.002333

Step 3 — Read the result

At iteration 9, the midpoint is m9=3.000195m_9 = 3.000195 and ∣f(m9)∣=0.000195<10−3|f(m_9)| = 0.000195 < 10^{-3}. The method has converged.

x∗≈3.000\boxed{x^* \approx 3.000}