# Trapezoid Sum with Shortcuts

The trapezoid sum is a good one to have some shortcuts for. We'll call the trapezoid sum with *n* sub-intervals TRAP(n).

Here's our favorite shortcut: *TRAP*(*n*) is the average of *LHS*(*n*) and *RHS*(*n*).

These rectangles are, respectively a left-hand sum and a right-hand sum!

Remember that the trapezoid sum is the average of the left- and right-hand sums. However, there's an even shorter way to get a trapezoid sum out of your calculator.

Remember that

*LHS*(*n*) = [*f* (*x*_{0}) + *f* (*x*_{1}) + ... + *f* (*x*_{{ n – 1 }})]Δ*x*

and

*RHS*(*n*) = [*f* (*x*_{1}) + ... + *f* (*x*_{{ n – 1 }}) + *f* (*x*_{n})]Δ*x*.

The trapezoid sum is the average of the right- and left-hand sums, so

This is kind of a mess. It gets better if we factor out the Δ*x*:

Now look carefully at what we have inside the parentheses. The quantities *f* (*x*_{0}) and *f* (*x _{n}*) only show up once each, because

*f*(

*x*

_{0}) is only used in the left-hand sum and

*f* (*x _{n}*) is only used in the right-hand sum:

However, every term from *f* (*x*_{1}) to *f* (*x*_{{ n – 1 }}) is used in both the left-hand sum and right-hand sum, so each of these terms will show up twice each!

That means

If we're estimating the area between *f* and the *x*-axis on [a,b] with *TRAP*(n) the first thing we do is divide [a,b] up into *n* equal sub-intervals and find the endpoints.

The value *f* (*x*_{0}) is only used as a height of the left-most trapezoid. Similarly, the value *f* (*x*_{n}) is only used as a height of the right-most trapezoid. However, the value of *f* at every endpoint in between these shows up in two trapezoids.

When we add the areas of all these trapezoids we get

Factoring out the and the Δ*x* gives us

Now we have a much better way to find a trapezoid sum:

In words,

- divide the interval into sub-intervals

- find the value of
*f*at each endpoint

- multiply each value by 2
*unless*it's the value of*f*at one of the original endpoints

- add everything up, divide by 2, and multiply by the width of a sub-interval!