James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
A level Maths › Pure · Numerical methods › Newton–Raphson & the trapezium rule

Newton–Raphson & the trapezium rule

The Newton–Raphson method for finding roots quickly, when it fails, and the trapezium rule for estimating areas, including whether it over- or under-estimates.

Pure 9.3, 9.4Year 2≈ 55 min to work through
Before you start: locating roots, differentiation and definite integrals. See Locating roots & iteration and Integration & areas.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Use the Newton–Raphson formula to find a rootY2
  • Explain the method using a tangent, and say when it failsY2
  • Use the trapezium rule to estimate a definite integralY2
  • Decide whether the trapezium rule gives an overestimate or an underestimateY2
  • Improve an estimate by using more stripsY2

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

Both methods replace a curve by straight lines. Newton–Raphson follows the tangent down to the x-axis to get a better guess at a root. The trapezium rule replaces the curve by chords and adds up the areas of the trapezia underneath. Straight lines are easy to work with, and the error shrinks quickly as the lines get shorter.

2.1 The Newton–Raphson method

Newton–Raphson
xn+1=xn−f(xn)f\′(xn)
Where does the formula come from?

At xn the tangent has gradient f\′(xn) and passes through (xn,f(xn)). It meets the x-axis where 0−f(xn)=f\′(xn)(x−xn), i.e. at x=xn−f(xn)f\′(xn). That point is the next approximation.

Worked example 1Calculator
Use the Newton–Raphson method with x0=2 to find the root of x3−2x−5=0 to 4 decimal places.
f(x)=x3−2x−5, f\′(x)=3x2−2
x1=2−−110=2.1
x2=2.1−0.06111.23=2.094568…
x3=2.094551…; the root is 2.0946 (4 d.p.)
Newton–Raphson usually converges much faster than a simple iteration.

When it fails. If f\′(xn)=0, the tangent is horizontal and never meets the x-axis: the formula would divide by zero. If x0 is near a stationary point, f\′(xn) is small and the next value jumps far away, possibly towards a different root.

Worked example 2Calculator
Explain why x0=23 cannot be used as a starting value for Newton–Raphson on x3−2x−5=0.
f\′(23)=3×23−2=0
The tangent there is horizontal (a stationary point), so it does not meet the x-axis and x1 cannot be found.

2.2 The trapezium rule

Trapezium rule
∫abydx≈h2[y0+yn+2(y1+y2+…+yn−1)],h=b−an

n strips of width h; y0,…,yn are the heights at the n+1 ordinates. This is in the formulae booklet.

Worked example 3Calculator
Use the trapezium rule with 4 strips to estimate ∫13lnxdx.
h=0.5; x=1,1.5,2,2.5,3
y=0, 0.405465, 0.693147, 0.916291, 1.098612
≈0.25[0+1.098612+2(0.405465+0.693147+0.916291)]=1.2821

The exact value is 3ln3−2=1.2958. The estimate is too small.

2.3 Overestimate or underestimate?

Look at the shape of the curve. If it is concave (curving downwards, like lnx), the chords lie below the curve and the trapezium rule underestimates. If it is convex (curving upwards, like ex), the chords lie above and it overestimates. Using the second derivative: f\′\′<0 concave, f\′\′>0 convex.

More strips make the chords hug the curve more closely, so the estimate improves. Doubling the number of strips roughly quarters the error.

Worked example 4 (faded)Calculator
Will the trapezium rule over- or under-estimate ∫01exdx?
d2dx2ex=ex>0, so the curve is convex and the estimate is an overestimate.  ← you work this out
On your Casio ClassWiz Calculator tricks →

For Newton–Raphson, type x0, EXE, then Ans − f(Ans) ÷ f′(Ans) with your own f and f′, and press EXE repeatedly. For the trapezium rule, the Table app gives all the y-values: set the start, end and step equal to a, b and h. CATALOG → Func Analysis → Integration gives the integral to compare with.

3Explore it

Change the number of strips and compare the trapezium estimate with the exact area. On a concave curve the trapezia sit below the curve; on a convex curve, above it.

4Common mistakes & exam tips

Common mistakes

  • Using the number of ordinates instead of the number of strips: 4 strips means 5 values of y.
  • Forgetting to double the middle ordinates, or doubling the first and last.
  • Rounding the y-values too early: keep at least 5 significant figures.
  • In Newton–Raphson, differentiating f incorrectly, or using f(xn) in place of f\′(xn).
  • Saying the trapezium rule is "accurate" without reasoning about concavity.

Exam tips

  • Set out a table of x and y values: it earns method marks and avoids mistakes.
  • For Newton–Raphson, write down f(x) and f′(x) clearly before substituting.
  • Use the Table app on your calculator for the y-values in the trapezium rule.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Use Newton–Raphson once with x0=1 on f(x)=x2−2.
x1=1−−12=1.5
FluencyP2
Continue: find x2 and x3. What number are you approximating?
1.41667, 1.41422: 2
FluencyP3
Use the trapezium rule with 2 strips to estimate ∫02x2dx.
h=1: 12[0+4+2(1)]=3 (exact 83)
FluencyP4
Is the estimate in the previous question an overestimate or an underestimate? Why?
Overestimate: y=x2 is convex.
Problem solvingP5
Use the trapezium rule with 4 strips to estimate ∫0111+x2dx, to 4 d.p.
0.7828 (exact π4=0.7854)
Problem solvingP6
Explain why x0=1 cannot be used as a starting value for Newton–Raphson on f(x)=x3−3x+1.
f\′(x)=3x2−3, so f\′(1)=0: the tangent is horizontal and the formula divides by zero.

6Exam-style questions

Original exam-style questions with full markschemes. Edexcel papers allow a calculator throughout, but questions labelled “No calculator” practise exact working. Allow about 1.2 minutes per mark.

Question 1Calculator[5 marks]

f(x)=x3+2x2−6

  • (a)Find f\′(x).[1]
  • (b)Taking x0=1.5 as a first approximation, apply the Newton–Raphson method twice to find x2, giving your answer to 3 decimal places.[4]
(a)
3x2+4xB1
(b)
x1=1.5−f(1.5)f\′(1.5)=1.5−1.87512.75M1
x1=1.3529…A1
applying againM1
x2=1.340A1
Question 2Calculator[6 marks]

The table shows values of y=1+x3 for 0≤x≤2, to 4 d.p.

x00.511.52
y11.06071.41422.09173

  • (a)Use the trapezium rule with all the values in the table to estimate ∫021+x3dx, to 3 decimal places.[3]
  • (b)Explain how the estimate could be made more accurate.[1]
  • (c)Using your answer to (a), estimate ∫02(4+1+x3)dx.[2]
(a)
h=0.5B1
0.52[1+3+2(1.0607+1.4142+2.0917)]M1
3.283A1
(b)
use more strips (a smaller h)B1
(c)
∫024dx=8M1
11.283A1
Question 3Calculator[4 marks]

The trapezium rule with 4 strips gives an estimate of 1.2821 for ∫13lnxdx.

  • (a)Explain, with reference to the shape of the curve, whether this is an overestimate or an underestimate.[2]
  • (b)Given that ∫13lnxdx=3ln3−2, find the percentage error in the estimate.[2]
(a)
d2dx2lnx=−1x2<0, so the curve is concaveM1
the chords lie below the curve: an underestimateA1
(b)
1.29584−1.28211.29584×100M1
1.06%A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real Edexcel A level questions. Past papers and markschemes are on the Pearson website.

PaperQuestionFocusDifficulty
June 2022 · Paper 2Q5Trapezium rule from a table, then related integrals★☆☆
June 2023 · Paper 1Q5Trapezium rule with unknowns in the table★☆☆
June 2018 · Paper 2Q5Show the Newton–Raphson formula, iterate, and explain a failure★★☆
June 2022 · Paper 2Q6Newton–Raphson on a trig function from a sketch★★☆
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake