On this page
No school algebra turns cos x = x into "x equals a formula". Fixed-point iteration solves it anyway with a calculator, and one derivative tells you in advance whether it will work.
What is fixed-point iteration?
A fixed point of a function g is a number that g leaves unchanged, so g(x*) = x*.
Fixed-point iteration computes a fixed point by applying g again and again, x₍ₙ₊₁₎ = g(xₙ), starting from a guess x₀, and if g is continuous and the sequence settles, its limit is a fixed point (fixed-point iteration, Wikipedia).
To solve f(x) = 0, rearrange it as x = g(x); every root of f is then a fixed point of g. For cos x − x = 0 the obvious choice is g(x) = cos x. The catch: one equation has many rewrites, and some never converge.
How do you draw a cobweb diagram?
A cobweb plot draws the curve y = g(x) and the diagonal y = x on the same axes, then traces each step of the iteration as a vertical and a horizontal line; the technique goes back to Adrien-Marie Legendre in 1822 (cobweb plot, Wikipedia). The steps:
Draw y = g(x) and y = x. Every crossing is a fixed point.
From x₀ on the x-axis, go straight up (or down) to the curve. The height you reach is g(x₀) = x₁.
Go sideways to the line y = x. You are now directly above x₁.
Go up or down to the curve again. That height is x₂. Repeat steps 3 and 4.
A shrinking staircase or inward spiral means convergence; a growing one means divergence. The diagram above is the cobweb for g(x) = cos x from x₀ = 1.
Worked example: solving cos x = x step by step
Set your calculator to radians, type 1, and press cos ten times. Rounded to six places, we get:
x₁ = 0.540302
x₂ = 0.857553
x₃ = 0.654290
x₄ = 0.793480
x₅ = 0.701369
x₆ = 0.763960
x₇ = 0.722102
x₈ = 0.750418
x₉ = 0.731404
x₁₀ = 0.744237
The values hop across the answer while the hops shrink. The limit is 0.739085133…, the only real solution of cos x = x (OEIS A003957). It is called the Dottie number, a name Samuel R. Kaplan gave it in 2007 after a professor of French who noticed it by pressing the cos key on her calculator again and again (Kaplan, Mathematics Magazine; Dottie number, Wikipedia).
Why does |g′(x)| < 1 decide whether it converges?
Call the root x*. Because g(x*) = x*, the mean value theorem gives
x₍ₙ₊₁₎ − x* = g(xₙ) − g(x*) = g′(c)(xₙ − x*)
for some c between xₙ and x*. Near the root, each step multiplies the error by roughly g′(x*):
If |g′(x*)| < 1, the error shrinks and the iteration converges.
If |g′(x*)| > 1, the error grows and the guesses run away.
A negative g′ flips the error's sign each step (a spiral); a positive one approaches from one side (a staircase).
Formally, if g is continuously differentiable near a fixed point and |g′(x*)| < 1, that fixed point attracts the iteration (fixed-point iteration, Wikipedia). At |g′(x*)| = 1 the test is silent; the same page notes x = sin x creeps to 0 very slowly.
For g(x) = cos x, g′(x*) = −sin x* ≈ −0.674: below 1 in size, so it converges, and negative, so the list alternates. That factor costs about 5.8 steps per extra correct decimal, since ln 10 ÷ ln(1/0.674) ≈ 5.8.
Now take the other rewrite, x = arccos x, where g′(x*) = −1/sin x* ≈ −1.48. From 0.7 the guesses go 0.795, 0.651, 0.862, 0.532, 1.010, each roughly one and a half times farther from the root.
How do you choose a rewrite that converges?
Find a rough root from a sketch or a sign change of f.
Write two or three rearrangements x = g(x).
Estimate |g′| for each at the rough root and keep the smallest. Under 1 is required; smaller means fewer steps.
If all fail, try g(x) = x − f(x)/f′(x), Newton's method as a fixed-point iteration; at a simple root its g′ is 0.
After a few steps, check that gaps between guesses shrink by a steady factor. That factor estimates |g′|.
If the mean value theorem step felt shaky, the Fermi Concept Library has a lesson for every mathematics concept. If a rearrangement keeps diverging and you cannot see why, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Next time you meet x = e⁻ˣ or x³ = x + 1, compute |g′| for two rewrites and predict the winner before you press a key.



