The bisection method finds a root of f(x) by halving an
interval [a,b] where f(a) and f(b) have opposite signs.
Apply to f(x)=x²-2 on [1,2]: after 3 steps the root
lies in [1.375,1.5], interval width 0.1250.
Example
Add one bisection row per iteration until the bracket is narrow enough.
highlighted = computed this step
Step 1 — Set up
Start with the bracket from 1 to 2.
f(x)=x2−2[1,2]
Step 2 — Iteration 1
Add bisection iteration 1 to the table.
n1a1.0000b2.0000m1.5000f(m)+0.2500updateb=m
Step 3 — Iteration 2
Add bisection iteration 2 to the table.
n12a1.00001.0000b2.00001.5000m1.50001.2500f(m)+0.2500−0.4375updateb=ma=m
Step 4 — Iteration 3
Add bisection iteration 3 to the table.
n123a1.00001.00001.2500b2.00001.50001.5000m1.50001.25001.3750f(m)+0.2500−0.4375−0.1094updateb=ma=ma=m
Step 5 — Bracketed root
The final bracket is 1.3750 to 1.5000 with width 0.1250.
[1.3750,1.5000]w=0.1250
bisection-method
If f(a)<0 and f(b)>0, a root exists in [a,b]. Compute midpoint m=(a+b)/2. If f(m) has the same sign as f(a), replace a with m; otherwise replace b with m. Repeat.