Skip to content
MathsGenie logo
Quick links
Open app

Course home

  1. A Level
  2. Maths OCR
  3. Revision guides

1.12.3 Numerical integration (A-level only)

What you'll learn

  • How a definite integral represents signed area.
  • How to apply the trapezium rule using equally spaced ordinates.
  • How to decide whether a trapezium-rule estimate is too large or too small.
  • How to use upper and lower estimates to give limits for an area.

Before You Start

Definite integrals and area

A definite integral gives the signed area between a graph and the horizontal axis over a specified interval:

∫abf(x) dx\int_a^b f(x)\,dx∫ab​f(x)dx

If f(x)≥0f(x)\ge 0f(x)≥0 throughout the interval, this is the ordinary area under the curve y=f(x)y=f(x)y=f(x) from x=ax=ax=a to x=bx=bx=b.

If the graph lies below the horizontal axis, the integral counts that part negatively. Therefore, a definite integral and a total geometrical area are not always the same.

Definition

Numerical integration

Numerical integration means estimating a definite integral using numerical values of the function, rather than finding and integrating an exact algebraic expression.

Numerical integration is useful when:

  • the function cannot easily be integrated;
  • only a table of values is available;
  • an approximate numerical answer is sufficient.
Example

Interpreting a definite integral

Suppose f(x)≥0f(x)\ge 0f(x)≥0 for 1≤x≤51\le x\le 51≤x≤5 and

∫15f(x) dx≈12.7.\int_1^5 f(x)\,dx\approx 12.7.∫15​f(x)dx≈12.7.
  1. The limits 1 and 5 show that the region extends from x=1x=1x=1 to x=5x=5x=5.
  2. Because f(x)≥0f(x)\ge 0f(x)≥0, the graph does not go below the horizontal axis.
  3. The approximate area under the curve is therefore 12.7 square units.

Dividing the Interval

To estimate an area, you divide the interval into narrow vertical strips.

The vertical boundary lines of these strips are called ordinates. If the interval is divided into nnn equal strips, there are n+1n+1n+1 ordinates because both endpoints are included.

Let the equally spaced coordinates be

x0,x1,x2,…,xn,x_0,x_1,x_2,\ldots,x_n,x0​,x1​,x2​,…,xn​,

with corresponding heights

y0,y1,y2,…,yn,y_0,y_1,y_2,\ldots,y_n,y0​,y1​,y2​,…,yn​,

where yi=f(xi)y_i=f(x_i)yi​=f(xi​).

Definition

Strip width

If the interval from x=ax=ax=a to x=bx=bx=b is divided into nnn equal strips, the width of each strip is

h=b−an.h=\frac{b-a}{n}.h=nb−a​.
Common Mistake

Confusing strips and ordinates

For nnn strips, you need n+1n+1n+1 function values. For example, 4 strips require 5 ordinates.

Example

Finding the ordinates

Divide the interval from x=2x=2x=2 to x=5x=5x=5 into 6 equal strips.

  1. Calculate the strip width:

    h=5−26=12.h=\frac{5-2}{6}=\frac12.h=65−2​=21​.
  2. Begin at 2 and repeatedly add 12\frac1221​:

    2, 2.5, 3, 3.5, 4, 4.5, 5.2,\ 2.5,\ 3,\ 3.5,\ 4,\ 4.5,\ 5.2, 2.5, 3, 3.5, 4, 4.5, 5.
  3. There are 7 ordinates, confirming that 6 strips have been formed.

The Trapezium Rule

Instead of following the curve exactly, the trapezium rule joins consecutive points on the curve with straight lines. Each strip is then treated as a trapezium.

A curve divided into five equal strips and approximated by trapezia

The area of one trapezium with parallel sides yiy_iyi​ and yi+1y_{i+1}yi+1​ and width hhh is

12h(yi+yi+1).\frac12h(y_i+y_{i+1}).21​h(yi​+yi+1​).

Adding the areas of all the trapezia gives the full rule.

Key Idea

The trapezium rule formula

For nnn equal strips of width hhh,

∫abf(x) dx≈h2[y0+yn+2(y1+y2+⋯+yn−1)].\int_a^b f(x)\,dx \approx \frac{h}{2} \left[ y_0+y_n+2(y_1+y_2+\cdots+y_{n-1}) \right].∫ab​f(x)dx≈2h​[y0​+yn​+2(y1​+y2​+⋯+yn−1​)].

The first and last ordinates appear once. Every interior ordinate appears twice.

A useful memory pattern is:

h2[first+last+2(all the middle values)].\frac{h}{2} \left[ \text{first}+\text{last}+2(\text{all the middle values}) \right].2h​[first+last+2(all the middle values)].
Example

Estimating an integral from a table

Use the trapezium rule with 4 strips to estimate

∫0211+x2 dx.\int_0^2 \frac{1}{1+x^2}\,dx.∫02​1+x21​dx.

The relevant values are

x:0, 0.5, 1, 1.5, 2,y:1, 0.8, 0.5, 413, 0.2.\begin{aligned} x &: 0,\ 0.5,\ 1,\ 1.5,\ 2,\\ y &: 1,\ 0.8,\ 0.5,\ \frac{4}{13},\ 0.2. \end{aligned}xy​:0, 0.5, 1, 1.5, 2,:1, 0.8, 0.5, 134​, 0.2.​
  1. Calculate the strip width:

    h=2−04=0.5.h=\frac{2-0}{4}=0.5.h=42−0​=0.5.
  2. Substitute the first and last heights once and the middle heights twice:

    ∫0211+x2 dx≈0.52[1+0.2+2(0.8+0.5+413)].\int_0^2 \frac{1}{1+x^2}\,dx \approx \frac{0.5}{2} \left[ 1+0.2+2\left(0.8+0.5+\frac{4}{13}\right) \right].∫02​1+x21​dx≈20.5​[1+0.2+2(0.8+0.5+134​)].
  3. Evaluate the expression:

    ∫0211+x2 dx≈1.103846…≈1.104.\int_0^2 \frac{1}{1+x^2}\,dx \approx 1.103846\ldots \approx 1.104.∫02​1+x21​dx≈1.103846…≈1.104.
Tip

Organising your substitution

Write the first and last values before inserting the doubled bracket of middle values. This makes missing or doubling an endpoint less likely.

Common Mistake

Using an incorrect strip width

Find hhh from the limits and the number of strips. Do not assume that h=1h=1h=1, and do not divide by the number of ordinates.

Accuracy of the Estimate

The straight top of each trapezium usually does not coincide exactly with the curve. The difference between the estimate and the true integral is called the error.

Using more, narrower strips usually makes the estimate more accurate because each straight segment follows a smaller portion of the curve.

Concavity and the direction of error

A curve is concave up when its gradient is increasing. It bends like a cup, and its second derivative is positive:

f′′(x)>0.f''(x)>0.f′′(x)>0.

The chords joining points on a concave-up curve lie above the curve. The trapezium rule therefore gives an overestimate.

A curve is concave down when its gradient is decreasing, so

f′′(x)<0.f''(x)<0.f′′(x)<0.

The chords lie below the curve, giving an underestimate.

Key Idea

Judging the error

  • If f′′(x)>0f''(x)>0f′′(x)>0 throughout the interval, the trapezium estimate is an upper bound.
  • If f′′(x)<0f''(x)<0f′′(x)<0 throughout the interval, the trapezium estimate is a lower bound.
Example

Determining the direction of error

A trapezium-rule calculation estimates

∫13ln⁡x dx.\int_1^3 \ln x\,dx.∫13​lnxdx.
  1. Differentiate twice:

    f′(x)=1x,f′′(x)=−1x2.f'(x)=\frac1x, \qquad f''(x)=-\frac{1}{x^2}.f′(x)=x1​,f′′(x)=−x21​.
  2. For 1≤x≤31\le x\le 31≤x≤3, the second derivative is negative, so the curve is concave down throughout the interval.

  3. The straight chords lie below the curve, so the trapezium-rule result is an underestimate and forms a lower bound for the integral.

Common Mistake

Changing concavity

If f′′(x)f''(x)f′′(x) changes sign within the interval, the curve changes concavity. You cannot use one simple statement to claim that the whole trapezium estimate is an upper or lower bound.

Giving Limits for an Area

A lower bound is a value known to be no greater than the true area. An upper bound is a value known to be no less than the true area.

If LLL is a lower estimate and UUU is an upper estimate, then the true area AAA satisfies

L≤A≤U.L\le A\le U.L≤A≤U.

For a positive increasing function, rectangles using the left endpoint of each strip lie below the curve, while rectangles using the right endpoint lie above it.

Example

Bounding an area with rectangles

Use 4 equal strips to bound the area under y=x2y=x^2y=x2 from x=0x=0x=0 to x=2x=2x=2.

  1. The width is h=0.5h=0.5h=0.5, and the heights are

    0, 0.25, 1, 2.25, 4.0,\ 0.25,\ 1,\ 2.25,\ 4.0, 0.25, 1, 2.25, 4.
  2. Since x2x^2x2 is increasing, use the four left-hand heights for a lower bound:

    L=0.5(0+0.25+1+2.25)=1.75.L=0.5(0+0.25+1+2.25)=1.75.L=0.5(0+0.25+1+2.25)=1.75.
  3. Use the four right-hand heights for an upper bound:

    U=0.5(0.25+1+2.25+4)=3.75.U=0.5(0.25+1+2.25+4)=3.75.U=0.5(0.25+1+2.25+4)=3.75.
  4. Therefore, if AAA is the true area,

    1.75≤A≤3.75.1.75\le A\le 3.75.1.75≤A≤3.75.
Exam technique

In the exam

  1. Calculate h=b−anh=\frac{b-a}{n}h=nb−a​ before substituting any heights.
  2. Check that nnn strips correspond to n+1n+1n+1 ordinates.
  3. Use the pattern first + last + twice the middle values, keeping full calculator accuracy until the end.
  4. Sketch or examine f′′(x)f''(x)f′′(x) before claiming that an answer is an overestimate or underestimate.
  5. State bounds as a complete inequality such as L≤A≤UL\le A\le UL≤A≤U.
Self review

Check yourself

  • How many ordinates are required when the interval is divided into 8 strips?
  • Why are the interior ordinates doubled in the trapezium-rule formula?
  • What does the sign of f′′(x)f''(x)f′′(x) tell you about whether the trapezium rule overestimates or underestimates?

How was this guide?

Teach Genie

Review 1.9.6 Numerical integration (A-level only) by teaching Genie

Teach it back in your own words, spot gaps, and remember it better.

Start teaching
Genie and Baby Genie

1.9.6 Numerical integration (A-level only) Revision Guide

  1. A Level
  2. /Maths
  3. /1.9.6 Numerical integration (A-level only)