Numerical solution of equations
🎯What you need to be able to do
- Locate a root approximately by a sign change, and justify the conclusion properly.
- Show that an equation can be rearranged into a given iterative form.
- Use an iterative formula \( x_{n+1} = \mathrm{F}(x_n) \) and set the working out clearly.
- Decide when to stop iterating for a required accuracy.
- Verify a root to a stated accuracy by a further sign change.
- Sketch and interpret cobweb and staircase diagrams, and comment on convergence.
📚The mathematics
Locating a root by sign change
If \( \mathrm{f} \) is continuous on \( [a, b] \) and \( \mathrm{f}(a) \) and \( \mathrm{f}(b) \) have opposite signs, then \( \mathrm{f}(x) = 0 \) somewhere between them. The graph must cross the axis to get from one side to the other.
The write-up matters as much as the arithmetic, and a complete answer has three parts:
- Evaluate \( \mathrm{f} \) at both ends and state both values, not just their signs.
- Observe that there is a change of sign.
- State that \( \mathrm{f} \) is continuous on the interval, and conclude there is a root between \(a\) and \(b\).
The continuity condition is not a formality. For \( \mathrm{f}(x) = \dfrac{1}{x} \) the values at \( -1 \) and \( 1 \) have opposite signs, but there is no root — there is an asymptote. If your function has a discontinuity in the interval, the argument fails.
Note also that a sign change proves at least one root, not exactly one; and that a repeated root produces no sign change, so this method can miss roots entirely.
Rearranging into iterative form
Any equation \( \mathrm{f}(x) = 0 \) can be rearranged as \( x = \mathrm{F}(x) \), usually in several ways. A typical question asks you to show that a particular rearrangement is equivalent — work from the original equation towards the given form, showing each algebraic step.
For example, from \( x^{3} - 5x + 1 = 0 \) you might isolate the \(x\) term to get \( x = \dfrac{x^{3}+1}{5} \), or isolate the cube to get \( x = \sqrt[3]{5x - 1} \). Both are valid rearrangements; they do not both converge equally well, which is why the question tells you which one to use.
The iteration itself
Start from the given \( x_0 \), compute \( x_1 \), feed it back in, and repeat. On a calculator, enter the starting value, then type the formula using the answer key and press equals repeatedly — this is far faster and less error-prone than retyping numbers.
Show the intermediate values. A question asking for a root correct to 3 decimal places expects to see the successive iterates listed, usually to more decimal places than the final answer. Writing only the final number risks losing the method marks even when it is right.
Stop when successive iterates agree to the accuracy required. To be confident of 3 decimal places, carry 5 or 6 through the working and continue until two consecutive values round the same way.
Verifying to a stated accuracy
To confirm a root is \( 1.729 \) correct to 3 decimal places, you must show it lies in the interval that rounds to 1.729 — that is, evaluate \( \mathrm{f}(1.7285) \) and \( \mathrm{f}(1.7295) \) and demonstrate a sign change between them.
Using 1.728 and 1.730 is a common mistake: those are the neighbouring values, not the rounding boundaries. The boundaries are always the half-way points either side.
Cobweb and staircase diagrams
The iteration is drawn by plotting \( y = \mathrm{F}(x) \) and \( y = x \) on the same axes; the root is where they cross. From \( x_0 \) on the \(x\)-axis, go vertically to the curve, then horizontally to the line \( y = x \), and repeat.
- A staircase diagram — the path climbs or descends in steps on one side of the root — occurs when \( \mathrm{F}'(x) \) is positive near the root.
- A cobweb diagram — the path spirals in around the root, alternating sides — occurs when \( \mathrm{F}'(x) \) is negative.
The iteration converges when the curve is shallower than the line \( y = x \) near the root, that is when \( \left|\mathrm{F}'(x)\right| < 1 \), and diverges when it is steeper. That is the underlying reason one rearrangement works and another does not, and a question may ask you to comment on it from the diagram.
✏️Worked example
(a) Let \( \mathrm{f}(x) = x^{3} + 2x - 7 \).
There is a change of sign, and \( \mathrm{f} \) is a polynomial and therefore continuous on \( [1, 2] \). Hence there is a root between 1 and 2.
(b) From \( x^{3} + 2x - 7 = 0 \) we get \( x^{3} = 7 - 2x \), and taking the cube root of both sides gives \( x = \sqrt[3]{7 - 2x} \), as required.
(c) Starting from \( x_0 = 1.5 \):
The iterates are settling around 1.5689, so \( \alpha = 1.569 \) to 3 decimal places. Notice the values alternate above and below the limit — this iteration produces a cobweb, so \( \mathrm{F}'(\alpha) \) is negative.
(d) To verify 3 decimal places, test the rounding boundaries 1.5685 and 1.5695:
The sign changes between them, and \( \mathrm{f} \) is continuous, so the root lies in \( (1.5685,\ 1.5695) \) and therefore rounds to 1.569 to 3 decimal places.
📝Practise
Work through these, then reveal the answer. Each question targets a different objective from the list above.
1. Show that \( \mathrm{f}(x) = x^{3} - 4x + 1 \) has a root between 1 and 2.
2. Show that \( \mathrm{e}^{x} = 3x \) can be rearranged as \( x = \ln(3x) \), and state a restriction on \(x\).
3. Use \( x_{n+1} = \dfrac{x_n^{3} + 1}{4} \) with \( x_0 = 0.25 \) to find a root of \( x^{3} - 4x + 1 = 0 \) to 3 decimal places.
4. A root of \( \mathrm{f}(x) = 0 \) is believed to be 2.43 correct to 2 decimal places. State exactly which two values of \( \mathrm{f} \) you would evaluate to verify this.
5. Explain why the iteration \( x_{n+1} = \dfrac{5}{x_n - 1} \) starting at \( x_0 = 3 \) fails to converge to the nearby root.
6. On a sketch of \( y = \mathrm{F}(x) \) and \( y = x \), the iteration path spirals inwards around the intersection. State whether this is a cobweb or a staircase, and what it tells you about \( \mathrm{F}'(x) \).
🔗Go deeper — other people’s work
These are external resources, not mine. If one stops working, tell me and everything above it on this page still stands.
- Desmos — plot \( y = \mathrm{F}(x) \) and \( y = x \) and step through an iteration by hand to draw the cobweb
- GeoGebra — interactive fixed-point iteration applets
- Khan Academy — the intermediate value theorem, which is what the sign-change argument rests on