A Simple Derivation of Newton-Cotes Formulas with Realistic Errors
Abstract
In order to approximate the integral I(f)=∫ab f(x) dx, where f is a sufficiently smooth function, models for quadrature rules are developed using a given panel of n (n≥ 2) equally spaced points. These models arise from the undetermined coefficients method, using a Newton's basis for polynomials. Although part of the final product is algebraically equivalent to the well known closed Newton-Cotes rules, the algorithms obtained are not the classical ones. In the basic model the most simple quadrature rule Qn is adopted (the so-called left rectangle rule) and a correction En is constructed, so that the final rule Sn=Qn+ En is interpolatory. The correction En, depending on the divided differences of the data, might be considered a realistic correction for Qn, in the sense that En should be close to the magnitude of the true error of Qn, having also the correct sign. The analysis of the theoretical error of the rule Sn as well as some classical properties for divided differences suggest the inclusion of one or two new points in the given panel. When n is even it is included one point and two points otherwise. In both cases this approach enables the computation of a realistic error ESn for the extended or corrected rule Sn. The respective output (Qn, En, Sn, ESn) contains reliable information on the quality of the approximations Qn and Sn, provided certain conditions involving ratios for the derivatives of the function f are fulfilled. These simple rules are easily converted into composite ones. Numerical examples are presented showing that these quadrature rules are useful as a computational alternative to the classical Newton-Cotes formulas.