← A-Level Mathematics · Edexcel · A-Level Maths revision
⭐ 0
Edexcel A-level Mathematics (9MA0) · Numerical methods
Mini-Lesson

Numerical methods

2 missions. Guess, learn, then check. Your place is saved.

  1. Mission 1Radian mode: type 1, then cos(Ans) again and again. Where does it end?
  2. Mission 2How can four quick steps pin down √2 to 10 decimal places?
Mission 1

Radian mode: type 1, then cos(Ans) again and again. Where does it end?

Make a guess: Radian mode: type 1, then cos(Ans) again and again. Where does it end?

Numerical methods · roots and iteration

Change of sign (A-level only)

  • If f is continuous on [a, b] and f(a) and f(b) have opposite signs, then f(x) = 0 has a root between a and b.
  • To show a root is 2.09 correct to 2 decimal places, check the signs at the bounds 2.085 and 2.095.
  • Always finish with a conclusion: "sign change and f is continuous, so there is a root in the interval."
Worked example Numerical methods · roots and iteration

Showing a root to 2 decimal places

Question
f(x) = x³ − 2x − 5. Show that f(x) = 0 has a root α between 2 and 3, and that α = 2.09 correct to 2 decimal places.
  1. 1
    Evaluate at the ends: f(2) = −1 < 0 and f(3) = 16 > 0
  2. 2
    Conclude: the sign changes and f is continuous, so 2 < α < 3
  3. 3
    Evaluate at the bounds for 2.09: f(2.085) = −0.106 < 0 and f(2.095) = 0.005 > 0
  4. 4
    Conclude: the sign changes, so 2.085 < α < 2.095
Answer
every number in (2.085, 2.095) rounds to 2.09, so α = 2.09 to 2 decimal places
⚠️ Watch out
testing 2.09 and 2.10 only shows α is between them; it could still round to 2.10. Use the bounds 2.085 and 2.095.
Numerical methods · roots and iteration

When change of sign misleads

Sign change and continuity12312Oxy(0,2)(3,2)y=(x−1)(x−2)x=2123−3−2−1123xy(1,−1)(3,1)y=1x−2
  • Two roots (or a touching point) in the interval: f(x) = (x − 1)(x − 2) has f(0) = 2 and f(3) = 2. No sign change, yet two roots. Use a smaller interval.
  • A discontinuity: f(x) = 1/(x − 2) has f(1) = −1 and f(3) = 1. A sign change, but no root: there is a vertical asymptote at x = 2.
  • So the method needs f to be continuous on the interval, and the interval to be small.
Quick check
?g(x) = 3/(x − 4) + 1. A student finds g(3) = −2 and g(5) = 4 and says there must be a root between 3 and 5. What is wrong?
Numerical methods · roots and iteration

Iteration

  • Rearrange f(x) = 0 into the form x = g(x). For example x³ − 2x − 5 = 0 becomes x = ∛(2x + 5).
  • Pick a starting value x₀ and use the iterative formula xₙ₊₁ = g(xₙ) to get x₁, x₂, x₃, …
  • If the values converge to α, then α = g(α), so α is a root of f(x) = 0.
  • On a calculator: type x₀, press =, then type the formula with Ans in place of xₙ and keep pressing =.
Calculate
?Use the iterative formula xₙ₊₁ = ∛(2xₙ + 5) with x₀ = 2 to find x₃. Give your answer to 4 decimal places.
Numerical methods · roots and iteration

Staircases, cobwebs and convergence

Cobweb for x = cos x0.20.40.60.81.00.20.40.60.81.0Oxyy=cosxy=xαx0
  • Near the root α, the iteration converges if |g'(α)| < 1: the graph of y = g(x) is less steep than y = x. If |g'(α)| > 1 it diverges, even from a start close to α.
  • Different rearrangements of one equation can behave differently.
  • Draw y = x and y = g(x). From x₀ go to the curve, across to y = x, back to the curve, and repeat.
  • g'(α) > 0 gives a staircase; g'(α) < 0 gives a cobweb, with values either side of α.
Sort it
?Each formula is a rearrangement of x³ − 2x − 5 = 0 or of cos x = x. At its root, g'(α) is given. Will xₙ₊₁ = g(xₙ) converge to that root from a start nearby?

Tap a statement, then tap the group it belongs in. Then press Check.

Calculate
?The equation x = e^(−x) has one root. Use xₙ₊₁ = e^(−xₙ) with x₀ = 0.5 and iterate until the values agree to 3 decimal places. Give the root to 3 decimal places.
Mission check

?Calculator in radians: type 1, then cos(Ans) again and again. Where does it end up?
Mission 2

How can four quick steps pin down √2 to 10 decimal places?

Make a guess: How can four quick steps pin down √2 to 10 decimal places?

Numerical methods · Newton–Raphson and trapezium rule

The Newton–Raphson method (A-level only)

One Newton-Raphson stepx1=1.5x0=2−3−2−10123xyy=x2−2root
  • To solve f(x) = 0, start from an estimate x₀ near the root.
  • Draw the tangent at x₀. Where it crosses the x-axis is a better estimate x₁.
  • The tangent has gradient f'(x₀), which gives the Newton–Raphson formula:
xₙ₊₁ = xₙ − (f(xₙ))/(f'(xₙ))
  • Repeat until successive estimates agree to the accuracy you need.
  • When it works, the method converges very fast: the number of correct digits roughly doubles each step.
Worked example Numerical methods · Newton–Raphson and trapezium rule

One root of a cubic

Question
Use the Newton–Raphson method with x₀ = 2 to find a root of x³ − 2x − 5 = 0 correct to 4 decimal places.
  1. 1
    Differentiate: f(x) = x³ − 2x − 5, so f'(x) = 3x² − 2
  2. 2
    First step: f(2) = −1, f'(2) = 10, so x₁ = 2 − (−1)/10 = 2.1
  3. 3
    Second step: f(2.1) = 0.061, f'(2.1) = 11.23, so x₂ = 2.1 − 0.061/11.23 = 2.094568…
  4. 4
    Third step: x₃ = 2.094551…
  5. 5
    x₂ and x₃ agree to 4 decimal places
Answer
x = 2.0946 (4 d.p.)
⚠️ Watch out
keep the minus sign in the formula. Adding (f(x₀))/(f'(x₀)) gives x₁ = 1.9, which moves away from the root.
Calculate
?Use the Newton–Raphson method on f(x) = x³ + x − 3 with x₁ = 1 to find x₃. Give your answer to 4 decimal places.
Numerical methods · Newton–Raphson and trapezium rule

When Newton–Raphson fails

A flat tangent−2−112−3−2−112345xy(−1,3)(1,−1)gradient 0: never meetsthe x-axis
  • If f'(xₙ) = 0 the tangent is horizontal and never meets the x-axis: you cannot divide by zero. This happens when xₙ is at a stationary point.
  • If f'(xₙ) is small (near a stationary point), the tangent is nearly flat and the next estimate can jump a long way off.
  • The estimates may then converge to a different root, or not settle at all.
  • Fix: start close to the root, away from turning points.
Quick check
?Someone applies the Newton–Raphson method to f(x) = x³ − 3x + 1 with x₀ = 1. What happens?
Numerical methods · Newton–Raphson and trapezium rule

The trapezium rule (A-level only)

Trapezium rule0.250.500.751.000.51.01.5Oxyhy0y1y2y3y4
  • Split [a, b] into n strips of equal width h = (b − a)/n. That needs n + 1 ordinates y₀, y₁, …, yₙ.
∫_a^b y dx ≈ h/2[y₀ + yₙ + 2(y₁ + y₂ + … + yₙ₋₁)]
  • If the curve is convex (bends upwards, f''(x) > 0) the trapezia sit above it: an overestimate.
  • If the curve is concave (f''(x) < 0) the result is an underestimate.
  • More strips give a better estimate.
  • To trap the area between bounds, use rectangles: on an increasing curve, left-hand heights give a lower bound and right-hand heights an upper bound.
Worked example Numerical methods · Newton–Raphson and trapezium rule

The trapezium rule with four strips

Question
Use the trapezium rule with the values of √(2x+1) at x = 0, 0.25, 0.5, 0.75, 1 to estimate ∫₀¹ √(2x+1) dx. State whether it is an over- or underestimate.
  1. 1
    Five ordinates give 4 strips, so h = 0.25
  2. 2
    Ordinates (4 d.p.): 1, 1.2247, 1.4142, 1.5811, 1.7321
  3. 3
    Apply the rule: 0.25/2[1 + 1.7321 + 2(1.2247 + 1.4142 + 1.5811)] = 1.3965
  4. 4
    d²y/dx² = −(2x+1)^(−3/2) < 0, so the curve is concave
Answer
1.3965 (4 d.p.), an underestimate (the exact value is (3√3 − 1)/3 = 1.3987)
⚠️ Watch out
h is the strip width, not 1/(number of ordinates). Using h = 0.2 gives 1.1172.
Calculate
?A car starts from rest. Its velocity v m/s is recorded every 5 seconds.
t (s)05101520
v (m/s)08131617

Use the trapezium rule with all the data to estimate the distance travelled in the 20 seconds.

m
Sort it
?Will the trapezium rule over- or underestimate the area under each curve on the interval given?

Tap a statement, then tap the group it belongs in. Then press Check.

Mission check

?Starting from x₀ = 1, how can four quick steps pin down √2 to 10 decimal places?
Recap

Big ideas

  • Sign change of a continuous f on a small interval shows a root; use the bounds (e.g. 2.085 and 2.095) to prove a rounded value.
  • Change of sign fails with repeated or paired roots (no change) and with asymptotes (change, but no root).
  • xₙ₊₁ = g(xₙ) converges to α when |g'(α)| < 1; the limit solves x = g(x).
  • g' > 0 gives a staircase diagram, g' < 0 a cobweb.
  • Newton–Raphson: xₙ₊₁ = xₙ − (f(xₙ))/(f'(xₙ)). It fails at a stationary point and can go astray where the gradient is small.
  • Trapezium rule: h/2[y₀ + yₙ + 2(y₁ + … + yₙ₋₁)] with h = (b−a)/n for n strips.
  • Convex curve: overestimate. Concave curve: underestimate.
🏆

Mini-lesson complete!

⭐⭐⭐

You've worked through Numerical methods for Edexcel A-level Mathematics (9MA0). 🎉

  1. Mission 1Radian mode: type 1, then cos(Ans) again and again. Where does it end?
  2. Mission 2How can four quick steps pin down √2 to 10 decimal places?

Your stars: 0 / 0

Next: test yourself in the Verify stage.

📣 Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

→ Back to A-Level Mathematics · Edexcel

Specification points and sources for this lesson are listed at the bottom of the page.

Sources (2)

The specification points and sources behind this lesson.

  1. 1 Pearson Edexcel A level Mathematics 9MA0 specification Issue 4, Topic 9: 9.1, 9.2, 9.3, 9.5
  2. 2 Pearson Edexcel 9MA0 A-level Mathematics specification, 9.3–9.5 with guidance