18.4 Improved Trapezoidal Rule

Contents

18.4 Improved Trapezoidal Rule#

We can use the theoretical error of the composite trapezoidal rule to improve our approximation of the integral.

We presented an expression of the composite trapezoidal rule in Equation (20). This was the result of applying the Discrete Average Value theorem [IntTrap1] to

(23)#\[ I_n - T_n(f) = - \frac{1}{12} h^3 \sum_{i=0}^{n-1} f''(\xi_i) \]

for \(\xi_i \in [a+ih, a+(i+1)h]\). Equation (23) is a direct result of summing the errors of the trapezoidal rule for each sub-interval.

Note that the sum of \(f''\) in (23) can be interpreted as a (finite) Riemann sum:

\[ \sum_{i=0}^{n-1} h f''(\xi_i) \approx I(f'') = f'(b) - f'(a) \]

which can be substituted into (23):

(24)#\[ I_n - T_n(f) \approx - \frac{1}{12} h^2 \sum_{i=0}^{n-1} (f'(b) - f'(a)) \]

Equation (24) can be used to define the improved trapezoidal method:

(25)#\[ T_n^C(f) = T_n(f) - \frac{1}{12} h^2 \sum_{i=0}^{n-1} (f'(b) - f'(a)) \]

Although we don’t have a way of estimating the error of (25) directly, we can use (24) as an over-estimation.

Equation (24) can also be used to approximate the number of sub-intervals required to approximate the integral using the (improved) trapezoidal rule within a given tolerance. If we have a desired tolerance for a method, we require that the error is smaller than this:

\[\begin{align*} |I_n(f) - T_n(f)| &< \text{tolerance}\\ \therefore \frac{1}{12}\frac{(b-a)^2}{n^2} |f'(b) - f'(a)| &< \text{tolerance}\\ \therefore n &> \frac{\sqrt{3}}{6} |b - a| \sqrt{\frac{|f'(b) - f'(a)|}{\text{tolerance}}} \end{align*}\]

References#