Can the trapezium rule help us find the area under y=xlnx?
Question
The continuous function
f
maps the real interval
a≤x≤b
into a subset of the positive real numbers. Derive the trapezium rule for the approximate evaluation of the area under the curve y=f(x) between x=a and x=b, using (n−1) points of subdivision at a distance h=(b−a)/n apart.
Hence obtain an approximation to the integral
I=∫35xlnxdx
using the points of subdivision given in the following table:
| x | 3.0 | 3.5 | 4.0 | 4.5 | 5.0 |
|---|
| xlnx | 3.296 | 4.385 | 5.545 | 6.768 | 8.047 |
Solution
Consider the following diagram.
In this diagram, we start with the graph of y=f(x) between x=a and x=b. This is shown in black. Our goal is to approximate the area under this curve; this is the region in blue (and purple, where it overlaps with the red region).
We then fix an integer n, define h=(b−a)/n, and divide the interval a≤x≤b into n equal parts (of length h) by marking the points at a+h, a+2h, and so on. We then draw line segments between (a,f(a)) and (a+h,f(a+h)); between (a+h,f(a+h)) and (a+2h,f(a+2h)); and so on. This is the (piecewise linear) curve in dark red.
The trapezium rule says that the area under the red curve (the region in light red; this is a sequence of trapezia) is approximately the same as the area under the original graph, with the approximation becoming more exact as
n
increases. We will write this symbolically:
area of the first trapezium+area of the second trapezium+…b+area of the last trapezium=2f(a)+f(a+h)h+2f(a+h)+f(a+2h)h+…b+2f(b−h)+f(b)h=2h(f(a)+2f(a+h)+2f(a+2h)+…b+2f(b−h)+f(b))≈∫abf(x)dx.
In the above,
a=3
,
b=5
,
f(x)=xlnx
, and
h=0.5
. Hence,
∫35xlnxdx≈20.5(f(3)+2f(3.5)+2f(4)+2f(4.5)+f(5))=41(3.296+2×4.385+2×5.545+2×6.768+8.047)=11.18475=11.2to 3 s.f.
We can, in fact, integrate xlnx exactly using integration by parts. We find ∫35xlnxdx=11.17421860…, so the above approximation is not bad.
