NARRATOR: Exercise 4.
Show that the trapezoidal estimate is the average
of the left endpoint estimate and the right endpoint estimate.
First we consider the left endpoint estimate,
which I'll abbreviate to LEE.
And we note that the width of each rectangle here
is the difference between consecutive x values,
so, for example, the width of that first rectangle is x1 – x0,
the width of the second rectangle is x2 – x1,
the width of the third rectangle x3 – x2, etc.
So we can generalise that as (xi + 1) – xi.
And we're going to call that width of each rectangle 'delta-x',
just to make life easier.
So the left endpoint estimate can be calculated
by adding up the areas of all of these rectangles.
And we note that with the left endpoint estimate,
the first rectangle has a height equivalent
to the value of the function at x0.
So our first rectangle has an area of f(x0) multiplied by delta-x.
And the next rectangle has an area of f(x1) multiplied by delta-x.
And we can continue right up to the last rectangle
which has a height equivalent to the value of the function
at (xn-1).
So the final rectangle has an area of f(xn-1) multiplied by delta-x.
Next, thinking about the right endpoint estimate,
which I'll abbreviate to REE.
Again, we know that the width of each of these rectangles -
we're going to refer to that as delta-x -
and that's equivalent to
the difference between consecutive x values.
And here we see the main difference with the right endpoint estimate
is that the height of the first rectangle
isn't the value of the function at x0
but instead the value of the function at x1.
And so the area of the first rectangle
is f(x1) multiplied by delta-x.
The area of the next rectangle is f(x2) multiplied by delta-x.
And we can continue right up to the final rectangle,
which has a height equivalent to the value of the function at xn.
So the final rectangle has an area of f(xn) multiplied by delta-x.
And we can factor out the delta-x
which is common to each of these expressions
and see that the right endpoint estimate
is just equal to the sum of the values of the function
everywhere from x1 up to xn multiplied by delta-x.
So now with our expressions
for the left endpoint estimate and the right endpoint estimate,
we can work out an expression for the average of those two estimates.
So we would add them together and divide them by two
to calculate the average.
So next I've just factored out the delta-x from both expressions
and also rewritten the division of 2 as a multiplication by a half.
And now we can see that interspersing
the terms from the left endpoint estimate
with the terms from the right endpoint estimate,
that we're getting f(x0) + f(x1)
and then + f(x1) + f(x2) + f(x2) + f(x3).
And we can continue these little pairings,
which when we split them all up again,
so we take each of those little pairs
and break it out with a half and a delta-x as a factor,
we see we get these little sums.
So we get half times f(x0) + f(x1) then multiplied by delta-x,
+ half times f(x1) + f(x2) multiplied by delta-x.
And this may seem trivial, but what we should be able to note
is when we actually think about the trapezoidal estimate,
is in fact each of these expressions
is how we calculate the area of each of these little trapezia.
So that first trapezium in this diagram here
we see has a height, if you like,
so that's the perpendicular height
between the two different-length parallel sides.
That's delta-x.
And we also know that to find the area of a trapezium,
we're finding half
multiplied by the sum of the length of the two parallel sides
and then multiplied by that height that I referred to before.
So the area of the first trapezium would be found
by doing half times the value of the function at x0
+ the value of the function at x1,
and then multiplying that by delta-x.
And we can repeat that
all the way up to our final trapezium
as shown in that equation there.
So we can see that simply
by manipulating the algebra of what's going on
behind the left endpoint estimate
and the right endpoint estimate,
we can show that in fact
the average of the left and right endpoint estimates
is equivalent to the trapezoidal estimate.