Calculator · Engineering Mathematics

Fixed-Point Iteration Calculator

Iterate xₙ₊₁ = g(xₙ) from a starting guess to a fixed point x* = g(x*), with the cobweb diagram showing whether the chosen rearrangement contracts or diverges near it.

Problem definition

Operators + − * / ^, parentheses, pi and e, and sin, cos, tan, asin, acos, atan, exp, sqrt, abs, ln, log, log10. Write 2*x, not 2x.

Results

Fixed point x*0.7391
Residual f(x*)-1.182e-9
Iterations50
Function evaluations101
Final step |Δx|1.755e-9
StatusStopped — iteration limit reached before the tolerance was met
Local contraction |g′(x*)|not reported — the iteration did not converge to a fixed point

Cobweb diagram

Cobweb diagram of xₙ₊₁ = cos(x), from x₀ = 1

Iteration history

Fixed-point iterations
nxₙg(xₙ)step Δxf(xₙ)
110.5403-0.4597-0.4597
20.54030.85760.31730.3173
30.85760.6543-0.2033-0.2033
40.65430.79350.13920.1392
50.79350.7014-0.09211-0.09211
60.70140.7640.062590.06259
70.7640.7221-0.04186-0.04186
80.72210.75040.028320.02832
90.75040.7314-0.01901-0.01901
100.73140.74420.012830.01283
110.74420.7356-0.008633-0.008633
120.73560.74140.005820.00582
130.74140.7375-0.003918-0.003918
140.73750.74010.002640.00264
150.74010.7384-0.001778-0.001778
160.73840.73960.0011980.001198
170.73960.7388-8.069e-4-8.069e-4
180.73880.73935.436e-45.436e-4
190.73930.7389-3.661e-4-3.661e-4
200.73890.73922.466e-42.466e-4
210.73920.739-1.661e-4-1.661e-4
220.7390.73911.119e-41.119e-4
230.73910.7391-7.539e-5-7.539e-5
240.73910.73915.078e-55.078e-5
250.73910.7391-3.421e-5-3.421e-5
260.73910.73912.304e-52.304e-5
270.73910.7391-1.552e-5-1.552e-5
280.73910.73911.046e-51.046e-5
290.73910.7391-7.043e-6-7.043e-6
300.73910.73914.744e-64.744e-6
310.73910.7391-3.196e-6-3.196e-6
320.73910.73912.153e-62.153e-6
330.73910.7391-1.450e-6-1.450e-6
340.73910.73919.768e-79.768e-7
350.73910.7391-6.580e-7-6.580e-7
360.73910.73914.432e-74.432e-7
370.73910.7391-2.986e-7-2.986e-7
380.73910.73912.011e-72.011e-7
390.73910.7391-1.355e-7-1.355e-7
400.73910.73919.126e-89.126e-8

Showing the first 40 of 50 iterations.

Continue

Open in Root Finding Lab

g(x), x₀, the tolerance and the iteration limit continue into the Lab, with fixed-point iteration enabled. The optional residual travels as it stands — when you have not supplied one, the Lab receives none.

Assumptions & validity

  • · g is continuous near the fixed point.
  • · The iteration stays within the region of interest — it is not clamped or restarted.
  • · |g′(x*)| is a LOCAL diagnostic, not a global guarantee. It is estimated by a central difference only after the iteration converges, at the fixed point itself, and its two evaluations are included in the reported evaluation count.
  • · The residual check, when a residual f is supplied, is only as meaningful as the f you provide.

Technical reference

Iteration: xₙ₊₁ = g(xₙ)

Fixed point: x* = g(x*)

Local convergence condition: |g′(x*)| < 1

Asymptotic error: |eₙ₊₁| ≈ |g′(x*)| · |eₙ|

g
the iteration map xₙ₊₁ = g(xₙ)
xₙ
the nth iterate
x*
the fixed point, x* = g(x*)
eₙ
the error xₙ − x*
f
optional residual, the equation f(x) = 0 the fixed point is meant to solve

Solving f(x) = 0 by this method requires you to choose a rearrangement x = g(x) yourself — different rearrangements of the same equation converge, diverge or oscillate, and this tool deliberately does not invent one for you.

Reading the diagnostic: |g′(x*)| < 1 means the map is locally contractive, so the fixed point is locally attractive; |g′(x*)| > 1 means it is locally repelling, so ordinary fixed-point iteration is locally unstable there; |g′(x*)| = 1 leaves the first-derivative test inconclusive. The estimate is a finite difference, not an exact value, so a result within numerical noise of 1 is reported as inconclusive rather than decided.

|g′(x*)| < 1 is a LOCAL condition and a diagnostic, not a guarantee. A global guarantee needs |g′| ≤ k < 1 on a whole interval that g maps into itself (the contraction mapping theorem).

Where it applies, convergence is linear, with asymptotic rate |g′(x*)|.

When a residual f is supplied, a negligible step whose residual is still large is reported as stalled rather than converged. The residual test is normalised by the characteristic magnitude of f, so supplying c·f instead of f does not change the verdict. Without a residual, the step test certifies a fixed point of g only.

Related tools