How to Calculate Errors on the Trapezoidal Rule
- 1). Substitute the left endpoint of the interval being examined into the f ''(x) equation. For example, if f ''(x) = 2 / x^3 on the interval (1, 2), substitute x = 1 into f ''(x): f ''(1) = 2 / (1)^3 = 2. Therefore, K can be set to equal any number from 2 to infinity. However, setting K to 2 gives the most accurate error estimate.
- 2). Substitute K into the trapezoidal rule error bounds equation: absolute value of the trapezoidal error bound = abs(E-t) <= K(b - a)^3 / 12n^2, K is a number greater or equal to f ''(x), a and b are lower and upper bounds of the interval and n is your chosen number of subintervals. For example, if K = 2 and n = 5 on the interval (1, 2) the error bounds equation becomes: abs(E-t) = 2(2 - 1)^3 / 12(5)^2.
- 3). Solve the error bounds equation. For example, abs(E-t) = 2(2 - 1)^3 / 12(5)^2 = 2(1) / 12(25) = 2 / 300 = 0.006667. This means that the approximation of the area given by the trapezoidal rule with n = 5 is within 0.006667 of the actual value.
Source...