Education.com
Try
Brainzy
Try
Plus

The Trapezoid Rule Help

By — McGraw-Hill Professional
Updated on Sep 1, 2011

Introduction to The Trapezoid Rule

While there are many integrals that we can calculate explicitly, there are many others that we cannot. For example, it is impossible to evaluate

Applications of the Integral 8.7 Numerical Methods of Integration

That is to say, it can be proved mathematically that no closed-form antiderivative can be written down for the function e x 2 . Nevertheless, (*) is one of the most important integrals in all of mathematics, for it is the Gaussian probability distribution integral that plays such an important role in statistics and probability.

Thus we need other methods for getting our hands on the value of an integral. One method would be to return to the original definition, that is to the Riemann sums. If we need to know the value of

Applications of the Integral 8.7 Numerical Methods of Integration

then we can approximate this value by a Riemann sum

Applications of the Integral 8.7 Numerical Methods of Integration

A more accurate approximation could be attained with a finer approximation:

Applications of the Integral 8.7 Numerical Methods of Integration

or

Applications of the Integral 8.7 Numerical Methods of Integration

The trouble with these “numerical approximations” is that they are calculationally expensive: the degree of accuracy achieved compared to the number of calculations required is not attractive.

Fortunately, there are more accurate and more rapidly converging methods for calculating integrals with numerical techniques. We shall explore some of these in the present section.

It should be noted, and it is nearly obvious to say so, that the techniques of this section require the use of a computer. While the Riemann sum (**) could be computed by hand with some considerable effort, the Riemann sum (*) is all but infeasible to do by hand. Many times one wishes to approximate an integral by the sum of a thousand terms (if, perhaps, five decimal places of accuracy are needed). In such an instance, use of a high-speed digital computer is virtually mandatory.

The Trapezoid Rule

The method of using Riemann sums to approximate an integral is sometimes called “the method of rectangles.” It is adequate, but it does not converge very quickly and it begs more efficient methods. In this subsection we consider the method of approximating by trapezoids.

Let f be a continuous function on an interval [ a, b ] and consider a partition P = {x 0, x 1,..., x k} of the interval. As usual, we take x 0 = a and x k = b. We also assume that the partition is uniform.

In the method of rectangles we consider a sum of the areas of rectangles. Figure 8.44 shows one rectangle, how it approximates the curve, and what error is made in this particular approximation. The rectangle gives rise to a “triangular” error region (the difference between the true area under the curve and the area of the rectangle). We put quotation marks around the word “triangular” since the region in question is not a true triangle but instead is a sort of curvilinear triangle. If we instead approximate by trapezoids, as in Fig. 8.45 (which, again, shows just one region), then at least visually the errors seem to be much smaller.

Applications of the Integral 8.7 Numerical Methods of Integration

Fig. 8.44

Applications of the Integral 8.7 Numerical Methods of Integration

Fig. 8.45

In fact, letting Δ x = x j − x j −1 as usual, we see that the first trapezoid in the figure has area [ f ( x 0 ) + f ( x 1 )] · Δ x /2. The second has area [ f ( x 1 ) + f ( x 2 )] · Δ x /2, and so forth. In sum, the aggregate of the areas of all the trapezoids is

Applications of the Integral 8.7 Numerical Methods of Integration

It is known that, if the second derivative of f on the interval [ a, b ] does not exceed M then the approximation given by the sum (†) is accurate to within

Applications of the Integral 8.7 Numerical Methods of Integration

[By contrast, the accuracy of the method of rectangles is generally not better than where N is an upper bound for the first derivative of f .

Applications of the Integral 8.7 Numerical Methods of Integration

We see that the method of trapezoids introduces an extra power of ( b − a ) in the numerator of the error estimate and, perhaps more importantly, an extra factor of k in the denominator.]

View Full Article
Add your own comment