Before applying a bracketing root-finder, verify that f
changes sign in the search interval. Scanning f(x)=x²-3x+1
at integer points x=0..5 reveals sign changes at [0,1] and
[2,3], confirming two real roots (near 0.382 and 2.618).
Example
Scan signs to locate intervals where a continuous function changes sign.
highlighted = computed this step
Step 1 — Set up
Scan integer points from 0 to 5.
f(x)=x2−3x+1x=0…5
Step 2 — Scan signs
Record the signs at each scan point.
x012345f(x)+1.0000−1.0000−1.0000+1.0000+5.0000+11.0000sign+--+++
Step 3 — First sign change
The first sign change is from 0 to 1.
[0,1]
Step 4 — Second sign change
The second sign change is from 2 to 3.
[2,3]
Step 5 — Brackets
The brackets are 0 to 1 and 2 to 3.
[0,1], [2,3]
bracketing-and-sign-change
By the Intermediate Value Theorem, if f is continuous and f(a)·f(b) < 0, there is at least one root in [a,b]. Scanning f at integer points is a quick way to locate candidate brackets before applying bisection or false position.