Numerical Methods · Module 2 of 10
Roots of Equations: Bracketing Methods
To solve f(x) = 0 when algebra cannot, trap the root between two points where the function changes sign, then squeeze the bracket. It is slow but certain, and it comes with a guaranteed error bound.
Readiness check
This module solves f(x) = 0 by brackets. Tick only what you can do closed-notes.
- Evaluate a function at a given point.
- Recognise a sign change as a bracketed root.
- Find the midpoint of an interval.
- Recall relative error and a stopping tolerance.
- Recall a base-2 logarithm.
The core idea
If a continuous function changes sign across an interval, a root lies inside it. Bracketing methods halve or shrink that interval step by step, and the bracket width is a guaranteed bound on the error.
f(a) f(b) < 0 ⇒ root in [a, b]bisection: xr = (a + b)/2error bound = (b − a)/2nA root of f(x) = 0 is where the curve crosses the axis. Bracketing methods start from two points a and b that straddle the root, recognised because f(a) and f(b) have opposite signs, so their product is negative. The bisection method then evaluates the function at the midpoint and keeps whichever half still shows a sign change, halving the bracket each iteration. False position improves on this by joining the endpoints with a straight line and taking its axis crossing, which usually converges faster. The defining strength of bracketing is reliability: once a root is bracketed it can never be lost, and the bracket width is a hard upper bound on the error. After n bisections that bound is the original width divided by 2n, so the number of iterations for any tolerance is known in advance.
The skills, taught in order
Five skills build from bracketing a root to bounding the work it takes.
2.1 Bracketing a root
A continuous function with f(a) and f(b) of opposite signs must cross zero between them. Testing the sign of the product f(a) f(b) confirms a bracketed root before any iteration begins. Graphing or scanning the function locates the brackets.
2.2 The bisection method
Bisection evaluates f at the midpoint xr = (a + b)/2 and replaces whichever endpoint shares its sign, keeping the half that still brackets the root. The bracket halves each iteration, a steady and certain march toward the root.
| Method | New estimate | Speed | Reliability |
|---|---|---|---|
| Bisection | midpoint (a + b)/2 | slow, linear | always converges |
| False position | line through endpoints | usually faster | always converges |
Both bracketing methods are guaranteed to converge; false position usually does so in fewer steps.
2.3 False position
False position (regula falsi) draws a straight line between the endpoints and takes its x-intercept as the estimate, xr = b − f(b)(a − b)/(f(a) − f(b)). Because it weights toward the endpoint nearer the root, it usually converges faster than bisection while keeping the bracket.
2.4 The error bound
The great advantage of bracketing is a guaranteed error bound: the true root lies within the current bracket, so its half-width bounds the error. After n bisections the bound is (b − a)/2n, shrinking by half each step regardless of the function.
2.5 The iteration count
Because the bound halves predictably, the iterations needed for a tolerance Es follow directly: n = ⌈log2((b − a)/Es)⌉. The cost of bisection is known before it is run, a rare certainty in numerical work.
Engineering connection: bracketing gives a fail-safe root finder for a friction factor, an equilibrium temperature, or any equation that resists algebra.
Worked example 1: bisection for the square root of 2
Find the positive root of f(x) = x2 − 2 (the square root of 2, 1.414214) by bisection, starting from the bracket [1, 2]. Carry out four iterations and state the error bound.
- ProblemFind √2 by bisecting f(x) = x2 − 2 on [1, 2] for four iterations, as in Figure 1.
- Given / findf(x) = x2 − 2, a = 1, b = 2. Find the estimate after four iterations and the error bound.
- Assumptionsf is continuous; f(1) = −1 and f(2) = 2 bracket the root.
- Modelxr = (a + b)/2; keep the half with the sign change; bound = (b − a)/2n.
- Equationsxr = (a + b)/2bound = (b − a)/2n
- SolveIter 1: xr = 1.5, f = +0.25, root in [1, 1.5]. Iter 2: xr = 1.25, f = −0.4375, root in [1.25, 1.5]. Iter 3: xr = 1.375, f = −0.109, root in [1.375, 1.5]. Iter 4: xr = 1.4375, f = +0.066, root in [1.375, 1.4375]. Bound = 1/24 = 0.0625.
- CheckThe true root 1.41421 lies inside the final bracket [1.375, 1.4375], and |1.41421 − 1.4375| = 0.023, within the 0.0625 bound, as guaranteed.
- ConclusionBisection closes in steadily on √2. It is slow, but the error bound is certain and known at every step.
Worked example 2: how many iterations for a tolerance
For the same bracket [1, 2], how many bisection iterations are needed to guarantee the error is below 0.001? Confirm the resulting bound.
- ProblemFind the bisection iterations needed for an error below 0.001 on [1, 2], as in Figure 2.
- Given / findBracket width b − a = 1, tolerance Es = 0.001. Find n and the bound at n.
- AssumptionsBisection halves the bracket exactly each step.
- ModelThe bound after n steps is (b − a)/2n; solve (b − a)/2n ≤ Es for n.
- Equations(b − a)/2n ≤ Esn = ⌈log2((b − a)/Es)⌉
- Solven = ⌈log2(1/0.001)⌉ = ⌈log2(1000)⌉ = ⌈9.97⌉ = 10. The bound at n = 10 is 1/210 = 0.000977.
- Check0.000977 is just below 0.001, confirming ten iterations suffice while nine (bound 0.00195) would not.
- ConclusionBisection's cost is predictable: ten iterations guarantee three-decimal accuracy here, known before the method is even run.
Misconceptions and diagnostics
| Mistake | Symptom | Diagnostic question | Correction |
|---|---|---|---|
| No sign change | Method diverges or stalls | "Is f(a) f(b) negative?" | Confirm a bracketed root before iterating. |
| Keeping the wrong half | Bracket loses the root | "Which half still changes sign?" | Keep the half where the product is negative. |
| Even-multiplicity root | No sign change at a real root | "Does the curve touch without crossing?" | Bracketing misses such roots; use an open method. |
| Forgetting the bound | Accuracy claimed without proof | "What is the bracket half-width?" | Report (b − a)/2n as the error bound. |
Practice ladder
For f(x) = x2 − 2 on [1, 2], find the first bisection estimate and its function sign.
Show answer
xr = 1.5, f(1.5) = 0.25 > 0, so the root lies in [1, 1.5].
How many bisections on a width-2 bracket guarantee an error below 0.01?
Show answer
n = ⌈log2(2/0.01)⌉ = ⌈log2(200)⌉ = ⌈7.64⌉ = 8 iterations.
Apply one false-position step to f(x) = x2 − 2 on [1, 2].
Show answer
xr = a − f(a)(b − a)/(f(b) − f(a)) = 1 − (−1)(1)/(2 − (−1)) = 1 + 1/3 = 1.333. Since f(1.333) < 0, the root lies in [1.333, 2].
You must solve a nonlinear equation for an equilibrium and cannot risk a method that fails. Argue why bracketing is the safe first choice and what it costs.
What good work looks like
Bracketing cannot lose a bracketed root and gives a guaranteed bound, so it is the safe choice; the cost is slow, linear convergence, often refined later with a faster open method once the root is well located.
Working with AI, and proving it yourself
Use AI as an examiner, not a solver
Portfolio task
Solve a real nonlinear equation by bisection, tabulate the bracket and bound each iteration, and predict the iteration count in advance from the tolerance.
Retrieval and spaced review
Closed notes. Answer out loud, then reveal.
1. How do you know a root is bracketed?
The function changes sign: f(a) f(b) < 0.
2. What is the bisection estimate?
The midpoint xr = (a + b)/2.
3. Write the bisection error bound.
(b − a)/2n after n iterations.
4. How many iterations for a tolerance Es?
n = ⌈log2((b − a)/Es)⌉.
5. When does bracketing fail to find a root?
At an even-multiplicity root, where the curve touches without a sign change.
Textbook mapping
This module follows Chapra and Canale, Numerical Methods for Engineers, 7th edition. Use these references to read further.
| Topic in this module | Where to read more |
|---|---|
| Bracketing and graphical methods | Chapra & Canale, Chapter 5 |
| The bisection method and error bound | Chapra & Canale, Chapter 5 |
| False position | Chapra & Canale, Chapter 5 |
Chapter numbers refer to the 7th edition. The bracketing methods are standard, so any recent edition will align closely.