2 missions. Guess, learn, then check. Your place is saved.
Mission 1Radian mode: type 1, then cos(Ans) again and again. Where does it end?
Mission 2How can four quick steps pin down √2 to 10 decimal places?
The specification points and sources are listed under the lesson: see Sources.
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 ff is continuous on [a,b][a, b] and f(a)f(a) and f(b)f(b) have opposite signs, then f(x)=0f(x) = 0 has a root between aa and bb.
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 ff is continuous, so there is a root in the interval."
Worked exampleNumerical methods · roots and iteration
Showing a root to 2 decimal places
Question
f(x)=x3−2x−5f(x) = x³ − 2x − 5. Show that f(x)=0f(x) = 0 has a root αα between 2 and 3, and that α=2.09α = 2.09 correct to 2 decimal places.
1
Evaluate at the ends: f(2)=−1<0f(2) = −1 < 0 and f(3)=16>0f(3) = 16 > 0
2
Conclude: the sign changes and ff is continuous, so 2<α<32 < α < 3
3
Evaluate at the bounds for 2.09: f(2.085)=−0.106<0f(2.085) = −0.106 < 0 and f(2.095)=0.005>0f(2.095) = 0.005 > 0
4
Conclude: the sign changes, so 2.085<α<2.0952.085 < α < 2.095
Answer
every number in (2.085,2.095)(2.085, 2.095) rounds to 2.09, so α=2.09α = 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
Two roots (or a touching point) in the interval:f(x)=(x−1)(x−2)f(x) = (x − 1)(x − 2) has f(0)=2f(0) = 2 and f(3)=2f(3) = 2. No sign change, yet two roots. Use a smaller interval.
A discontinuity:f(x)=x−21f(x) = 1/(x − 2) has f(1)=−1f(1) = −1 and f(3)=1f(3) = 1. A sign change, but no root: there is a vertical asymptote at x=2x = 2.
So the method needs ff to be continuous on the interval, and the interval to be small.
Quick check
?g(x)=x−43+1g(x) = 3/(x − 4) + 1. A student finds g(3)=−2g(3) = −2 and g(5)=4g(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)=0f(x) = 0 into the form x=g(x)x = g(x). For example x3−2x−5=0x³ − 2x − 5 = 0 becomes x=32x+5x = ∛(2x + 5).
Pick a starting value x0x₀ and use the iterative formulaxn+1=g(xn)xₙ₊₁ = g(xₙ) to get x1,x2,x3,…x₁, x₂, x₃, …
If the values converge to αα, then α=g(α)α = g(α), so αα is a root of f(x)=0f(x) = 0.
On a calculator: type x0x₀, press =, then type the formula with Ans in place of xnxₙ and keep pressing =.
Calculate
?Use the iterative formula xn+1=32xn+5xₙ₊₁ = ∛(2xₙ + 5) with x0=2x₀ = 2 to find x3x₃. Give your answer to 4 decimal places.
Numerical methods · roots and iteration
Staircases, cobwebs and convergence
Near the root αα, the iteration converges if ∣g′(α)∣<1|g'(α)| < 1: the graph of y=g(x)y = g(x) is less steep than y=xy = x. If ∣g′(α)∣>1|g'(α)| > 1 it diverges, even from a start close to αα.
Different rearrangements of one equation can behave differently.
Draw y=xy = x and y=g(x)y = g(x). From x0x₀ go to the curve, across to y=xy = x, back to the curve, and repeat.
g′(α)>0g'(α) > 0 gives a staircase; g′(α)<0g'(α) < 0 gives a cobweb, with values either side of αα.
Sort it
?Each formula is a rearrangement of x3−2x−5=0x³ − 2x − 5 = 0 or of cosx=xcos x = x. At its root, g′(α)g'(α) is given. Will xn+1=g(xn)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−xx = e^(−x) has one root. Use xn+1=e−xnxₙ₊₁ = e^(−xₙ) with x0=0.5x₀ = 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?
pressing cos(Ans) repeatedly is the iteration xn+1=cosxnxₙ₊₁ = cos xₙ. It converges because the gradient of cosxcos x at the root is less than 1 in size, and the limit satisfies x=cosxx = cos x: it settles on x≈0.739085x ≈ 0.739085, the root of cosx−x=0cos x − x = 0.
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)
To solve f(x)=0f(x) = 0, start from an estimate x0x₀ near the root.
Draw the tangent at x0x₀. Where it crosses the xx-axis is a better estimate x1x₁.
The tangent has gradient f′(x0)f'(x₀), which gives the Newton–Raphson formula:
First step: f(2)=−1f(2) = −1, f′(2)=10f'(2) = 10, so x1=2−10−1=2.1x₁ = 2 − (−1)/10 = 2.1
3
Second step: f(2.1)=0.061f(2.1) = 0.061, f′(2.1)=11.23f'(2.1) = 11.23, so x2=2.1−11.230.061=2.094568…x₂ = 2.1 − 0.061/11.23 = 2.094568…
4
Third step: x3=2.094551…x₃ = 2.094551…
5
x2x₂ and x3x₃ agree to 4 decimal places
Answer
x=2.0946x = 2.0946 (4 d.p.)
⚠️ Watch out
keep the minus sign in the formula. Adding f′(x0)f(x0)(f(x₀))/(f'(x₀)) gives x1=1.9x₁ = 1.9, which moves away from the root.
Calculate
?Use the Newton–Raphson method on f(x)=x3+x−3f(x) = x³ + x − 3 with x1=1x₁ = 1 to find x3x₃. Give your answer to 4 decimal places.
Numerical methods · Newton–Raphson and trapezium rule
When Newton–Raphson fails
If f′(xn)=0f'(xₙ) = 0 the tangent is horizontal and never meets the xx-axis: you cannot divide by zero. This happens when xnxₙ is at a stationary point.
If f′(xn)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)=x3−3x+1f(x) = x³ − 3x + 1 with x0=1x₀ = 1. What happens?
Numerical methods · Newton–Raphson and trapezium rule
The trapezium rule (A-level only)
Split [a,b][a, b] into nn strips of equal width h=nb−ah = (b − a)/n. That needs n+1n + 1ordinatesy0,y1,…,yny₀, y₁, …, yₙ.
If the curve is convex (bends upwards, f′′(x)>0f''(x) > 0) the trapezia sit above it: an overestimate.
If the curve is concave (f′′(x)<0f''(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 exampleNumerical methods · Newton–Raphson and trapezium rule
The trapezium rule with four strips
Question
Use the trapezium rule with the values of 2x+1√(2x+1) at x=0,0.25,0.5,0.75,1x = 0, 0.25, 0.5, 0.75, 1 to estimate ∫012x+1dx∫₀¹ √(2x+1) dx. State whether it is an over- or underestimate.
dx2d2y=−(2x+1)−3/2<0d²y/dx² = −(2x+1)^(−3/2) < 0, so the curve is concave
Answer
1.3965 (4 d.p.), an underestimate (the exact value is 333−1=1.3987(3√3 − 1)/3 = 1.3987)
⚠️ Watch out
hh is the strip width, not number of ordinates11/(number of ordinates). Using h=0.2h = 0.2 gives 1.1172.
Calculate
?A car starts from rest. Its velocity vv m/s is recorded every 5 seconds.
tt (s)
0
5
10
15
20
vv (m/s)
0
8
13
16
17
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 x0=1x₀ = 1, how can four quick steps pin down 2√2 to 10 decimal places?
Newton–Raphson on f(x)=x2−2f(x) = x² − 2 follows tangents down to the axis. From x0=1x₀ = 1 the estimates are 1.5, 121717/12, 408577577/408 and then 1.4142135624…, already correct to 10 decimal places, because near a root the number of correct digits roughly doubles each step.
Recap
Big ideas
Sign change of a continuous ff 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).
xn+1=g(xn)xₙ₊₁ = g(xₙ) converges to αα when ∣g′(α)∣<1|g'(α)| < 1; the limit solves x=g(x)x = g(x).
g′>0g' > 0 gives a staircase diagram, g′<0g' < 0 a cobweb.
Newton–Raphson: xn+1=xn−f′(xn)f(xn)xₙ₊₁ = xₙ − (f(xₙ))/(f'(xₙ)). It fails at a stationary point and can go astray where the gradient is small.
Trapezium rule: 2h[y0+yn+2(y1+⋯+yn−1)]h/2[y₀ + yₙ + 2(y₁ + … + yₙ₋₁)] with h=nb−ah = (b−a)/n for nn strips.