A Simple Derivation of Newton-Cotes Formulas with Realistic Errors

A Simple Derivation of Newton-Cotes Formulas with Realistic Errors

A SIMPLE DERIVATION OF NEWTON-COTES FORMULAS WITH REALISTIC ERRORS M´ario M. Gra¸ca Department of Mathematics, Instituto Superior T´ecnico, Technical University of Lisbon Av. Rovisco Pais, 1049-001, Lisboa, Portugal [email protected] February 2, 2012 Abstract b In order to approximate the integral I(f) = Ra 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 E˜n is constructed, so that the final rule Sn = Qn + E˜n is interpolatory. The correction E˜n, depend- ing on the divided differences of the data, might be considered a realistic correction for Qn, in the sense that E˜n should be close to the magnitude arXiv:1202.0237v1 [math.NA] 1 Feb 2012 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 oth- erwise. In both cases this approach enables the computation of a realistic error E¯Sn for the extended or corrected rule Sn. The respective output (Qn, E˜n,Sn, E¯Sn ) contains reliable information on the quality of the ap- proximations 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. 1 Keywords: Divided differences; undetermined coefficients method; realistic error; Newton-Cotes rules. AMS Subject Classification: 65D30, 65D32, 65-05, 41A55. 1 Introduction The first two quadrature rules taught in any numerical analysis course belong to a group known as closed Newton-Cotes rules. They are used to approximate b the integral I(f) = a f(x)dx of a sufficiently smooth function f in the finite interval [a,b]. The basic rules are known as trapezoidal rule and the Simpson’s R rule. The trapezoidal rule is Q(f)= h/2 (f(a)+ f(b)), for which h = b a, and has the theoretical error − h3 I(f) Q(f)= f (2)(ξ), (1) − − 12 while the Simpson’s rule is Q(f) = h/3 (f(a)+4 f((a + b)/2) + f(b)), with h = (b a)/2, and its error is − h5 I(f) Q(f)= f (4)(ξ). (2) − − 90 The error formulas (1) and (2) are of existential type. In fact, assuming that f (2) and f (4) are (respectively) continuous, the expressions (1) and (2) say that there exist a point ξ, somewhere in the interval (a,b), for which the respective error has the displayed form. From a computational point of view the utility of these error expressions is rather limited since in general is quite difficult or even impossible to obtain expressions for the derivatives f (2) or f (4), and consequently bounds for I(f) Q(f) ∞. Even in the case one obtains such bounds they generally overestimate| − the| true error of Q(f). Under mild assumption on the smoothness of the integrand function f, our aim is to determine certain quadrature rules, say R(f), as well as approximations for its error E˜(f), using only the information contained in the table of values or panel arising from the discretization of the problem. The algorithm to be constructed will produce the numerical value R(f), the correction or estimated error E˜(f) as well as the value of the interpolatory rule S(f)= R(f)+ E˜(f). (3) The true error of S(f) should be much less than the estimated error of R(f), that is, I(f) S(f) << E˜(f) , (4) | − | | | for a sufficiently small step h. In such case we say that E˜(f) is a realistic correction for R(f). Unlike the usual approach where one builds a quadrature formula Q(f) (like the trapezoidal or Simpson’s rule) which is supposed to be a reasonable approximation to the exact value of the integral, here we do 2 not care wether the approximation R(f) is eventually bad, provided that the correction E˜(f) has been well modeled. In this case the value S(f) will be a good approximation to the exact value of the integral I(f). Besides the values R(f), E˜(f) and S(f) we are also interested in computing a good estimation E¯S(f) for the true error of S(f), in the following sense. If the true error E(f)= I(f) S(f) −k− is expressed in the standard decimal form as E(f)= 0.d1d2 dm 10 , k 0, the approximation E¯(f) is said to be realistic if its± decimal··· form has× the same≥ sign as E(f) and its first digit in the mantissa differs at most one unit, that is, −k E¯(f)= 0.(d1 1) 10 (the dots represent any decimal digit). Finally, the algorithm± to± be used··· × will produce the values (R(f), E˜(f),S(f), E¯(f)). In section 1.1 we present two models for building simple quadrature rules named model A and model B. Although both models are derived from the same method, in this work we focus our attention mainly on the model A. Definitions, notations and background material are presented in section 2. In Proposition 2.1 we obtain the weights for the quadrature rule in model A by the undeter- mined coefficients method as well as the theoretical error expressions for the rules are deduced (see Proposition 2.4). The main results are discussed in Sec- tion 3, namely in Proposition 3.1 we show that a reliable computation of realistic errors depends on the behavior of a certain function involving ratios between high order derivatives of the integrand function f and its first derivative. Composite rules for model A are presented in Section 4 where some numerical examples illustrate how our approach allows to obtain realistic error’s estimates for these rules. 1.1 Two models In this work we consider to be given a panel of n (n 2) points (x1,f1), (x2,f2), ..., (x ,f ) , in the interval [a,b], having the nodes≥x equally{ spaced with step n n } i h > 0, fi = f(xi), where f a sufficiently smooth function in the interval. We consider the following two models: Model A Using only the first node of the panel we construct a quadrature rule Qn(f) adding a correction E˜n(f), so that the corrected or extended rule Sn(f) = Qn(f)+ E˜n(f) is interpolatory for the whole panel, Sn(f)= Qn(f)+ E˜n(f) = a f(x )+ a f[x , x ]+ + a f[x , x ,...,x ] , (5) 1 1 { 2 1 2 ··· n 1 2 n } where f[x , x ,...,x ] denotes the (n 1)-th divided difference and a , a , ..., 1 2 n − 1 2 an are weights to be determined. ˜ n Note that Qn(f) is simply the so-called left rectangle rule, thus En(f)= j=2 aj f[x1,...,xj ] can be seen as a correction to such a rule. P 3 Model B The rule Q (f) uses the first n 1 points of the panel (therefore is not inter- n − polatory in the whole panel), and it is added a correction term E˜n(f), so that the corrected or extended rule Sn(f) is interpolatory, Sn(f)= Qn(f)+ E˜n(f) = a1 f(x1)+ a2 f(x2)+ + an−1 f(xn−1) + an f[x1, x2,...,xn]. { ··· } (6) Since the interpolating polynomial of the panel is unique, the value computed for Sn(f) using either model is the same and equal to the value one finds if the simple closed Newton-Cotes rule for n equally spaced points has been applied to the data. This means that the extended rules (5) and (6) are both algebraically equivalent to the referred simple Newton-Cotes rules. However, the algorithms associated to each of the models (5) and (6) are not the classical ones for the referred rules. In particular, we can show that that for n odd, the rules Qn(f) in model B are open Newton-Cotes formulas [3]. Therefore, the extended rule Sn in model B can be seen as a bridge between open and closed Newton-Cotes rules. The method of undetermined coefficients applied to a Newton’s basis of poly- nomials is used in order to obtain Sn(f). The associated system of equations is diagonal, The same method can also be applied applied to get any hybrid model obtained from the models A and B. For instance, an hybrid extended rule using n = 3 points could be written as S (f)= a f(x )+ a f(x )+ a f(x ) + a f[x , x ]+ a f[x , x , x ]. 3 { 1 1 2 2 3 3 } 4 1 2 5 1 2 3 In this work our study is mainly focused in model A.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    22 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us