next up previous contents
Next: Digit-shift test Up: Theory of regular-interval integration Previous: Rules for extended intervals

Error of the extended rules

 

Using (8), we have for the midpoint rule that

eqnarray223

As tex2html_wrap_inline901 , the term in brackets approaches a constant (namely, tex2html_wrap_inline903 ). Thus, the leading order error in the midpoint rule is second order in h. Moreover, the term in brackets is, in fact, the midpoint rule for computing tex2html_wrap_inline907 ! Thus, we may complete the analysis and compute precisely the numerical prefactor on tex2html_wrap_inline799 ,

  eqnarray236

The trapezoid rule therefore errs in the second order with a prefactor proportional to f'(a)-f'(b)! If, by coincidence or design, f'(a)=f'(b), the midpoint rule becomes correct to fourth order!

Working in the same way from (11), we have for the trapezoid rule,

  eqnarray244

where we have twice used the result (15). The trapezoid rule thus also becomes fourth-order if f'(a)=f'(b), and sixth-order if also f'''(a)=f'''(b).

Because the error series for both tex2html_wrap_inline919 and tex2html_wrap_inline921 involve only even terms with numerical prefactors times the respective derivatives of f(x), we see that the full expansion for the error of the trapezoid rule has the form

displaymath925

for some set of numerical coefficients tex2html_wrap_inline927 gif. Thus, if we could arrange for all of the derivatives of tex2html_wrap_inline937 to be equal at the endpoints a and b, then the trapezoid rule will converge faster than h to any power -- exponentially! This is not so artificial as first appears: a very common case is the numerical integration of periodic functions.



Tomas Arias
Sun Mar 5 13:48:24 EST 2000