Topic 13.1: Trapezoidal Rule (Error Analysis)

Contents Previous Chapter Start of Chapter Previous Topic Introduction Notes Theory HOWTO Examples Engineering Error Questions Matlab Maple Next Topic Next Chapter

The error for the trapezoidal rule may be found by integrating the corresponding Taylor series and applying integration by parts. Taylor's series gives us that:

where ξ is in the interval [a, x].

Integrating each side with respect to the variable x from a to b, we get the expression:

Recall from calculus the technique of integration by parts. In this case, may rewrite the integral of x f(1)(x) as:

Substituting this into our expression, we get:

Exchanging the integral and the left-hand side, dividing each side by −2, and collecting appropriately, we get:

Note, we sort of cheated here, because ξ depends on x, however we may replace f(2)(ξ) by the average value:

Example of Error

Consider the integral of cos(x) from 0.2 to 0.4. The correct value of this integral is 0.1907490115, 0.5⋅(cos(0.2) + cos(0.4))⋅0.2 = 0.1901127572, and the difference between these is −0.0006362543. If we calculate the average value of the 2nd derivative and multiply this by −0.23/12, we get −0.0006358300384, and thus our approximation of the error is very close (less than 0.1% error in our estimation of the error).

Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.