James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
A level Maths › Pure · Numerical methods › Locating roots & iteration

Locating roots & iteration

Using a change of sign to show that an equation has a root in an interval, when that method fails, and finding roots with an iteration formula.

Pure 9.1, 9.2Year 2≈ 55 min to work through
Before you start: sketching graphs and rearranging equations. See Graphs of functions.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Show that a root lies in an interval using a change of sign, with a conclusionY2
  • Explain when the change-of-sign method failsY2
  • Rearrange f(x)=0 into the form x=g(x) and use an iteration formulaY2
  • Draw and interpret staircase and cobweb diagramsY2
  • Explain why an iteration converges or divergesY2

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

Many equations, such as x3−2x−5=0 or ex=3x, cannot be solved exactly with algebra. Numerical methods find the roots to any accuracy you want. First you trap a root between two values; then an iteration homes in on it.

2.1 Change of sign

Change-of-sign method

If f is continuous on [a,b] and f(a) and f(b) have opposite signs, then f(x)=0 has at least one root between a and b.

Worked example 1Calculator
Show that x3−2x−5=0 has a root between x=2 and x=3.
Let f(x)=x3−2x−5. f(2)=−1, f(3)=16.
There is a change of sign and f is continuous, so there is a root between 2 and 3.
Always write the conclusion, mentioning the sign change and continuity.

To show that a root is 2.095 to 3 decimal places, check the bounds of that rounding: f(2.0945)<0 and f(2.0955)>0, so the root lies in [2.0945,2.0955].

Worked example 2Calculator
Show that the root α of x3−2x−5=0 is 2.095 correct to 3 decimal places.
f(2.0945)=−0.000575…<0
f(2.0955)=0.01059…>0
Change of sign and f continuous, so 2.0945<α<2.0955, hence α=2.095 (3 d.p.).

2.2 When the method fails

The method can go wrong in three ways. A sketch shows each one clearly.

A discontinuity. f(x)=1x−2 changes sign between 1 and 3, but there is no root: the graph jumps across an asymptote at x=2. That is why the method needs f to be continuous.
A repeated root. f(x)=(x−1)2 touches the axis at x=1 without crossing, so there is no sign change at all.
Several roots close together. If an interval contains two roots, the signs at the ends may be the same, so both roots are missed.

2.3 Iteration

Rearrange f(x)=0 into the form x=g(x). Then use xn+1=g(xn): start with x0, put it into g to get x1, and repeat. If the values settle down, they converge to a root.

Worked example 3Calculator
Use xn+1=2xn+53 with x0=2 to find the root of x3−2x−5=0 to 3 decimal places.
x3=2x+5⇒x=2x+53
This is the rearrangement.
x1=93=2.0801, x2=2.0924, x3=2.0942, x4=2.0945
The values converge to 2.095 (3 d.p.).
On a calculator: type 2, EXE, then ∛(2Ans + 5), EXE, EXE, ...

2.4 Staircases, cobwebs and convergence

On a graph, the root is where y=x meets y=g(x). Each step of the iteration goes vertically to the curve, then horizontally to the line y=x. If the steps move steadily towards the root, the diagram is a staircase; if they spiral around it, it is a cobweb.

Convergence

The iteration xn+1=g(xn) converges to a root α if |g\′(x)|<1 near α (and you start close enough). If |g\′(x)|>1 near α, it diverges.
0<g\′<1: staircase;  −1<g\′<0: cobweb.

Worked example 4Calculator
Explain why xn+1=xn3−52, another rearrangement of x3−2x−5=0, does not converge to the root near 2.09.
g(x)=x3−52⇒g\′(x)=3x22
Near the root, g\′(2.09)≈6.6>1, so the iteration diverges.
Try it: from x0=2 you get 1.5, −0.8, ... moving away.
On your Casio ClassWiz Calculator tricks →

Use the Table app to find a sign change quickly. For an iteration, type x0 and press EXE, then type the formula using Ans and press EXE repeatedly: each press gives the next iterate.

3Explore it

Watch the iteration build a staircase or cobweb. Change the rearrangement and the starting value, and see which ones converge.

4Common mistakes & exam tips

Common mistakes

  • Showing a sign change without a conclusion: say "change of sign and f continuous, so there is a root".
  • Using the change-of-sign method across an asymptote.
  • Checking the wrong interval when asked for a root to a given accuracy: use the rounding bounds, e.g. 2.0945 and 2.0955.
  • Rounding each iterate before using it: keep the full value (use Ans).
  • Drawing the steps of a staircase the wrong way round: vertical to the curve, then horizontal to y=x.

Exam tips

  • Use Ans on your calculator for iterations: type x0, EXE, then the formula with Ans, and keep pressing EXE.
  • Give iterates to the accuracy asked for, usually 4 decimal places.
  • A sketch of y=g(x) and y=x explains convergence better than words.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Show that ex−3x=0 has a root between 1.5 and 1.6.
f(1.5)=−0.018…<0, f(1.6)=0.153…>0; change of sign, continuous, so a root.
FluencyP2
Explain why f(x)=tanx changes sign between 1.5 and 1.6 but has no root there.
Asymptote at x=π2≈1.571: f is not continuous.
FluencyP3
Use xn+1=cosxn with x0=1 to find x1, x2, x3.
0.5403, 0.8576, 0.6543 (a cobweb)
FluencyP4
Show that x2−5x+1=0 can be written as x=x2+15.
5x=x2+1, divide by 5.
Problem solvingP5
Use xn+1=xn2+15 with x0=0 to find the smaller root of x2−5x+1=0 to 3 d.p.
0.2, 0.208, 0.20865,…→0.209
Problem solvingP6
Explain why xn+1=xn2+15 will not find the larger root, near 4.79.
g\′(x)=2x5≈1.9>1 there, so it diverges.

6Exam-style questions

Original exam-style questions with full markschemes. Edexcel papers allow a calculator throughout, but questions labelled “No calculator” practise exact working. Allow about 1.2 minutes per mark.

Question 1Calculator[6 marks]

f(x)=x3+x−3

  • (a)Show that f(x)=0 has a root α between x=1 and x=1.5.[2]
  • (b)Show that f(x)=0 can be written as x=3−x3.[1]
  • (c)Using xn+1=3−xn3 with x1=1, find x2, x3 and x4, giving your answers to 4 decimal places.[3]
(a)
f(1)=−1, f(1.5)=1.875M1
change of sign, f continuous, so root between 1 and 1.5A1
(b)
x3=3−x⇒x=3−x3AG B1
(c)
x2=1.2599M1 A1
x3=1.2028, x4=1.2158A1
Question 2Calculator[4 marks]

A student says that, because g(x)=1x−3+12 satisfies g(2)<0 and g(4)>0, the equation g(x)=0 has a root between 2 and 4.

  • (a)Explain why the student is wrong.[2]
  • (b)Find the actual root of g(x)=0.[2]
(a)
g has an asymptote / is not continuous at x=3B1
so the sign change does not imply a root in (2,4)B1
(b)
1x−3=−12M1
x−3=−2⇒x=1, which is outside the intervalA1
Question 3Calculator[4 marks]

The equation x3−2x−5=0 has one real root, α. Show that α=2.095 correct to 3 decimal places.

choosing the interval [2.0945,2.0955]M1
f(2.0945)=−0.00057…A1
f(2.0955)=0.0106…A1
change of sign, continuous, so α=2.095 (3 d.p.)A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real Edexcel A level questions. Past papers and markschemes are on the Pearson website.

PaperQuestionFocusDifficulty
June 2018 · Paper 1Q4Show a root lies between 3 and 4, then an iteration with a diagram★☆☆
June 2024 · Paper 1Q3Show a root lies in [3.6, 3.7], then use an iteration★☆☆
Nov 2021 · Paper 1Q4Locate a turning point, then iterate★☆☆
Specimen · Paper 1Q8Root in an interval, then why a student’s method fails★★☆
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake