17.2 KB · commit a9602da
← Previous: NM-2.1 Fundamentals | 🏠 Index | Next: NM-2.3 False Position →
Section: A (Numerical Methods) | Priority: 🔴 | Exam Frequency: 5/8 years Sources: Jain Ch.2 §2.2, Topicwise NM-2.2, Fahad Notes §02
Bisection is the only root finder that cannot fail. That guarantee is why it is the fallback inside every production solver, and why three papers have asked you to write its algorithm. The exam gives you three question shapes: explain the method and write the algorithm, write the algorithm alone, or run two iterations on a given polynomial. All three need the same six steps.
Bisection method basis: "if a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b." — Jain, §2.2
Relative error (termination test): "εr=xr′xr′−xr×100% where xr′ is the new value of xr." — Jain, §2.2
Bisection: A bracketing method that repeatedly halves the interval [a,b] and keeps the half that still contains a sign change, so the root is trapped in a shrinking interval.
You have a continuous f that changes sign on [a,b]. So a root sits somewhere inside. You do not know where, so you cut the interval in half and test which half still changes sign. Keep that half. Repeat.
The interval width after n halvings is:
widthn=2nb0−a0And the midpoint you keep has error at most half the width:
∣xn−r∣≤2n+1b0−a0This is the only place in NM-2 where you know the error bound before you start. That is the whole selling point.

Figure 2.0: the Intermediate Value Theorem, which is what licenses bisection. f is continuous on [a,b] and f(a)<k<f(b), so the level y=k is crossed at some ξ in between. Bisection is a numerical procedure for pinning down that ξ. Without continuity the crossing is not guaranteed, and the method has no justification.

Figure 2.1 (Jain, p. 24): each bisection replaces the bracketing interval by half of itself. The interval can only shrink, so the root cannot escape.
2017 Q.3(c) asks for the algorithm with a test for relative accuracy. Step 5 then becomes:
∣ea∣=cc−cold×100%Accept c when ∣ea∣<εr, or when ∣f(c)∣<ε. The old midpoint is stored at step 6.
Because the interval halves each step, ∣ea∣ roughly halves each step too. So when ∣ea∣ drops below the tolerance, the remaining uncertainty is at most the current interval width, and the reported number is a valid statement of how far the answer may be from the truth.
Rearrange the width formula for a target tolerance ε:
n=⌈log2εb−a⌉Worked: on [1,2] with ε=0.001, that is n≥log2(1000)≈9.97, so ten iterations. Bisection is worth writing an algorithm for precisely because of this closed count. Newton is faster, but you cannot predict how long it will take.
Merits. Convergence is guaranteed whenever the initial interval brackets a root and f is continuous. Exactly one evaluation of f per step. The error bound is computable in advance.
Demerits. Slow compared with Newton or regula falsi, because halving discards half the information each step. The iteration count is fixed by the tolerance, not by the shape of f. And a bracketing interval must be found first, which is impossible for an even-multiplicity root.
Problem. Bisect f(x)=x3−x−2 on [1,2] and watch the bracket narrow.
Step 1. Confirm the bracket. f(1)=1−1−2=−2<0 and f(2)=8−2−2=4>0. The sign changes, so a root is inside.
Step 2. March. Each row takes the midpoint of the row above and keeps the half where the sign flips.
| Iteration | a | b | c=(a+b)/2 | f(c) | b−a |
|---|---|---|---|---|---|
| 1 | 1 | 2 | 1.500000 | −0.1250 | 1 |
| 2 | 1.5 | 2 | 1.750000 | 1.6094 | 0.5 |
| 3 | 1.5 | 1.75 | 1.625000 | 0.6660 | 0.25 |
| 4 | 1.5 | 1.625 | 1.562500 | 0.2522 | 0.125 |
| 5 | 1.5 | 1.5625 | 1.531250 | 0.0591 | 0.0625 |
| 6 | 1.5 | 1.53125 | 1.515625 | −0.0341 | 0.03125 |
Step 3. Read the result. The true root is x=1.5214. After six halvings the width is 0.03125, so the half-width 0.015625 bounds the error and the approximate relative error is under 1.1%.
n=⌈log2εb−a⌉Problem. Use the bisection method to find a root in the interval, up to two iterations.
Source: 2024 Q.2(a) [Marks: 03, CO: 2]
Step 1. Factor first, because it is the free check.
x3−6x2+11x−6=(x−1)(x−2)(x−3)The three roots are exactly 1, 2 and 3. Any bisection run must converge to one of them. A run that converges anywhere else is wrong, and this is the check to apply before trusting any number.
Step 2. Choose the interval. The paper prints none, so state your choice. Take [2.5,3.4], which brackets x=3 without landing on it.
f(2.5)=15.625−37.5+27.5−6=−0.375,f(3.4)=39.304−69.36+37.4−6=+1.344f(2.5)⋅f(3.4)=−0.504<0, so a root lies in (2.5,3.4).
Step 3. Iteration 1. Midpoint x1=(2.5+3.4)/2=2.95.
f(2.95)=25.6724−52.2150+32.45−6=−0.092625f(2.95)<0, same sign as f(2.5), so the root is in (2.95,3.4).
Step 4. Iteration 2. Midpoint x2=(2.95+3.4)/2=3.175.
f(3.175)=32.005984−60.483750+34.925−6=+0.447234f(3.175)>0, so the root is in (2.95,3.175).
x2=3.175,root∈(2.95, 3.175),true root=3Step 5. Check the width. Each iteration halves the width, so widthn=2nb0−a0. Here b0−a0=3.4−2.5=0.9, and after two iterations the bracket is (2.95,3.175), of width 0.225. That matches 0.9/22=0.9/4=0.225.
The maximum error bound for the midpoint after n iterations is ∣xn−r∣≤2nb0−a0. For n=2:
∣x2−r∣≤220.9=0.225Since the true root is r=3, the actual error is ∣3.175−3∣=0.175, which satisfies the theoretical bound:
guaranteed: root∈(2.95,3.175),∣3.175−3∣=0.175≤0.225| Year | Question | Data Given | Key Answer |
|---|---|---|---|
| 2024 Q.2(a) | Two iterations of bisection | f(x)=x3−6x2+11x−6, interval not printed | x2=3.175,root∈(2.95, 3.175),true root=3 |
| 2017 Q.3(c) | Explain and write the algorithm with a relative accuracy test | none (06 marks, theory) | Algorithm plus $ |
| 2018 Q.2(a) | Develop an algorithm for the bisection method | none (04 marks, theory) | Algorithm plus n=⌈log2εb−a⌉ |
Appeared: 2017 Q.3(c) — (06 marks)
Full Answer:
The method. Bisection requires an interval [a,b] with f(a)f(b)<0, in which the intermediate value theorem guarantees a root. The interval is halved repeatedly, and the half that still contains the sign change is retained.
Algorithm.
The relative accuracy test, in detail. The approximate relative error after step k is
∣ea∣k=ckck−ck−1×100%It measures the change between successive midpoints, not the distance from the current midpoint to the true root. Because the interval halves each time, ∣ea∣ roughly halves each time too, so it is a reliable monitor: when it falls below εr the remaining uncertainty is at most the current interval width, and the computed relative error is a valid statement of how far the answer may be from the true root.
Convergence. After n halvings the interval has width 2nb−a, and the midpoint error is at most half that. The number of iterations needed for a target tolerance is therefore known in advance:
n=⌈log2εb−a⌉Merits and demerits. Guaranteed convergence from a valid bracket, and one evaluation of f per step. Slow compared with Newton or regula falsi. The count is fixed by the tolerance rather than by the shape of f. And a bracket must be found first.
Appeared: 2018 Q.2(a) — (04 marks)
Full Answer:
Bisection solves f(x)=0 on an interval [a,b] in which f changes sign, by repeatedly halving the interval and retaining the half that still contains the sign change.
Algorithm.
Convergence. After n bisections the interval has width 2nb−a, and the error in the midpoint is at most 2n+1b−a. Halving the interval therefore halves the error, and the number of iterations needed for error below ε is
n=⌈log2εb−a⌉Merits and demerits. The method is guaranteed to converge whenever the initial interval brackets a root and f is continuous, and the error is known in advance. It requires only one evaluation of f per step. Its drawbacks are that convergence is slow compared with Newton or regula falsi, that the number of iterations is fixed by the tolerance rather than by the shape of f, and that a bracketing interval must be found first.
Appeared: 2024 Q.2(a) — (03 marks, CO: 2)
The full solution is the second Worked Example above. The essential points for the exam answer:
f(x)=x3−6x2+11x−6=(x−1)(x−2)(x−3) f(2.5)=−0.375,f(3.4)=+1.344,f(2.5)f(3.4)=−0.504<0Iteration 1: x1=2.95, f(2.95)=−0.092625, root in (2.95,3.4).
Iteration 2: x2=3.175, f(3.175)=+0.447234, root in (2.95,3.175).
x2=3.175,root∈(2.95, 3.175),true root=3The interval halves each time, so after n iterations its width is 2nb0−a0, and the answer is known to lie inside it. This is the feature that makes bisection valuable despite being slow: the error is bounded at every step, whether or not the iteration has converged.
Why bisection is chosen here. The marks are for the method, not the algebra, so the factoring is the check rather than the answer. The question asks for the bracketing procedure, and the demonstration of it needs a valid bracket, which needs a sign change.
← Previous: NM-2.1 Fundamentals | 🏠 Index | Next: NM-2.3 False Position →