Iterative methods need a halting rule. Two common criteria are small step-change (|x_n - x_{n-1}| < tol) and small residual (|f(x_n)| < tol). Applied to Newton's method on f(x)=x²-2 from x0=2 with tol=0.05: the iteration stops at step 3 when the step-change drops to 0.0025.

Example

Track step changes and stop when the tolerance rule is satisfied.

highlighted = computed this step

Step 1 — Set up

Start at 2 with tolerance 0.0500.

f(x)=x22x0=2tol=0.0500f(x)= x^{2}-2 \quad x_{ 0 }= 2 \quad \text{tol}= 0.0500

Step 2 — Iteration 1

Add stopping row 1 to the table.

nx ndeltastop11.50000.5000NO\begin{array}{cccc}\text{n} & \text{x n} & \text{delta} & \text{stop} \\ \hlmath{1} & \hlmath{1.5000} & \hlmath{0.5000} & \hlmath{\text{NO}}\end{array}

Step 3 — Iteration 2

Add stopping row 2 to the table.

nx ndeltastop11.50000.5000NO21.41670.0833NO\begin{array}{cccc}\text{n} & \text{x n} & \text{delta} & \text{stop} \\ 1 & 1.5000 & 0.5000 & \text{NO} \\ \hlmath{2} & \hlmath{1.4167} & \hlmath{0.0833} & \hlmath{\text{NO}}\end{array}

Step 4 — Iteration 3

Add stopping row 3 to the table.

nx ndeltastop11.50000.5000NO21.41670.0833NO31.41420.0025YES\begin{array}{cccc}\text{n} & \text{x n} & \text{delta} & \text{stop} \\ 1 & 1.5000 & 0.5000 & \text{NO} \\ 2 & 1.4167 & 0.0833 & \text{NO} \\ \hlmath{3} & \hlmath{1.4142} & \hlmath{0.0025} & \hlmath{\text{YES}}\end{array}

Step 5 — Stop

Stop at iteration 3 because 0.0025 is less than 0.0500.

stop at n=3d=0.0025<0.0500\text{stop at }n= \hl{3} \quad d= \hlmath{0.0025} < 0.0500
stopping-criteria-and-residual At each iterate x_n, compute the step-change d_n = |x_n - x_{n-1}|. Stop when d_n < tol (step-change criterion) or when |f(x_n)| < tol (residual criterion). Newton's method on x²-2 converges fast, making tol=0.05 tight enough to stop at iteration 3.