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)=x23x+1x=05f(x)= x^{2}-3x+1 \quad x= 0 \ldots 5

Step 2 — Scan signs

Record the signs at each scan point.

xf(x)sign0+1.0000+11.0000-21.0000-3+1.0000+4+5.0000+5+11.0000+\begin{array}{ccc}\text{x} & \text{f(x)} & \text{sign} \\ \hlmath{0} & \hlmath{+1.0000} & \hlmath{\text{+}} \\ \hlmath{1} & \hlmath{-1.0000} & \hlmath{\text{-}} \\ \hlmath{2} & \hlmath{-1.0000} & \hlmath{\text{-}} \\ \hlmath{3} & \hlmath{+1.0000} & \hlmath{\text{+}} \\ \hlmath{4} & \hlmath{+5.0000} & \hlmath{\text{+}} \\ \hlmath{5} & \hlmath{+11.0000} & \hlmath{\text{+}}\end{array}

Step 3 — First sign change

The first sign change is from 0 to 1.

[0,1][ \hl{0} , \hl{1} ]

Step 4 — Second sign change

The second sign change is from 2 to 3.

[2,3][ \hl{2} , \hl{3} ]

Step 5 — Brackets

The brackets are 0 to 1 and 2 to 3.

[0,1], [2,3][ \hl{0} , \hl{1} ],\ [ \hl{2} , \hl{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.