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)=x2−2x0=2tol=0.0500
Step 2 — Iteration 1
Add stopping row 1 to the table.
n1x n1.5000delta0.5000stopNO
Step 3 — Iteration 2
Add stopping row 2 to the table.
n12x n1.50001.4167delta0.50000.0833stopNONO
Step 4 — Iteration 3
Add stopping row 3 to the table.
n123x n1.50001.41671.4142delta0.50000.08330.0025stopNONOYES
Step 5 — Stop
Stop at iteration 3 because 0.0025 is less than 0.0500.
stop at n=3d=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.