Iteration and numerical methods
Many equations, such as x³ + x − 5 = 0, cannot be solved exactly with algebra. Numerical methods find the solution approximately, as accurately as you need: first trap the root between two values, then close in on it with an iteration formula or the Newton–Raphson method.
Key facts
- Change of sign: if f(a) and f(b) have opposite signs (and f is continuous), there is a root between a and b.
- Iteration: rearrange f(x) = 0 into x = g(x), then use xₙ₊₁ = g(xₙ) again and again.
- An iteration converges near a root α when |g′(α)| < 1.
- Newton–Raphson: xₙ₊₁ = xₙ − (f(xₙ))/(f′(xₙ)).
- To show a root is 1.52 to 2 decimal places, show that f changes sign between 1.515 and 1.525.
- Keep full calculator accuracy (use the ANS key) and round only at the end.
Worked examples
Example 1
Show that x³ + x − 5 = 0 has a root between 1 and 2.
- Work out f(1) and f(2). f(1) = 1 + 1 − 5 = −3, f(2) = 8 + 2 − 5 = 5
- The sign changes and f is continuous, so the curve must cross the x-axis between 1 and 2.
Answer: f(1) = −3 and f(2) = 5 have opposite signs
Example 2
Use xₙ₊₁ = ∛(5 − xₙ) with x₀ = 1.5 to find x₁, x₂ and x₃ to 4 decimal places.
- Put x₀ = 1.5 into the formula. x₁ = ∛(5 − 1.5) = ∛3.5 = 1.5183
- Use full accuracy each time. x₂ = 1.5156
- Again. x₃ = 1.5160
Answer: 1.5183, 1.5156, 1.5160
Example 3
Use Newton–Raphson on f(x) = x³ + x − 5 from x₀ = 1.5.
- Use f′(x) = 3x² + 1. x₁ = 1.5 − (f(1.5))/(f′(1.5)) = 1.5 − (−0.125)/7.75
- Work it out. x₁ = 1.516129…
- Repeat. x₂ = 1.515980…
Answer: x₁ = 1.5161, x₂ = 1.5160 (root ≈ 1.5160)
Example 4
Show that the root of x³ + x − 5 = 0 is 1.516 to 3 decimal places.
- Check the values either side: 1.516 ± 0.0005. f(1.5155) = −0.0038, f(1.5165) = 0.0041
- The sign changes, so the root is between them. 1.5155 < root < 1.5165
- Every number in that range rounds to 1.516.
Answer: f(1.5155) < 0 < f(1.5165)
Example 5
Use xₙ₊₁ = √(xₙ + 2) with x₀ = 1 to find x₁ and x₂ to 3 decimal places.
- Put x₀ into the formula. x₁ = √3 = 1.732
- Put x₁ in. x₂ = √3.732 = 1.932
Answer: x₁ = 1.732, x₂ = 1.932
Example 6
Show that x^2 − 3x − 1 = 0 has a root between 3 and 4.
- Work out the left-hand side at x = 3 and x = 4. f(3) = −1, f(4) = 3
- The sign changes, so there is a root between 3 and 4.
Answer: A change of sign