Book a session
Home / Subjects / Mathematics / A Level Mathematics / Numerical Methods
Pure: Numerical methods

Numerical Methods

Locate roots by sign change, improve them by iteration and Newton–Raphson, and estimate integrals with the trapezium rule.

The big idea

Many equations cannot be solved exactly. Numerical methods get as close as you like instead. A change of sign shows there is a root in an interval; an iteration or the Newton–Raphson formula then homes in on it.

Key ideas

  • If f is continuous and f(a) and f(b) have opposite signs, there is a root between a and b.
  • Fixed-point iteration: rearrange f(x) = 0 as x = g(x) and repeat xn+1 = g(xn).
  • Newton–Raphson follows the tangent to the x-axis. It fails if f′(xn) = 0.
  • The trapezium rule overestimates for a curve that is concave up and underestimates for concave down.

Equations

xn+1 = g(xn)fixed-point iteration
xn+1 = xn − f(xn)/f′(xn)Newton–Raphson
∫ ≈ (h/2)[y0 + 2(y1 + … + yn−1) + yn]trapezium rule
f(a)f(b) < 0 ⇒ root in (a, b)sign change

Worked questions: easy, medium, hard

Three questions that climb in difficulty, each solved one step at a time. Try each one before you read the steps.

Easy

Show that x3 + x − 3 = 0 has a root between 1 and 2.

  1. Let f(x) = x3 + x − 3, which is continuous.
  2. f(1) = −1 and f(2) = 7.
  3. The sign changes, so there is a root between 1 and 2.
Answer: f(1) < 0 < f(2), so a root lies in (1, 2).
Medium

Use the iteration xn+1 = ∛(3 − xn) with x0 = 1 to find the root of x3 + x − 3 = 0 to 2 decimal places.

  1. x1 = ∛2 = 1.2599.
  2. x2 = ∛1.7401 = 1.2028 and x3 = ∛1.7972 = 1.2158.
  3. x4 = ∛1.7842 = 1.2129, x5 = 1.2135.
  4. The values settle at 1.21.
Answer: x ≈ 1.21.
Hard

Apply Newton–Raphson to f(x) = x3 + x − 3 starting from x0 = 1. Find x3.

  1. f′(x) = 3x2 + 1. x1 = 1 − (−1)/4 = 1.25.
  2. f(1.25) = 0.2031, f′(1.25) = 5.6875: x2 = 1.25 − 0.0357 = 1.2143.
  3. f(1.2143) = 0.0048, f′(1.2143) = 5.4235: x3 = 1.2143 − 0.0009.
  4. x3 = 1.2134, already correct to 4 decimal places.
Answer: x₃ = 1.2134.

Common mistakes

  • Claiming a root from a sign change when the function is not continuous (for example across an asymptote).
  • Rounding too early in an iteration.
  • Forgetting the factor of 2 on the middle ordinates of the trapezium rule.

Now you try: easy to hard

Six more questions, two at each level. These are the questions on the worksheet; each solution opens when you are ready.

Easy 1. Show that x2 − 5 = 0 has a root between 2 and 3.

Show the step-by-step solution

f(2) = −1 and f(3) = 4: a sign change in a continuous function, so there is a root in (2, 3).

Easy 2. Use the trapezium rule with 2 strips to estimate ∫02 x3 dx.

Show the step-by-step solution

h = 1, ordinates 0, 1, 8. (1/2)[0 + 2(1) + 8] = 5 (the exact value is 4; the curve is concave up, so this is an overestimate).

Medium 3. Use xn+1 = (xn2 + 2)/5 with x0 = 0 to find a root of x2 − 5x + 2 = 0 to 2 decimal places.

Show the step-by-step solution

x1 = 0.4, x2 = 0.432, x3 = 0.4373, x4 = 0.4382. x ≈ 0.44.

Medium 4. Use Newton–Raphson on f(x) = x2 − 2 from x0 = 1 to find √2 to 4 decimal places.

Show the step-by-step solution

xn+1 = xn − (xn2 − 2)/(2xn): 1.5, 1.4167, 1.4142. √2 ≈ 1.4142.

Hard 5. Use the trapezium rule with 4 strips to estimate ∫13 (1/x) dx.

Show the step-by-step solution

h = 0.5, ordinates 1, 0.6667, 0.5, 0.4, 0.3333. (0.5/2)[1 + 0.3333 + 2(1.5667)] = 0.25 × 4.4667 = 1.117 (exact: ln 3 = 1.099).

Hard 6. Explain why Newton–Raphson fails for f(x) = x3 − 3x + 1 with x0 = 1.

Show the step-by-step solution

f′(x) = 3x2 − 3, so f′(1) = 0. The formula divides by zero: the tangent at x = 1 is horizontal and never meets the x-axis.

Worksheet for this lesson

6 questions to print or save, with full step-by-step answers at the end.

See it in action

Open the Riemann Sums & the Fundamental Theorem simulation and test every idea on this page yourself.

Open the simulation →