HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Numerical Solution of Equations
  1. 1Locating roots and interval bisection
  2. 2Fixed-point iteration
  3. 3The Newton-Raphson method
  1. Mathematics
  2. /Numerical Solution of Equations
  3. /Fixed-point iteration

Course 34.2·Lesson 2 of 3

Fixed-point iteration

Rearrange f(x)=0f(x) = 0f(x)=0 as x=g(x)x = g(x)x=g(x) and repeat xn+1=g(xn)x_{n+1} = g(x_n)xn+1​=g(xn​)

about 30 min1 simulation2 practice questions1 Python program5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Lesson 2 of 3Show all lessonsHide
Numerical Solution of Equations
  1. 1Locating roots and interval bisection
  2. 2Fixed-point iteration
  3. 3The Newton-Raphson method

Try the code and the simulations beside the lesson.

What you will be able to do

  • rearrange an equation as x=g(x)x = g(x)x=g(x) and carry out the iteration;
  • draw and read staircase and cobweb diagrams;
  • use g′(α)g'(\alpha)g′(α) to decide whether an iteration converges, and how fast.

Press the cos key again and again

Set a calculator to radians. Type any number and press cos, again and again. The display settles on 0.739085…0.739085\ldots0.739085… and stays there. What has happened? You have solved x=cos⁡xx = \cos xx=cosx. Each press works out xn+1=cos⁡xnx_{n+1} = \cos x_nxn+1​=cosxn​, and the values close in on the one number that cos leaves unchanged.

Fixed points

A fixed point of ggg is a number α\alphaα with g(α)=αg(\alpha) = \alphag(α)=α. On a graph, it is where y=g(x)y = g(x)y=g(x) meets y=xy = xy=x. To solve f(x)=0f(x) = 0f(x)=0, we rearrange it as x=g(x)x = g(x)x=g(x). Then a root of fff is a fixed point of ggg, and we iterate:

xn+1=g(xn).\displaystyle x_{n+1} = g(x_n).xn+1​=g(xn​).

If the sequence converges, its limit is a fixed point, as long as ggg is continuous.

One equation, three rearrangements

Take x3+2x−5=0x^3 + 2x - 5 = 0x3+2x−5=0 again, with its root α≈1.3283\alpha \approx 1.3283α≈1.3283. Start each time at x0=1.5x_0 = 1.5x0​=1.5.

  • x=12(5−x3)x = \tfrac{1}{2}(5 - x^3)x=21​(5−x3). The values run 0.81250.81250.8125, 2.23182.23182.2318, −3.0583-3.0583−3.0583, and then grow without bound.
  • x=5−2x3x = \sqrt[3]{5 - 2x}x=35−2x​. The values run 1.25991.25991.2599, 1.35361.35361.3536, 1.31861.31861.3186, 1.33191.33191.3319, and close in on α\alphaα.
  • x=5x2+2x = \dfrac{5}{x^2 + 2}x=x2+25​. The values run 1.17651.17651.1765, 1.47751.47751.4775, 1.19531.19531.1953, 1.45831.45831.4583, and close in very slowly.

Why such different behaviour? Look at the slope of each ggg at the root: about −2.65-2.65−2.65, −0.38-0.38−0.38 and −0.94-0.94−0.94.

The rule for convergence

Let en=xn−αe_n = x_n - \alphaen​=xn​−α be the error. By the mean value theorem,

en+1=g(xn)−g(α)=g′(c) en,\displaystyle e_{n+1} = g(x_n) - g(\alpha) = g'(c)\,e_n,en+1​=g(xn​)−g(α)=g′(c)en​,

for some ccc between xnx_nxn​ and α\alphaα. Near the root, g′(c)≈g′(α)g'(c) \approx g'(\alpha)g′(c)≈g′(α). So each step multiplies the error by about g′(α)g'(\alpha)g′(α).

  • If ∣g′(α)∣<1|g'(\alpha)| < 1∣g′(α)∣<1, the errors shrink and the iteration converges from a start close enough to α\alphaα.
  • If ∣g′(α)∣>1|g'(\alpha)| > 1∣g′(α)∣>1, the errors grow and the iteration moves away from α\alphaα.
  • The smaller ∣g′(α)∣|g'(\alpha)|∣g′(α)∣ is, the faster it converges. This is linear convergence: the error falls by a fixed factor each step.

The sign tells the shape of the path:

  • 0<g′(α)<10 < g'(\alpha) < 10<g′(α)<1: a staircase, coming in from one side;
  • −1<g′(α)<0-1 < g'(\alpha) < 0−1<g′(α)<0: a cobweb, jumping from side to side.

For x=cos⁡xx = \cos xx=cosx, g′(α)=−sin⁡α≈−0.67g'(\alpha) = -\sin\alpha \approx -0.67g′(α)=−sinα≈−0.67. That is why the calculator values jump above and below 0.7390.7390.739.

Two panels, each with the line y = x and a curve y = g(x) crossing it at a fixed point. On the left the curve has a positive slope less than 1, and the path of the iteration is a staircase climbing towards the fixed point from one side. On the right the curve has a negative slope, and the path is a cobweb spiralling in, the values jumping from one side of the fixed point to the other.

Reading the error ratio

You can estimate g′(α)g'(\alpha)g′(α) from the iterates alone. The ratio of successive differences, xn+1−xnxn−xn−1\dfrac{x_{n+1} - x_n}{x_n - x_{n-1}}xn​−xn−1​xn+1​−xn​​, tends to g′(α)g'(\alpha)g′(α). For the cube root rearrangement, the differences are about 0.0940.0940.094, −0.035-0.035−0.035 and 0.01330.01330.0133, and their ratios are close to −0.38-0.38−0.38.

Practise with new numbers

Try it in Python

The program runs the three rearrangements of x3+2x−5=0x^3 + 2x - 5 = 0x3+2x−5=0 side by side, and stops one when its values grow too large.

Read it first. Then run it. Which rearrangement wins, and which runs away?

1. Start the cube root one at x0 = 0. Does it still converge?

2. Add a fourth rearrangement, lambda x: math.cos(x), and compare it with the calculator story.

Common mistakes

  • Testing g′g'g′ at the wrong place. The slope that matters is g′(α)g'(\alpha)g′(α), at the root, not at x0x_0x0​.
  • Thinking every rearrangement works. Each has its own g′(α)g'(\alpha)g′(α).
  • Mixing up the shapes. A positive slope gives a staircase, a negative one a cobweb.
  • Stopping when two values agree to two places. With a slope near 111 the iterates creep, and the root may still be far.

Remember these

  • Root of fff is a fixed point of ggg: g(α)=αg(\alpha) = \alphag(α)=α.
  • en+1≈g′(α) ene_{n+1} \approx g'(\alpha)\,e_nen+1​≈g′(α)en​.
  • Converges when ∣g′(α)∣<1|g'(\alpha)| < 1∣g′(α)∣<1, runs away when ∣g′(α)∣>1|g'(\alpha)| > 1∣g′(α)∣>1.
  • Staircase for g′>0g' > 0g′>0, cobweb for g′<0g' < 0g′<0.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. Show that x2−3x+1=0x^2 - 3x + 1 = 0x2−3x+1=0 can be written as x=3−1xx = 3 - \dfrac{1}{x}x=3−x1​.
  1. For g(x)=3−1xg(x) = 3 - \dfrac{1}{x}g(x)=3−x1​, find g′(x)g'(x)g′(x). Does the iteration converge to the root near 2.6182.6182.618?
  1. An iteration has g′(α)=−0.5g'(\alpha) = -0.5g′(α)=−0.5. Describe its diagram.
  1. Will xn+1=xn2x_{n+1} = x_n^2xn+1​=xn2​ converge to the fixed point 111 from x0=1.1x_0 = 1.1x0​=1.1?
  1. Why does pressing cos many times give the same number whatever you start with?

References

  • R. L. Burden and J. D. Faires, Numerical Analysis, Chapter 2, Fixed-Point Iteration.

Enroll free in Numerical Solution of Equations

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

The equation x³ - 3x - 4 = 0 has one real root α, between 2 and 3…Hard · High School (11–12) · by StemPy Lab
The equation x³ - x² - 1 = 0 has a root α near 1.47…Advanced · High School (11–12) · by StemPy Lab
The equation eˣ = x + 3 has two real roots, one positive and one negative…Advanced · High School (11–12) · by StemPy Lab
Next: lesson 3The Newton-Raphson method
← Numerical Solution of Equations
← Locating roots and interval bisectionThe Newton-Raphson method →

Discussion (0)

Log in to join the discussion.

Loading…

. If the values settle down, they settle on a root, a fixed point of
ggg
. The slope of
ggg
at the root decides everything: when
∣g′(α)∣<1|g'(\alpha)| < 1∣g′(α)∣<1
the iteration converges, as a staircase if the slope is positive and a cobweb if it is negative. When
∣g′(α)∣>1|g'(\alpha)| > 1∣g′(α)∣>1
it runs away. One equation has many rearrangements, and only some work.