The trapezium rule
In a nutshell
The trapezium rule can be used to estimate the area between a graph and the x-axis by splitting up the region into trapezia. It is a useful alternative to integration for functions that can't be integrated in terms of standard functions.
Deriving the formula
Consider the region A that is bounded by the graph of y=f(x), the x-axis and the lines x=a and x=b.
The exact area of A can be found using definite integration. In particular:
A=∫baf(x)dx
However, suppose that f(x) cannot be integrated in terms of elementary functions - there is a surprisingly large quantity of such functions.
The area can instead be estimated by dividing the area into n trapezia of equal width.
The area of the region is given by the sum of the trapezia:
A=i=1∑nAi
Recall that the area of a trapezium is given by the formula:
A=21h(b1+b2) | A | Area | b1,b2 | Lengths of the two parallel sides | h | Height | |
Each trapezium has equal width. There are n trapezia between the lines x=a and x=b. This gives the width to be:
h=nb−a
Note that for a general trapezium Ai, the two parallel sides will have lengths yi−1 and yi.
The area of Ai can therefore be calculated to be:
Ai=21h(b1+b2)=21(nb−a)(yi−1+yi)
The area of the entire region is found by taking the sum of this expression.
A=i=1∑nAi=i=1∑n(21(nb−a)(yi−1+yi))=2nb−ai=1∑n(yi−1+yi)=2nb−a[(y0+y1)+(y1+y2)+(y2+y3)+...+(yn−1+yn)]
Note that every value of yi is added twice except for y0 and yn. Therefore, the formula can be further simplified to give the common form of the trapezium rule:
∫baf(x)dx≈2nb−a[y0+yn+2(y1+...+yn−1)]≈2nb−a[(first term)+(last term)+2×(sum of middle terms)]
Where n is the number of trapezia and the "terms" refer to the yi values.
Note: The greater the value of n, the more accurate the estimate will be. This makes sense, as more trapezia used to estimate the area will cover more of the desired region.
Example 1
The region A below is bounded by the graph of y=xsin(x) and the x-axis in the region 0≤x≤π.
i) Using 6 trapezia of equal width, estimate the area of the region A to 3 d.p.
ii) Is your estimate likely to be an overestimate or an underestimate?
Part i):
Write down the values of a,b and n:
a=0,b=π,n=6
Calculate all your values of xi. It is best to write them down in a table. Note that each trapezia will have width 6π−0=6π. Therefore, the values of xi will increment by the same amount.
i | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
xi | 0 | 6π | 62π=3π | 63π=2π | 64π=32π | 65π | 66π=π |
yi | | | | | | | |
Fill in the corresponding yi values by using the fact that f(xi)=yi:
i | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
xi | 0 | 6π | 3π | 2π | 32π | 65π | π |
yi | 0 | 0.261799 | 0.906900 | 1.570796 | 1.813800 | 1.308997 | 0 |
Use the trapezium rule formula:
A≈2nb−a[y0+yn+2(y1+...+yn−1)]≈2(6)π−0[0+0+2(0.261799+0.906900+1.570796+1.813800+1.308997)]≈12π[11.724584]≈3.069488913...≈3.069 (3 d.p.)
A≈3.069 (3 d.p.)
Part ii):
The estimate is an underestimate as the curvature of the graph is such that it will go over the trapezia, meaning there is some of the region which is not covered by the trapezium rule.