Topic 13.2: Composite-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 applied to a single interval [a, b] is given by

where ξ is some value in the interval [a, b], that is, the interval of integration.

If we are applying the composite trapezoidal rule to n intervals, each of width h = (b - a)/n, the error for the composite-trapezoidal rule is the sum of the errors on each of the individual intervals, namely:

where ξi ∈ [a + (i - 1)h, a + ih].

To simplify this expression, we note that the sum approximates n times the average value of f(2)(x)

and thus, by substituting this into the original equation, we have that the error may be approximated by:

Example

To demonstrate this, suppose we integrate f(x) = x e-x on the interval [0, 4] with 10 intervals. This gives us an approximation of 0.8944624935 whereas the correct answer (to 10 decimal digits) is 0.9084218056, and therefore the difference (the error) is 0.0139593121.

The average value of the second derivative of f(x) is -0.2637367292, and if we multiply this by -1/12 ⋅ 4 ⋅ 0.42, we get that a good approximation of the error should be 0.01406595889, which is very close to the actual error of our approximation.

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