This Year 13 numerical methods revision notes is written for pupils aged 17-18 and follows the National Curriculum. In short, it shows you how to locate roots, use iteration, Newton-Raphson and the trapezium rule. Before you start, it helps to revise differentiation: chain, product and quotient rules and integration techniques and differential equations, because this lesson builds on them.
Year 13 numerical methods revision notes: what you will learn
Many equations such as \(x^3+x-3=0\) or \(e^x=3x\) cannot be solved exactly by algebra. Numerical methods find an approximate solution as accurately as you need.
Starter activity
Use your calculator to solve \(\cos x=x\) by pressing the cosine key repeatedly, starting from any number (use radians). What happens to the display? Does the answer depend on your starting value? Why do you think the display settles down on one number?
Locating roots
Rule: change of sign
If \(f\) is continuous on \([a,b]\) and \(f(a)\), \(f(b)\) have opposite signs, then \(f(x)=0\) has at least one root in \([a,b]\). In an exam state both values with their signs, say "continuous", and give a conclusion.
Worked example 1
Show that \(x^3+x-3=0\) has a root in \([1,2]\).
\(f(1)=-1<0\) and \(f(2)=7>0\), and \(f\) is continuous, so there is a root in \([1,2]\).
Worked example 2
Show that \(e^x-3x=0\) has a root near 0.6, and that the root of \(x^3+x-3=0\) is 1.213 to 3 decimal places.
\(f(0.6)=0.022>0\) and \(f(0.7)=-0.086<0\), so there is a root in \([0.6,0.7]\). For the cubic: \(f(1.2125)=-0.0049<0\) and \(f(1.2135)=0.0005>0\), so \(1.2125\lt \alpha<1.2135\).
Watch out: when the method fails
A sign change does not guarantee a root if \(f\) is discontinuous: \(f(x)=\dfrac1x\) changes sign between \(-1\) and \(1\) but has no root. A curve touching the axis, such as \((x-1)^2\), has a root but no sign change. Two roots in a small interval give no sign change either.
Iteration
Definition: iteration
Rearrange \(f(x)=0\) into \(x=g(x)\) and use \(x_{n+1}=g(x_n)\) from a starting value \(x_0\). The iteration converges to a root \(\alpha\) when \(|g'(\alpha)|<1\).
Worked example 3
Use \(x_{n+1}=\sqrt[3]{3-x_n}\) with \(x_0=1\) to solve \(x^3+x-3=0\).
\(x_1=1.2599\), \(x_2=1.2028\), \(x_3=1.2158\), \(x_4=1.2129\), \(x_5=1.2135\), \(x_6=1.2134\). The values alternate about the root and close in on \(\alpha\approx1.2134\).
Key fact: staircase and cobweb
If \(0\lt g'(\alpha)<1\) the diagram is a staircase and the sequence approaches from one side. If \(-1\lt g'(\alpha)<0\) it is a cobweb and the sequence alternates. If \(|g'(\alpha)|>1\) the iteration diverges.
Note: different rearrangements
From \(x^3-5x+1=0\), the form \(x=\dfrac{x^3+1}{5}\) converges to \(0.2016\) from \(x_0=0\), but \(x=\sqrt[3]{5x-1}\) converges to the other root near \(2.128\).
The Newton-Raphson method
Rule: Newton-Raphson formula
\(x_{n+1}=x_n-\dfrac{f(x_n)}{f'(x_n)}\). It uses the tangent to the curve and roughly doubles the number of correct digits each step.
Worked example 4
Use Newton-Raphson on \(f(x)=x^3+x-3\) from \(x_0=1.2\).
\(f'(x)=3x^2+1\). \(x_1=1.2-\dfrac{-0.072}{5.32}=1.2135\), and the next step gives \(1.21341\).
Worked example 5
Use Newton-Raphson to find \(\sqrt5\).
With \(f(x)=x^2-5\): \(x_{n+1}=\dfrac12\left(x_n+\dfrac5{x_n}\right)\). From \(x_0=2\): \(2.25\), then \(2.2361=\sqrt5\).
Watch out
The method fails when \(f'(x_n)=0\) (horizontal tangent) or with a poor start. For \(f(x)=x^3-2x+2\) from \(x_0=0\) it gives \(1,0,1,0,\dots\), a cycle that never finds the root near \(-1.77\).
The trapezium rule
Rule: trapezium rule
With \(n\) strips of width \(h=\dfrac{b-a}n\): \(\int_a^bf(x)dx\approx\dfrac h2\left[y_0+2(y_1+y_2+\cdots+y_{n-1})+y_n\right]\). A concave curve (bending down) is underestimated; a convex curve is overestimated. More strips improve the estimate.
Worked example 6
Estimate \(\int_1^3\ln x\,dx\) with 4 strips.
\(h=0.5\); the ordinates are \(0, 0.4055, 0.6931, 0.9163, 1.0986\), so the estimate is \(\dfrac{0.5}{2}\left[0+1.0986+2(0.4055+0.6931+0.9163)\right]=1.2821\). The exact value is \(3\ln3-2=1.2958\), so the estimate is too small by about 1.1%.
Worked example 7
A lake is measured every 10 m with depths \(0,2.1,3.4,3.8,2.9,1.5,0\) metres. Estimate the cross-section area.
\(\dfrac{10}{2}\left[0+2(2.1+3.4+3.8+2.9+1.5)+0\right]=10\times13.7=137\ \mathrm{m^2}\).
Modelling and writing up
Worked example 8
Show that \(x=2\sin x\) has a positive root near 1.895, and use \(x_{n+1}=2\sin x_n\).
\(f(x)=x-2\sin x\): \(f(1.8)=-0.148\) and \(f(2)=0.181\), so there is a root in \([1.8,2]\). The iteration gives \(1.948,1.860,1.917,1.881,1.904,\dots\), a cobweb pattern.
Method: writing up numerical answers
- Change of sign: write the function, show the two values with signs, say "continuous", name the interval.
- Iteration: list every iterate to the accuracy asked, keeping extra digits on the calculator.
- Newton-Raphson: write \(f'(x)\) first, then substitute and show the numbers.
- Trapezium rule: write \(h\), a table of ordinates to 4 decimal places, and the bracket before multiplying by \(\tfrac h2\). Say whether the estimate is too large or too small and why.
Watch out
Do not forget "continuous". Keep full calculator values, not rounded iterates. Check the calculator mode for trig. Newton-Raphson has a minus sign. Double the middle ordinates in the trapezium rule.
Worked example 9: Showing a root to a given accuracy
Show that the root of \(x^3+2x-7=0\) is \(1.569\) to 3 decimal places.
Let \(f(x)=x^3+2x-7\). Evaluate at the two ends of the interval that round to 1.569: \(f(1.5685)=3.8588+3.1370-7=-0.0042<0\) and \(f(1.5695)=3.8662+3.1390-7=0.0052>0\). There is a change of sign and \(f\) is continuous, so the root lies in \([1.5685,1.5695]\), and every number in that interval rounds to 1.569.
Worked example 10: Using the ANS key
Explain how to calculate \(x_{n+1}=\sqrt{3x_n+1}\) with \(x_0=3\) using a calculator.
Type 3, press equals. Then type \(\sqrt{3\,\text{ANS}+1}\) and press equals repeatedly: the display gives \(x_1=3.1623\), \(x_2=3.2383\), \(x_3=3.2734\) and so on, slowly converging to the root \(3.3028\) of \(x^2-3x-1=0\). Keep all the digits on the calculator and only round at the end; rounding the iterates early can change the final digit.
Worked example 11: Newton-Raphson for a reciprocal
Use Newton-Raphson on \(f(x)=\dfrac1x-3\) to derive an iteration for \(\dfrac13\) that needs no division. Perform two steps from \(x_0=0.3\).
\(f\prime(x)=-\dfrac1{x^2}\). So \(x_{n+1}=x_n-\dfrac{1/x_n-3}{-1/x_n^2}=x_n+x_n^2\left(\dfrac1{x_n}-3\right)=2x_n-3x_n^2\). From \(x_0=0.3\): \(x_1=0.6-0.27=0.33\); \(x_2=0.66-0.3267=0.3333\). Early calculators used this trick to divide using only multiplication.
Worked example 12: Trapezium rule with data
A cyclist records her speed (m/s) every 5 s: 0, 4, 7, 9, 10, 10 for \(t=0,5,10,15,20,25\). Estimate the distance travelled in 25 s.
Distance \(=\int v\,dt\approx\dfrac52\left[0+10+2(4+7+9+10)\right]=2.5\times70=175\) m. The speed levels off so the speed-time curve is concave, and the trapezium rule underestimates slightly. The average speed is \(\dfrac{175}{25}=7\) m/s.
Worked example 13: Converting an equation for iteration
Rearrange \(x^3=5x-1\) into the form \(x=g(x)\) in two ways and decide which converges to the root near 0.2.
(A) \(x=\dfrac{x^3+1}5\) gives \(g\prime(x)=\dfrac{3x^2}5\), which at \(x=0.2\) is \(0.024\), very small, so the iteration converges quickly: from \(x_0=0\): \(0.2\), \(0.2016\), \(0.20164\). (B) \(x=\sqrt[3]{5x-1}\) gives \(g\prime(x)=\dfrac{5}{3(5x-1)^{2/3}}\), which at the root near 0.2 involves the cube root of a tiny number, so \(|g\prime|\) is large and the iteration fails. (B) finds the larger root near 2.13 instead.
Worked example 14: Newton-Raphson for a trigonometric equation
Use Newton-Raphson with \(x_0=1\) to solve \(x=2\sin x\) (radians) and find the positive root to 4 decimal places.
Let \(f(x)=x-2\sin x\). Then \(f\prime(x)=1-2\cos x\). \(x_1=1-\dfrac{1-2\sin1}{1-2\cos1}=1-\dfrac{-0.68294}{-0.08060}=-7.47\) which is nowhere near the root: the derivative is almost zero at \(x_0=1\) because \(\cos1\approx0.5\). This is the typical failure. A better start from the graph is \(x_0=2\): \(f(2)=0.18141\), \(f\prime(2)=1.83229\), so \(x_1=1.90099\), \(x_2=1.89551\), \(x_3=1.89549\). The root is 1.8955 to 4 d.p. Always sketch the graph to choose a start where the gradient is not close to zero.
Worked example 15: Is the estimate an over- or under-estimate?
The trapezium rule is used on \(\displaystyle\int_0^3\ln(x+1)\,dx\) with 3 strips. State whether the estimate is too large or too small, then calculate it.
\(y=\ln(x+1)\) has second derivative \(-\dfrac1{(x+1)^2}<0\), so the curve is concave and the chords lie below it: the estimate is too small. Ordinates for \(h=1\): \(0,0.6931,1.0986,1.3863\). Estimate \(=\dfrac12\left[0+1.3863+2(0.6931+1.0986)\right]=\dfrac12\times4.9697=2.4849\). The exact value is \(4\ln4-3=2.5452\), so the estimate is \(2.4\%\) too small.
Worked example 16: Using bounds to show accuracy
Show that the root of \(e^x=3x\) near 1.5 is \(1.512\) to 3 decimal places.
Let \(f(x)=e^x-3x\). \(f(1.5115)=4.5335-4.5345=-0.0010<0\) and \(f(1.5125)=4.5381-4.5375=0.0006>0\). There is a change of sign on \([1.5115,1.5125]\), so the root is 1.512 to 3 d.p.
Note: errors and accuracy
The word accuracy appears in different ways in exam questions. "Correct to 3 decimal places" means you must show a sign change over an interval whose ends round to the same 3 d.p. value. "Find the root to 4 decimal places" means iterate until two consecutive values agree to that accuracy, and then check that the next value does not alter the fourth decimal place. A numerical method gives an approximation, never an exact answer, so make that clear by using the symbol \(\approx\) and by stating the level of accuracy in the conclusion.
Method: choosing and checking a numerical method
- To prove a root exists, find a sign change: evaluate \(f\) at both ends, state the signs, say "continuous" and conclude.
- To use iteration, rearrange \(f(x)=0\) into \(x=g(x)\) and check that \(|g\prime(\alpha)|<1\).
- For Newton-Raphson write \(f\prime(x)\) first and start close to the root; avoid starting where \(f\prime(x)\approx0\).
- For the trapezium rule write \(h\), list the ordinates to 4 d.p., and double the middle ones. Compare with the shape of the curve to say whether the estimate is too big or too small.
- Keep full calculator precision between steps and round only the final answer.
Note: staircase and cobweb diagrams
To visualise an iteration \(x_{n+1}=g(x_n)\) draw the curve \(y=g(x)\) and the line \(y=x\). From \(x_0\) go vertically to the curve, then horizontally to the line, and repeat. If \(0\lt g\prime<1\) the path forms a staircase that approaches the root from one side; if \(-1\lt g\prime<0\) it forms a cobweb spiralling inwards; if \(|g\prime|>1\) the path spirals or climbs away and the iteration diverges.
Watch out: errors in numerical work
- Forgetting the word "continuous" when justifying a root by sign change.
- Rounding the iterates before applying the formula again.
- Using degrees instead of radians when the function contains sine or cosine.
- Using Newton-Raphson from a start where \(f\prime(x_0)=0\), or writing \(x_n+\frac{f(x_n)}{f\prime(x_n)}\) with the wrong sign.
- Halving the end ordinates or doubling them in the trapezium rule: only the middle ordinates are doubled.
Did you know?
Isaac Newton described his method in 1669 for the equation \(x^3-2x-5=0\), and Joseph Raphson published a simpler version in 1690. A modern computer finds square roots using almost exactly the iteration \(x_{n+1}=\tfrac12(x_n+a/x_n)\), which has been used since Babylonian times, 4000 years ago, for the same purpose.
Otto’s tip
Press the calculator ANS key to run an iteration: type the formula once with ANS in place of \(x_n\) and then press equals repeatedly.
How to use this Year 13 numerical methods revision notes
First, read the key points so that you know where the Year 13 numerical methods revision notes is going. Then work through each definition and worked example, and cover the solution before you read it. After that, practise with the numerical methods worksheet and check every question with the worksheet answers. When you feel ready, test yourself with the multiple choice questions or the quick quiz. Finally, sit the numerical methods test and mark it with the test answers.
Also, the starters are a good warm-up, so you can keep the key facts fresh. Moreover, all the pages of this chapter work together, so you can move between them at any time. For example, many pupils read the lesson on Monday, practise on Wednesday and test themselves on Friday. In short, this Year 13 numerical methods revision notes gives you everything you need for the chapter.


















