# 43 The Trapezoid Rule

Recall that in Part I: Chapter 3, we mentioned that the integral of a function could be thought of as the area between the horizontal axis and the graph of the function. We are now going to take a more detailed look at this idea.

Consider the following diagram.

The integral that this figure represents is

What the integral does is partition the interval into smaller intervals

each with a length of . Then, is multiplied by the function evaluated at the beginning point of each interval, and the products are added together. That is,

As we can see, this equation is the same one we would use if we were asked to find the areas of the rectangles and add them together. Thus, the integral is approximately the combined area of these rectangles. Unfortunately, the problem with using these rectangles is that they do not give a very good approximation of the area under the curve because there are large gaps between the rectangles and the curve.

This problem can be fixed by making very, very small which results in many, very thin rectangles. Because these rectangles are so thin, they provide a much better approximation of the area under the curve that differs only slightly from the exact area. Because finding the areas of each of these rectangles and adding them together is a difficult if not impossible task, we evaluate the integral using the Fundamental Theorem of Calculus, which is stated in chapter 3.

However, using this theorem requires that we find the antiderivative of the function, which can sometimes be extremely difficult. This is why the trapezoid rule is important. It enables us to bypass the antiderivative and gives us a better approximation of the area than the rectangle method can give.

Visually, the trapezoid rule uses trapezoids as opposed to rectangles. Consider the following diagram.

Recall that the area of a trapezoid is the average of the lengths of the parallel sides multiplied by the distance between the parallel sides. Using figure 25, the area of the trapezoid is

where is the distance between and .

The way we approximate an integral using the trapezoid rule is similar to how we did it with the rectangles. We partition the interval into smaller intervals of equal length, but instead of using rectangles, we use trapezoids. We then find the area of each trapezoid and add the areas together.

From figures 24 and 25, it is clear that the trapezoid rule provides a better approximation than the rectangle method because there is less space between the trapezoids and the curve than there is between the rectangles and the curve.

Let’s now work through an example I completed for this paper that comes from Hiebert [9].

**Example 77**

Consider the following integral:

Evaluate this integral with 4 intervals, using the trapezoid rule.

**Solution**

We want to break the interval into 4 equally sized intervals. So, our intervals are

Next, we use the formula

on each interval to find the area of each trapezoid and add the areas together. So, what we have is

Therefore,

by the trapezoid rule.

Whenever we find an approximation, we want to find how close it is to the exact answer. In our next section, we will do just that by calculating the Trapezoid Rule errors.

#### Trapezoid Rule Errors

Since the trapezoid rule approximates the integral, it is helpful to know how much of a difference there is between the approximated area and the exact area. The formula for the error, known as truncated error, is given by Hiestand as follows [9].

(1)

Using this formula, we can calculate two different errors, the maximum error and the average error.

**The Maximum Error**

The first method is the maximum error method, which gives us the largest possible error. That is, the true error between the exact and approximated value will be less than or equal to the maximum error. To find this error, we first choose in the interval such that the absolute value of is greater than or equal to the absolute value of for all in [9]. Then, we substitute for in equation 1 above. This gives us

(2)

which is the formula for the maximum error [9].

In the following example, we are going to approximate the maximum error for our approximation from example 77.

**Example 78**

Consider the following integral:

Estimate the maximum error when .

**Solution**

We have that

Below is the graph of restricted to the domain .

The -value for which the absolute value of is greatest is 0.5 since the point is the farthest from the -axis. So, we should let . Plugging everything into equation 2 above, we have

Therefore,

**Average Error**

The other error we can calculate is the average error. According to Hiebert, the formula

gives us the average of the th derivative of a function over the interval [9]. So,

To get the formula for the average error, we substitute this equation into our formula for (equation 1) [9].

(3)

In the following example, we are going to approximate the average error for our approximation from example 77.

**Example 79**

Consider the following integral:

Estimate the average error when .

**Solution**

We have that

It follows that

and

Substituting everything into equation 3 above, we have

Therefore,

The Trapezoid Rule developed from the need to have a more accurate approximation of an integral than the rectangle method could give. Similarly, Simpson’s Rules provide us with even better approximations than the Trapezoid Rule can give. We will look at both Simpson’s rule and rule, and which rule we use to approximate an integral depends on how many intervals we have.