MathematicsCore22 min read

Numerical Solution of Equations

Finding a root when there is no formula to rearrange

This topic appears in:

01

When algebra runs out

Quadratics have a formula. Cubics have one too, though it is horrible, and quartics have one that nobody uses. Beyond that, no formula exists — and it is not that nobody has found one, it is that no such formula can exist. Mixed equations such as x = cos x or e^x = 3x are hopeless from the start, because there is no rearrangement that isolates x.

Most equations that describe real situations are of this kind. So instead of solving them exactly, we locate a root and then close in on it until we have as many decimal places as the question asks for. That is what a numerical method is: a procedure that produces a sequence of better and better approximations.

Approximate does not mean careless

A numerical answer is not a worse answer. It is an answer with a stated accuracy, which is exactly what every physical measurement is too. What matters is being able to say how accurate it is — which is why questions always specify the number of decimal places and often ask you to justify it.

02

Step one: trap the root between two numbers

Before refining anything you need to know roughly where the root is. The tool is the sign change, and the reasoning behind it is worth stating properly because examiners want it stated properly.

If f is continuous on the interval and f(a) and f(b) have opposite signs, then somewhere between a and b the curve must pass through zero — it cannot jump from negative to positive without touching it. So a root lies in that interval.

On Sign change, f(1) is negative and f(2) is positive, so a root is trapped between them. Then switch to It converges and It fails and drag the iteration count — same equation, two rearrangements, completely different behaviour.

Continuity is part of the argument

The sign-change test only works if the function is continuous across the interval. f(x) = 1/(x − 2) changes sign either side of x = 2 and has no root there at all — it has an asymptote. A full answer says "f is continuous on [a, b] and f(a) < 0 < f(b), so there is a root between them." Dropping the word continuous costs a mark.

03

Step two: iterate

Rearrange the equation into the form x = F(x). Then feed a starting value into F, take what comes out, feed it back in, and repeat. If the sequence settles down, the value it settles on satisfies x = F(x) — which is the equation you started with.

Written formally, the sequence is x₍ₙ₊₁₎ = F(xₙ). The notation looks heavier than the idea: it just means "the next one is F of the current one".

solve f(x) = 0rearrange tox = F(x)iteratex₍ₙ₊₁₎ = F(xₙ)stop when two successive values agreeto the required accuracythe fixed point of F is the root of f
x₀
the starting valueusually an integer either side of the root
F
the rearrangementmany are possible from one equation
xₙ
the nth approximationeach one produced from the one before
Worked example

The equation x³ − x − 1 = 0 has a root α between 1 and 2. Use the iteration x₍ₙ₊₁₎ = ∛(xₙ + 1) with x₀ = 1 to find α correct to 3 decimal places.

  1. x₁ = ∛(1 + 1) = ∛2 = 1.2599Substituting the starting value. Keep more decimals than the answer needs — rounding early is the main source of error here.
  2. x₂ = ∛(2.2599) = 1.3123Each value goes straight back into the same formula. On a calculator, type the expression once and press ANS repeatedly.
  3. x₃ = ∛(2.3123) = 1.3224The values are closing in; the changes are getting smaller each time.
  4. x₄ = 1.3242, x₅ = 1.3246, x₆ = 1.3247Continue until two successive values agree to the accuracy required.
  5. x₅ and x₆ both round to 1.325, so α = 1.325 to 3 d.p.The justification is the agreement of successive values, not simply stopping when you are bored.

α = 1.325 (3 d.p.)

04

Why some rearrangements fail

Here is the part that surprises people. The same equation can be rearranged in several ways, all algebraically correct, and they do not behave the same. x³ − x − 1 = 0 can become x = ∛(x + 1), which converges, or x = x³ − 1, which flies away from the root no matter how close you start.

The diagram above shows why. The iteration bounces between the curve y = F(x) and the line y = x. If the curve is shallower than the line near the root, each bounce lands closer and the staircase spirals in. If it is steeper, each bounce overshoots by more than the last and the staircase walks off the page.

The syllabus does not require the formal condition for convergence. It does require you to know that failure is possible, and to recognise it when a sequence starts running away.

Behaviour of the sequenceWhat it means
values settle on one numberconverged — that number is the root
values grow without limitdiverged — try a different rearrangement
values alternate but close inconverging in a spiral; still fine
values alternate and growdiverged
calculator gives a maths errorthe sequence left the domain of F, e.g. a negative square root

If it diverges, you have not made a mistake

A diverging iteration usually means the rearrangement was unsuitable, not that your arithmetic was wrong. In an exam the given iteration will converge, so a runaway sequence is a signal to check your rearrangement or your calculator mode — not to keep grinding out values hoping it turns around.

05

Showing that a rearrangement is correct

A very common opening part is: "Show that the equation f(x) = 0 can be written in the form x = F(x)." This is pure algebra and carries easy marks, but only if you work in the right direction.

Start from the equation you were given and rearrange it into the target form. Do not start from the target and work back — it proves the same thing logically, but examiners want to see the stated equation transformed, and a reversed argument sometimes loses the mark.

Worked example

Show that the equation 2x³ − 5x + 1 = 0 can be written in the form x = ∛((5x − 1)/2).

  1. Start from 2x³ − 5x + 1 = 0.Always begin with the equation as given.
  2. Move the other terms across: 2x³ = 5x − 1.Isolating the cubic term, since the target has x³ under a cube root.
  3. Divide by 2: x³ = (5x − 1)/2.Matching the inside of the cube root in the target form.
  4. Take the cube root of both sides: x = ∛((5x − 1)/2), as required.Cube root is safe to take on both sides for all real values, unlike a square root which would need a sign discussion.

x = ∛((5x − 1)/2)

The full method, in order

  1. Show a sign change, stating that f is continuous, to prove a root exists.
  2. Rearrange the given equation into x = F(x), working forwards.
  3. Iterate from the given x₀, keeping extra decimal places throughout.
  4. Stop when successive values agree to the accuracy required, and say so.
  5. State the final answer rounded as the question asked — not to more places than requested.

Practice questions

5 questions · 18 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

2 · 5 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Explain how a sign change shows that an equation has a root in a given interval, and state the condition that must hold for the argument to be valid.
Model answer

If f(a) and f(b) have opposite signs then the curve must cross zero somewhere between a and b, so a root lies in that interval. The argument requires f to be continuous on the interval — otherwise the sign change could be caused by an asymptote rather than a root.

Examiner tip. One mark for the sign-change reasoning, one for naming continuity. Answers that omit continuity routinely lose the second mark.

SQ2[3 marks]
Show that the equation 3x³ − 4x + 2 = 0 can be rearranged into the form x = ∛((4x − 2)/3).
Model answer

Starting from 3x³ − 4x + 2 = 0, move the terms across to get 3x³ = 4x − 2. Dividing by 3 gives x³ = (4x − 2)/3, and taking the cube root of both sides gives x = ∛((4x − 2)/3).

Examiner tip. Work forwards from the given equation. Three lines, three marks — write each rearrangement out rather than jumping to the answer.

Solved numericals

2 · 7 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[3 marks]
Show that the equation x³ + 2x − 7 = 0 has a root between x = 1 and x = 2.
Full working
  1. f(1) = 1 + 2 − 7 = −4Substituting the lower end and evaluating.[1]
  2. f(2) = 8 + 4 − 7 = 5Substituting the upper end. Both values must be shown, not just described.[1]
  3. f is continuous and changes sign from negative to positive, so a root lies between 1 and 2.The concluding statement is a mark of its own, and must mention continuity and the sign change.[1]

f(1) = −4, f(2) = 5; f continuous with a sign change, so a root lies in (1, 2)

N2[4 marks]
Use the iteration x₍ₙ₊₁₎ = ∛(7 − 2xₙ) with x₀ = 1.5 to find a root of x³ + 2x − 7 = 0, correct to 2 decimal places. Show the value of each approximation.
Full working
  1. x₁ = ∛(7 − 3) = ∛4 = 1.5874Correct substitution of the starting value.[1]
  2. x₂ = ∛(7 − 3.1748) = ∛3.8252 = 1.5637Feeding the previous value back into the same formula.[1]
  3. x₃ = 1.5708, x₄ = 1.5687Continuing until successive values agree to the required accuracy.[1]
  4. x₃ and x₄ both round to 1.57, so the root is 1.57 to 2 d.p.Stating the stopping justification and rounding only at the end.[1]

1.57 (2 d.p.)

Exam questions

1 · 6 marks

Multi-part questions with a full mark scheme.

Q1[6 marks]
The equation x = cos x has a single root α.
(a) Show that α lies between 0.7 and 0.8.
(b) The iteration x₍ₙ₊₁₎ = cos xₙ is used with x₀ = 0.7. Find α correct to 3 decimal places.
(c) A student instead tries the rearrangement x₍ₙ₊₁₎ = cos⁻¹(xₙ) with x₀ = 0.7 and finds the values move away from α. State what has happened and what the student should do.
Mark scheme
  1. (a) Let f(x) = x − cos x. f(0.7) = 0.7 − 0.7648 = −0.0648Rewriting as f(x) = 0 first is what makes a sign change meaningful. Calculator in radians.[1]
  2. f(0.8) = 0.8 − 0.6967 = +0.1033, so f is continuous with a sign change and α lies between 0.7 and 0.8.Both values plus the concluding statement.[1]
  3. (b) x₁ = cos 0.7 = 0.7648, x₂ = cos 0.7648 = 0.7215The sequence alternates either side of the root — a spiral rather than a staircase, which is still convergence.[1]
  4. x₃ = 0.7508, x₄ = 0.7311, x₅ = 0.7444, … x₁₆ ≈ 0.7391This one converges slowly, so several more steps are needed than usual.[1]
  5. α = 0.739 to 3 d.p.Rounding only once successive values agree at that accuracy.[1]
  6. (c) The iteration has diverged: this rearrangement is unsuitable even though it is algebraically valid. The student should use the rearrangement that converges, x₍ₙ₊₁₎ = cos xₙ.The mark is for recognising divergence as a property of the rearrangement, not an arithmetic mistake.[1]

(a) sign change between 0.7 and 0.8; (b) α = 0.739; (c) the iteration diverges — use x = cos x instead