Bisection Method
Learn the bisection method for Victorian Year 11 Mathematical Methods (VCAA) — a numerical way to close in on a solution of an equation when no exact method is available.
You will learn to confirm a sign change across an interval, take the midpoint, decide which half contains the root, and repeat until the answer is accurate enough — a reliable step-by-step root-finding technique.
Theory
In Year 11 Mathematical Methods (Unit 1), the bisection method is a step-by-step (numerical) way to approximate a root of \(f(x)=0\) — a value of \(x\) where a continuous function changes sign. You start with an interval \([a,\,b]\) on which \(f\) changes sign, take the midpoint \(c=\dfrac{a+b}{2}\), and keep the half that still contains the sign change. This page shows how to bracket a root, run the iterations, and estimate the root to a required accuracy.
A root (or zero) of \(f\) is a value \(x=r\) with \(f(r)=0\). The bisection method is a repeated-halving procedure that traps a root inside an interval that gets smaller at every step.
It relies on a sign change: if \(f\) is continuous and \(f(a)\) and \(f(b)\) have opposite signs, then somewhere between \(a\) and \(b\) the graph must cross the \(x\)-axis, so a root lies in \([a,\,b]\). We say the interval brackets the root.
Each iteration finds the midpoint \(c=\dfrac{a+b}{2}\), checks the sign of \(f(c)\), and replaces \([a,\,b]\) by whichever half — \([a,\,c]\) or \([c,\,b]\) — still shows the opposite signs. The interval halves in width each time, so the trapped root is pinned down more and more precisely.
Given a bracket \([a,\,b]\) with \(f(a)\) and \(f(b)\) of opposite sign, the midpoint is:
Keep the half whose endpoints have opposite signs:
After \(n\) iterations the bracketing interval has width:
How to apply the bisection method
- Bracket: find \([a,\,b]\) where \(f\) changes sign, i.e. \(f(a)\) and \(f(b)\) have opposite signs (test integer values if you are not given the bracket).
- Midpoint: compute \(c=\dfrac{a+b}{2}\).
- Evaluate: find \(f(c)\) and note its sign. If \(f(c)=0\), then \(c\) is the root and you stop.
- Choose the half: keep \([a,\,c]\) if \(f(a)\) and \(f(c)\) differ in sign, otherwise keep \([c,\,b]\).
- Repeat: iterate until the interval is narrow enough (or you reach the stated number of steps), then quote the midpoint of the final interval as the estimate.
Midpoint — average the endpoints:
| \(c_1\) | \(=\) | \(\dfrac{a+b}{2}\) |
| \(=\) | \(\dfrac{1+2}{2}\) | |
| \(=\) | \(1.5\) |
Signs at the endpoints and the midpoint:
| \(f(1)\) | \(=\) | \((1)^2-2=-1\ \ (\text{negative})\) |
| \(f(1.5)\) | \(=\) | \((1.5)^2-2=0.25\ \ (\text{positive})\) |
Since \(f(1)<0\) and \(f(1.5)>0\), the sign change — and so the root — lies between \(x=1\) and \(x=1.5\).
First midpoint \(c_1=1.5\); the next interval is \([1,\,1.5]\).
Evaluate \(f\) at successive integers:
| \(f(0)\) | \(=\) | \(-9\ \ (\text{negative})\) |
| \(f(1)\) | \(=\) | \(1-4-9=-12\ \ (\text{negative})\) |
| \(f(2)\) | \(=\) | \(8-8-9=-9\ \ (\text{negative})\) |
| \(f(3)\) | \(=\) | \(27-12-9=6\ \ (\text{positive})\) |
| \(f(4)\) | \(=\) | \(64-16-9=39\ \ (\text{positive})\) |
The only adjacent pair with opposite signs is \(f(2)<0\) and \(f(3)>0\), so the graph crosses the \(x\)-axis between \(x=2\) and \(x=3\).
\(f\) changes sign on \([2,\,3]\), so a root is bracketed there.
Iteration 1 — midpoint and sign:
| \(c_1\) | \(=\) | \(\dfrac{2+3}{2}=2.5\) |
| \(f(2.5)\) | \(=\) | \(5.625\ \ (\text{positive})\) |
\(f(2)<0,\ f(2.5)>0\Rightarrow\) root in \([2,\,2.5]\).
Iteration 2:
| \(c_2\) | \(=\) | \(\dfrac{2+2.5}{2}=2.25\) |
| \(f(2.25)\) | \(=\) | \(1.8906\ \ (\text{positive})\) |
Root in \([2,\,2.25]\).
Iteration 3:
| \(c_3\) | \(=\) | \(\dfrac{2+2.25}{2}=2.125\) |
| \(f(2.125)\) | \(=\) | \(0.3457\ \ (\text{positive})\) |
Root in \([2,\,2.125]\).
Estimate — midpoint of the final interval:
| \(\text{estimate}\) | \(=\) | \(\dfrac{2+2.125}{2}\) |
| \(=\) | \(2.0625\) | |
| \(\approx\) | \(2.06\) |
The root is approximately \(2.06\) (2 d.p.).
Confirm the sign change:
| \(P(2)\) | \(=\) | \(-10\ \ (\text{negative})\) |
| \(P(3)\) | \(=\) | \(2\ \ (\text{positive})\) |
Iteration 1:
| \(c_1\) | \(=\) | \(\dfrac{2+3}{2}=2.5\) |
| \(P(2.5)\) | \(=\) | \(-5.875\ \ (\text{negative})\) |
\(P(2.5)<0,\ P(3)>0\Rightarrow\) root in \([2.5,\,3]\).
Iteration 2:
| \(c_2\) | \(=\) | \(\dfrac{2.5+3}{2}=2.75\) |
| \(P(2.75)\) | \(=\) | \(-2.453\ \ (\text{negative})\) |
Root in \([2.75,\,3]\).
Iteration 3:
| \(c_3\) | \(=\) | \(\dfrac{2.75+3}{2}=2.875\) |
| \(P(2.875)\) | \(=\) | \(-0.361\ \ (\text{negative})\) |
Root in \([2.875,\,3]\).
Estimate — midpoint of the final interval:
| \(t\) | \(\approx\) | \(\dfrac{2.875+3}{2}=2.9375\) |
| \(\approx\) | \(2.9\) |
The business breaks even after about \(2.9\) months (1 d.p.).
Common pitfalls
Frequently asked questions
What is the bisection method used for?
It approximates a root of \(f(x)=0\) by repeatedly halving an interval that brackets the root, keeping the half where \(f\) still changes sign.
How do you know an interval contains a root?
If \(f\) is continuous and \(f(a)\) and \(f(b)\) have opposite signs (\(f(a)\,f(b)<0\)), the graph must cross the \(x\)-axis between them, so a root lies in \([a,\,b]\).
What is the formula for the midpoint?
The midpoint of \([a,\,b]\) is \(c=\dfrac{a+b}{2}\); its sign decides which half you keep.
How many iterations do I need for a given accuracy?
After \(n\) steps the interval width is \(\dfrac{b-a}{2^{\,n}}\). Solve \(\dfrac{b-a}{2^{\,n}}
Which half of the interval do you keep?
Keep the half whose endpoints have opposite signs: \([a,\,c]\) if \(f(a)\) and \(f(c)\) differ in sign, otherwise \([c,\,b]\).
What do you give as the final answer?
The midpoint of the final interval, since taking the midpoint keeps the error to at most half the interval width.