Interactive Fixed Point Iteration Calculator
Enter an iteration function g(x) and an initial guess. The solver computes xn+1 = g(xn) until the error is below your tolerance.
What is a fixed point?
A fixed point of a function is any value x* such that g(x*) = x*. In plain language, if you plug that value into the function, it comes out unchanged.
Fixed points show up in numerical analysis, optimization, economics, machine learning, and dynamical systems.
The fixed point method turns an equation-solving problem into an iteration:
start with an initial guess x₀, then repeatedly apply
xₙ₊₁ = g(xₙ). If the sequence settles down, the limit is your fixed point.
How this calculator works
This tool performs classic fixed point iteration and reports each step in a table. It tracks:
- Iteration number (
n) - Current estimate (
xₙ) - Next estimate (
xₙ₊₁) - Absolute change
|xₙ₊₁ - xₙ|as the stopping error
The computation stops when the absolute change is below your tolerance, or when the max iteration count is reached.
Convergence intuition (why some functions work and others fail)
Rule of thumb
If |g'(x*)| < 1 near the fixed point, iteration is usually stable and converges.
If |g'(x*)| > 1, the method often diverges or oscillates.
Same equation, different rearrangements
A key practical detail: the same equation can be rewritten in many ways, but not all give a good
g(x). For example, to solve x² - 3 = 0, one useful iteration is
g(x) = (x + 3/x)/2 (Newton-style update), which converges rapidly for a sensible starting value.
Example workflow
- Enter
g(x) = cos(x). - Set
x₀ = 0.5, tolerance1e-6, max iterations100. - Click Calculate Fixed Point.
- Review the table and convergence message.
You should see convergence to approximately 0.739085..., the well-known fixed point of cos(x).
Accepted function syntax
You can use standard math operators and common functions:
- Operators:
+ - * / ^(caret is supported as exponent) - Parentheses:
( ) - Variable:
x - Functions:
sin, cos, tan, log, exp, sqrt, absand more - Constants:
pi,e
Common pitfalls
- Bad initial guess: even a convergent mapping can fail far from its fixed point.
- Non-real values: expressions like
sqrt(x)with negativexproduce invalid numbers. - Divergence: if error doesn’t shrink, try a new rearrangement for
g(x). - Overly strict tolerance: tiny tolerances may require many iterations or hit floating-point limits.
Why fixed point methods matter
Fixed point iteration is simple, transparent, and often easy to implement. It also provides intuition: you can literally watch estimates move toward (or away from) a solution. That makes it a great first method for students and a useful baseline for practitioners before switching to more advanced root-finding algorithms.