Visualize fixed-point iteration — rewrite an equation as x = g(x) and repeat x_{n+1} = g(x_n). Change the map g(x), the starting value and the step count to watch the cobweb diagram spiral into a fixed point or fly apart, and to see exactly what the convergence condition |g'(x*)|<1 means.
Parameters
Fixed-point map g(x)
Right-hand side of x = g(x). The iteration is x_{n+1}=g(x_n)
Initial value x0
The first value that starts the iteration
Max iterations
steps
Stop after at most this many steps
Results
—
Fixed point x*
—
Value after iteration x_n
—
Coefficient |g'(x*)|
—
Iterations run
—
Converged / Diverged
—
Final error |Δx|
—
Cobweb diagram — the iteration path
The curve y=g(x) and the line y=x are drawn; starting at x0, the path repeats "vertical to the curve → horizontal to y=x". Spiralling into the intersection means convergence; spreading outward means divergence.
Iterate convergence — x_n vs iteration n
Error history — |x_n − x*| (log scale)
Theory & Key Formulas
$$x_{n+1}=g(x_n),\qquad x^{ }=g(x^{ })$$
The fixed-point recurrence. The fixed point x* is left unchanged by the map g and corresponds to the intersection of the curve y=g(x) with the line y=x.
$$|g'(x^{*})|\lt 1$$
The local convergence (contraction) condition. When the magnitude of g's slope at the fixed point is below 1, the iteration converges to x*. Above 1, x* becomes a repelling point and the iteration diverges.
The error is multiplied by roughly the factor |g'(x*)| each step (linear convergence). The smaller |g'(x*)| is, the faster the convergence.
What is the Picard Iteration (Fixed-Point) Simulator?
🙋
Is it really true that you can solve an equation just by repeating the same calculation over and over? That sounds almost magical.
🎓
It really is true, roughly speaking. The trick is to rewrite the equation in the form "x = g(x)". If you want to solve cos(x) = x, for instance, it is already in that shape. Then you just put any starting value x0 into a calculator and keep pressing the cos button. Press cos repeatedly from x0=1 and the number settles around 0.739… That value is the "fixed point" — the point that g leaves unchanged.
🙋
I've done that on a calculator — pressing cos again and again until it stops changing! So that was the solution all along. But does this work for any equation?
🎓
That is exactly the catch — it does not always converge. The decider is the slope of g at the fixed point, |g'(x*)|. If that is below 1, the map g shrinks distances — it is a "contraction" — so the error gets smaller each step and you spiral into the solution. If it is above 1, instead of approaching you get flung away every step, and the iteration diverges. Pick "g(x)=2x−1" from the menu on the left: its slope is always 2, so any starting value other than 1 blows up.
🙋
You're right — it diverged and it printed "Diverged"! So even when it does converge, is there a fast-versus-slow difference?
🎓
There is. Fixed-point iteration is "linearly convergent": the error shrinks by roughly the factor |g'(x*)| each step. So the smaller |g'| is, the faster. For cos, |g'|≈0.67 at the fixed point, so the error drops to about two-thirds each time — decent. But if |g'| is close to 1, say 0.95, it only drops 5% per step and you make almost no progress over dozens of iterations. View the error chart below on a log scale and a converging case falls along a clean straight line whose slope is log|g'|.
🙋
When I pick "g(x)=(x+2/x)/2" it converges to √2 in just a few steps. Why is that one so unusually fast?
🎓
Nice spot. That one is actually the Babylonian method — Newton's method applied to x²−2=0. This g has g'(√2)=0 at its fixed point. A linear coefficient of zero means the first-order error term vanishes, and you actually get "quadratic convergence" — the error is roughly squared each step, plummeting fast. So three or four steps reach the calculator's display precision. The same equation x²=2 written as x=2/x diverges, but written as x=(x+2/x)/2 it is ultra-fast. How you rewrite the equation completely changes things — that is both the fun and the difficulty of fixed-point iteration.
Frequently Asked Questions
Picard iteration rewrites an equation in the form x = g(x) and, starting from an initial value x0, repeats x_{n+1} = g(x_n) to approach the solution (the fixed point). The fixed point x* satisfies g(x*) = x* — it is the intersection of the curve y=g(x) and the line y=x. For example, iterating g(x)=cos(x) from x0=1 slowly converges to the Dottie number x*≈0.739085. It is extremely simple to implement and underlies many iterative solvers, including Newton's method.
The local convergence condition is |g'(x*)| < 1. When the magnitude of the slope of g near the fixed point x* is below 1, g is a contraction mapping, so the error shrinks every step and the iteration converges to x*. If |g'(x*)| > 1, the fixed point is repelling and the iteration diverges no matter how close the start is. This tool's g(x)=2x−1 has |g'|=2>1, so it always diverges for x0≠1. The boundary case |g'(x*)|=1 is neutral and depends on higher-order terms.
Fixed-point iteration is linearly convergent: the error e_n = x_n − x* is multiplied by roughly the factor |g'(x*)| each step. So the smaller |g'(x*)| is, the faster the convergence. With |g'|=0.5 the error roughly halves each time; with |g'|=0.95 it drops only 5% per step and convergence becomes very slow. On the log-scale error chart, a converging case shows the error falling along a nearly straight line whose slope corresponds to log|g'(x*)|.
Divergence means |g'(x*)| ≥ 1 at the fixed point. The fix is to rewrite the same equation with a different choice of g(x). For instance, to solve x²=2, instead of x=2/x (|g'|=2, diverges) use x=(x+2/x)/2, whose fixed point √2 has |g'|=0 and converges extremely fast. Using the inverse map x=g⁻¹(x) or adding a relaxation factor ω so that x_{n+1}=(1−ω)x_n+ω·g(x_n) are also effective remedies.
Real-World Applications
Solving non-linear equations: Fixed-point iteration is the most basic tool for numerically solving non-linear equations f(x)=0 that cannot be solved analytically. You simply rewrite f(x)=0 in the form x=g(x) and iterate — it runs on a spreadsheet's circular references or the tiniest embedded microcontroller. Newton's method, x_{n+1}=x_n−f(x_n)/f'(x_n), can itself be understood as a special fixed-point iteration with g(x)=x−f(x)/f'(x).
CAE and iterative solvers for systems of equations: Non-linear finite-element and finite-volume analyses solve huge systems of equations at each time or load step. Iterative solvers such as Jacobi, Gauss-Seidel and SOR are all matrix-form fixed-point iterations x_{n+1}=Mx_n+c. The convergence condition "spectral radius of the iteration matrix M < 1" is the multi-dimensional generalization of this tool's |g'(x*)|<1.
Coupled fluid and heat-transfer analysis: The SIMPLE algorithm that alternates pressure and velocity, fluid-structure interaction (FSI) that shuttles between fluid and structure, and conduction-radiation coupling all repeat "fix one field, solve the other" as a fixed-point iteration. Adding an under-relaxation factor so that x_{n+1}=(1−ω)x_n+ω·g(x_n) is a classic way to push the effective |g'| below 1 and prevent divergence.
Ordinary differential equations and Picard's existence theorem: The name "Picard iteration" comes from Picard's method of successive approximations, used to prove existence and uniqueness of solutions to ODEs dy/dx=f(x,y). The integral equation y(x)=y0+∫f(t,y(t))dt is treated as a map, and a sequence of functions is iterated to converge on the solution. The Banach fixed-point theorem (the contraction-mapping principle) is the mathematical backbone that guarantees this convergence.
Common Misconceptions and Pitfalls
The most common pitfall is assuming there is only one way to rewrite f(x)=0 as x=g(x). For the same equation there are infinitely many choices of g(x), and whether it converges — and how fast — depends entirely on that choice. This tool's x²=2 is a good example: written as x=2/x the fixed point has |g'|=2 and diverges; written as x=(x+2/x)/2 it has |g'|=0 and converges quadratically. Concluding "this equation cannot be solved by iteration" just because one form diverged is premature — a different g almost always rescues it.
Next, mistaking the convergence condition for something the initial value controls. The condition |g'(x*)|<1 is a property of the fixed point x*, not a matter of a good or bad starting guess. If x* is a repelling point (|g'|>1), the iteration diverges no matter how close to x* you start. Conversely, if x* is an attracting point (|g'|<1), any sufficiently close start always converges. The initial value matters for "which fixed point you land on when there are several" or "whether you start outside the basin of convergence" — that is separate from the convergence of the map itself.
Finally, assuming "the iteration stopped" means "it converged to the correct solution". Meeting the stopping criterion |x_{n+1}−x_n|<ε only tells you the step size has become small. When convergence is extremely slow (|g'| very close to 1), the update can become tiny while you are still far from the solution, producing a false convergence verdict. In practice it is important to also check the residual |f(x)| itself and to distinguish between hitting the iteration limit and truly converging. This tool shows both the final error and the iterations run, so try comparing the two.
How to Use
Enter the fixed-point function g(x) in the input field (e.g., g(x) = cos(x) or g(x) = 0.5*x + 1)
Set initial value x₀ using x0Num slider (range –10 to 10) or x0Range text box for precise entry
Specify maximum iterations via itNum slider or itRange input, then click Run to animate the cobweb diagram and convergence plot
Monitor |g'(x*)| coefficient: convergence occurs when |g'(x*)| < 1 at the fixed point
Worked Example
For g(x) = 0.5x + 2 with x₀ = 0 and 20 iterations: the fixed point is x* = 4 (solving x = 0.5x + 2). Starting from x₀ = 0, iterations produce x₁ = 2, x₂ = 3, x₃ = 3.5, approaching x* = 4. Here g'(x) = 0.5, so |g'(x*)| = 0.5 < 1, guaranteeing linear convergence with rate 0.5. Final error after 20 steps: |Δx| ≈ 0.000001.
Practical Notes
For Newton-Raphson equivalence, use g(x) = x – f(x)/f'(x) to solve f(x) = 0 via fixed-point iteration
Divergence occurs when |g'(x*)| > 1: e.g., g(x) = 2x – 1 with |g'(x*)| = 2 diverges from any x₀ ≠ 1
Cobweb oscillation (spiraling) indicates |g'(x*)| is negative; slower spiral means |g'(x*)| closer to –1
Engineering example: solving x = log(x) + 2 in stress-strain models requires rearranging as fixed-point g(x) = exp(x – 2)