SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS

Similar documents
Czechoslovak Mathematical Journal, 55 (130) (2005), , Abbotsford. 1. Introduction

A product convergence theorem for Henstock Kurzweil integrals

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

AN INTEGRAL INEQUALITY FOR CONVEX FUNCTIONS AND APPLICATIONS IN NUMERICAL INTEGRATION

Math& 152 Section Integration by Parts

The Regulated and Riemann Integrals

Review of Calculus, cont d

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

Lecture 14: Quadrature

Numerical Analysis: Trapezoidal and Simpson s Rule

Necessary and Sufficient Conditions for Differentiating Under the Integral Sign

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), )

NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

The final exam will take place on Friday May 11th from 8am 11am in Evans room 60.

A unified generalization of perturbed mid-point and trapezoid inequalities and asymptotic expressions for its error term

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals

ON THE C-INTEGRAL BENEDETTO BONGIORNO

Fundamental Theorem of Calculus and Computations on Some Special Henstock-Kurzweil Integrals

QUADRATURE is an old-fashioned word that refers to

1 The Lagrange interpolation formula

ON PERTURBED TRAPEZOIDAL AND MIDPOINT RULES. f (t) dt

Numerical Integration

The Riemann Integral

Math 1B, lecture 4: Error bounds for numerical methods

AN INEQUALITY OF OSTROWSKI TYPE AND ITS APPLICATIONS FOR SIMPSON S RULE AND SPECIAL MEANS. I. Fedotov and S. S. Dragomir

NEW INEQUALITIES OF SIMPSON S TYPE FOR s CONVEX FUNCTIONS WITH APPLICATIONS. := f (4) (x) <. The following inequality. 2 b a

Journal of Inequalities in Pure and Applied Mathematics

Lecture 1: Introduction to integration theory and bounded variation

New Expansion and Infinite Series

Lecture 20: Numerical Integration III

SOME INEQUALITIES FOR THE DISPERSION OF A RANDOM VARIABLE WHOSE PDF IS DEFINED ON A FINITE INTERVAL

Lecture 19: Continuous Least Squares Approximation

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

Keywords : Generalized Ostrowski s inequality, generalized midpoint inequality, Taylor s formula.

different methods (left endpoint, right endpoint, midpoint, trapezoid, Simpson s).

S. S. Dragomir. 1. Introduction. In [1], Guessab and Schmeisser have proved among others, the following companion of Ostrowski s inequality:

Main topics for the First Midterm

Some estimates on the Hermite-Hadamard inequality through quasi-convex functions

APPROXIMATE INTEGRATION

S. S. Dragomir. 2, we have the inequality. b a

Fundamental Theorem of Calculus for Lebesgue Integration

arxiv: v1 [math.ca] 7 Mar 2012

Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

GENERALIZATIONS OF WEIGHTED TRAPEZOIDAL INEQUALITY FOR MONOTONIC MAPPINGS AND ITS APPLICATIONS. (b a)3 [f(a) + f(b)] f x (a,b)

Journal of Inequalities in Pure and Applied Mathematics

Lecture 1. Functional series. Pointwise and uniform convergence.

7.2 Riemann Integrable Functions

Math 554 Integration

NUMERICAL INTEGRATION

An optimal 3-point quadrature formula of closed type and error bounds

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Numerical Integration. 1 Introduction. 2 Midpoint Rule, Trapezoid Rule, Simpson Rule. AMSC/CMSC 460/466 T. von Petersdorff 1

Definite integral. Mathematics FRDIS MENDELU

LECTURE. INTEGRATION AND ANTIDERIVATIVE.

Journal of Inequalities in Pure and Applied Mathematics

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?

Chapter 0. What is the Lebesgue integral about?

Numerical Integration

c n φ n (x), 0 < x < L, (1) n=1

Definite integral. Mathematics FRDIS MENDELU. Simona Fišnarová (Mendel University) Definite integral MENDELU 1 / 30

Riemann Integrals and the Fundamental Theorem of Calculus

The Henstock-Kurzweil integral

Tangent Line and Tangent Plane Approximations of Definite Integral

Theoretical foundations of Gaussian quadrature

Review of basic calculus

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

Lecture 12: Numerical Quadrature

MAA 4212 Improper Integrals

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3

INTRODUCTION TO INTEGRATION

1. Gauss-Jacobi quadrature and Legendre polynomials. p(t)w(t)dt, p {p(x 0 ),...p(x n )} p(t)w(t)dt = w k p(x k ),

7.2 The Definite Integral

1.9 C 2 inner variations

Physics 116C Solution of inhomogeneous ordinary differential equations using Green s functions

Math 8 Winter 2015 Applications of Integration

Lecture 6: Singular Integrals, Open Quadrature rules, and Gauss Quadrature

New Integral Inequalities for n-time Differentiable Functions with Applications for pdfs

Math 61CM - Solutions to homework 9

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

MA 124 January 18, Derivatives are. Integrals are.

f(x)dx . Show that there 1, 0 < x 1 does not exist a differentiable function g : [ 1, 1] R such that g (x) = f(x) for all

A Generalized Inequality of Ostrowski Type for Twice Differentiable Bounded Mappings and Applications

ODE: Existence and Uniqueness of a Solution

63. Representation of functions as power series Consider a power series. ( 1) n x 2n for all 1 < x < 1

Chapter 5. Numerical Integration

Math 360: A primitive integral and elementary functions

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

The First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a).

4.4 Areas, Integrals and Antiderivatives

TRAPEZOIDAL TYPE INEQUALITIES FOR n TIME DIFFERENTIABLE FUNCTIONS

38 Riemann sums and existence of the definite integral.

A PROOF OF THE FUNDAMENTAL THEOREM OF CALCULUS USING HAUSDORFF MEASURES

arxiv: v1 [math.ca] 11 Jul 2011

Calculus I-II Review Sheet

5.7 Improper Integrals

1 i n x i x i 1. Note that kqk kp k. In addition, if P and Q are partition of [a, b], P Q is finer than both P and Q.

Transcription:

SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS ERIK TALVILA AND MATTHEW WIERSMA Abstrct. Simple proofs of the midpoint, trpezoidl nd Simpson s rules re proved for numericl integrtion on compct intervl. The integrnd is ssumed to be twice continuously differentible for the midpoint nd trpezoidl rules, nd to be four times continuously differentible for Simpson s rule. Errors re estimted in terms of the uniform norm of second or fourth derivtives of the integrnd. The proof uses only integrtion by prts, pplied to the second or fourth derivtive of the integrnd, multiplied by n pproprite polynomil or piecewise polynomil function. A corrected trpezoidl rule tht includes the first derivtive of the integrnd t the endpoints of the integrtion intervl is lso proved in this mnner, the coefficient in the error estimte being smller thn for the midpoint nd trpezoidl rules. The proofs re suitble for presenttion in clculus or elementry numericl nlysis clss. Severl student projects re suggested. 1. Introduction Virtully every clculus text contins section on numericl integrtion. Typiclly, the midpoint, trpezoidl nd Simpson s rules re given. Derivtion of these qudrture formuls re usully presented, often in grphicl mnner, but most texts shy wy from giving proofs of the error estimtes. For exmple, ccording to [9], the book Clculus, by Jmes Stewrt, currently outsells ll other clculus texts combined in North Americ. This stonishingly populr middle brow book gives error formuls for the midpoint, trpezoidl nd Simpson s rules but provides no proofs [35]. In this pper we give simple proofs of these three bsic qudrture rules nd lso modified trpezoidl rule tht includes first derivtive terms nd hs smller error estimte thn the usul midpoint nd trpezoidl rules (Theorem 3.). The proofs re bsed on integrtion by prts of f (x)p(x) dx or b f (4) (x)p(x) dx, where f(x) dx is the integrl the rule pplies to nd p is polynomil or piecewise polynomil. Some elementry optimistion is lso required. The proofs of these four rules re ll esy enough for stndrd clculus course. This pper will lso be useful for numericl nlysis clss. The proofs re selfcontined except for n elementry lemm on polynomils (Lemm 3.1). We feel they re much simpler thn methods usully employed in such courses. These often involve developing the theory of polynomil interpoltion or specil versions of the men vlue theorem. Our proofs re constructive. For the midpoint nd trpezoidl rules they begin Dte: Preprint December 1, 11. To pper in Atlntic electronic journl of mthemtics. 1991 Mthemtics Subject Clssifiction. Primry 6D15, 65D3. Secondry 6A4, 41A55, 65D3. The first uthor ws supported by Discovery Grnt, the second uthor ws supported by n Undergrdute Student Reserch Awrd; both from the Nturl Sciences nd Engineering Reserch Council of Cnd. This pper ws written while the first uthor ws on leve nd visiting the Deprtment of Mthemticl nd Sttisticl Sciences, University of Albert, nd while the second uthor ws student t University of the Frser Vlley. 1

ERIK TALVILA AND MATTHEW WIERSMA with f (x)p(x) dx, where p is generic, monic qudrtic or piecewise qudrtic function. For Simpson s rule we begin with f (4) (x)p(x) dx, where p is monic, piecewise qurtic function. After integrtion by prts it is cler wht p hs to be. For exmple, upon integrting by prts, one esily sees tht the midpoint rule rises when p(x) = (x ) for x c nd p(x) = (x b) for c x b. See Section 4. This mkes it esy to produce new qudrture formuls. Our corrected trpezoidl rule, Theorem 3., is constructed so tht the error is proportionl to (b ) 3 f nd the constnt of proportionlity is the smllest possible. The method we use ppers in [18] nd [7]. Both these sources give references to erlier prctitioners of this method, such s Peno nd von Mises. In Section 6, we list number of exercises, problems nd projects. Some re t the clculus level but most re t the level of n undergrdute numericl nlysis clss. We will consider numericl pproximtion of f(x) dx, under the ssumption tht f nd its derivtives cn be computed. For the midpoint nd trpezoidl rules we ssume f C ([, b]) (f nd its derivtives to order re continuous on intervl [, b]). For Simpson s rule we ssume f C 4 ([, b]). Error estimtes will be obtined from integrls of the form f (m) (x)p(x) dx where p is polynomil or piecewise polynomil nd m is or 4. Thus, ll integrls tht pper cn be considered s Riemnn integrls. In Section 6, projects 7, 8 nd 14 discuss how ssumptions on f cn be wekened somewht nd then errors cn be given in terms of Lebesgue or Henstock Kurzweil integrls. The usul midpoint, trpezoidl nd Simpson s rules re s follows. Let n be nturl number. For i n define x i = + (b )i/n. The midpoint of intervl [x i 1, x i ] is y i = + (b )(i 1)/(n). The symbol f is the uniform norm of f nd denotes the supremum of f(x) for x [, b]. If f is continuous then this is the mximum of f(x). Midpoint Rule. Let f C ([, b]). Write (1.1) f(x) dx = (b )f(( + b)/) + E M (f). Then E M (f) (b ) 3 f /4. The composite midpoint rule is f(x) dx = b n f(y i ) + En M (f), with En M (f) (b )3 f. n 4n Trpezoidl Rule. Let f C ([, b]). Write (1.) f(x) dx = b [f() + f(b)] + E T (f). Then E T (f) (b ) 3 f /1. The composite trpezoidl rule is [ ] b f(x) dx = b n 1 f() + f(x i ) + f(b) + En T (f), with En T (f) (b )3 f. n 1n Simpson s Rule. Let f C 4 ([, b]). Write (1.3) f(x) dx = b 6 [f() + 4f(( + b)/) + f(b)] + E S (f).

SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS 3 Then E S (f) (b ) 5 f (4) /88. Let n be even. The composite Simpson s rule is (1.4) f(x) dx = b n/ 1 n/ f() + f(x i ) + 4 f(x i 1 ) + f(b) + En S (f), 3n with E S n (f) (b ) 5 f (4) /(18n 4 ). Mny uthors give the error for the trpezoidl rule s E T n (f) = (b ) 3 f (ξ)/(1n ), where ξ is some point in [, b]. There re similr forms for the other rules. We don t find these ny more useful thn the uniform norm estimtes. Unless we know something bout f beyond continuity of its derivtives, it is impossible to sy wht ξ is. Note tht the pproximtion in Simpson s rule cn be written f(x) dx. = b 3n [f() + 4f(x 1) + f(x ) + + f(x n ) + 4f(x n 1 ) + f(b)]. Proofs of these three rules re given in Sections 4, nd 5, respectively. The literture on these formuls is vst. Here is smple of some of the different methods of proof tht hve been published in clculus texts. There re proofs bsed on the men vlue theorem nd Rolle s theorem [5], nd polynomil interpoltion [1]. Severl uthors produce somewht mysticl uxiliry function nd employ the men vlue theorem or intermedite vlue theorem with integrtion by prts. For exmple, [], [7]. All of the methods listed bove pper in severl sources. There re mny elementry journl rticles tht tret numericl integrtion. For geometricl version of the midpoint rule, see Hmmer [16]. Cruz-Uribe nd Neugebuer [8] give bsic proof of the trpezoidl rule using integrtion by prts. Rozem [3] shows how to estimte the error for the trpezoidl rule, Simpson s rule nd vrious versions of these rule tht re corrected with derivtive terms. Hrt [17] lso considers corrected versions of the trpezoidl rule. Tlmn [36] proves Simpson s rule by using n extended version of the men vlue theorem for integrls. For other commentry on Simpson s rule, see [33] nd [4]. For numericl nlysis course, integrtion of polynomil interpoltion pproximtions is frequently used. See [6]. See [18] for proofs bsed on the difference clculus. For Tylor series, [4]. The elementry textbook [3] uses rther complicted method with Tylor series nd weighted men vlue theorem for integrls. For more sophisticted udiences, there re proofs bsed on the Euler Mclurin summtion formul nd the Peno kernel. See [9] nd []. Generl references for numericl integrtion re [9], [13], [1], [3], [34], [41] nd [43]. Severl other methods cn be found here.. Trpezoidl rule For ll of the qudrture formuls we derive, the error is estimted from the integrl b f (m) (x)p(x) dx, where p is suitble polynomil or piecewise polynomil function. We first consider the trpezoidl rule. The estimte is then f(x) dx =. (b )[f() + f(b)]/.

4 ERIK TALVILA AND MATTHEW WIERSMA Proof. Write p(x) = (x α) + β, where the constnts α nd β re to be determined. Assume f C ([, b]). Integrte by prts to get f (x)p(x) dx = f (b)p(b) f ()p() Since p = we cn solve for (.1) f (x)p (x) dx = f (b)p(b) f ()p() f(b)p (b) + f()p () + f(x) dx, f(x)p (x) dx. f(x) dx = 1 [ f()p () + f(b)p (b) + f ()p() f (b)p(b)] + E(f), where E(f) = 1 f (x)p(x) dx. To get the trpezoidl rule we require p() = p(b) = nd p () = p (b) = b. (Since we wnt the trpezoidl rule for ll such f, the four vribles f(), f(b), f () nd f (b) re linerly independent.) The solution of this overdetermined system is α = ( + b)/ nd β = (b ) /4. The required qudrtic is then p(x) = [x ( + b)/] (b ) /4. Now we cn estimte the error by (.) E(f) 1 f (x)p(x) dx f To evlute the lst integrl, let h = (b )/ nd note tht p(x) dx = h h x h dx = h p(x) dx. (h x ) dx = 4h 3 /3. We then get E(f) (b ) 3 f /1. Now let n nd use this estimte on ech intervl [x i 1, x i ] for 1 i n. Let y i be the midpoint of [x i 1, x i ]. We define the piecewise qudrtic function P : [, b] R by P (x) = (x y i ) (b ) /(4n ) if x [x i 1, x i ] for some 1 i n. Now we hve P continuous on [, b] with P (x i 1 ) = P (x i ) =, P (x i ) = (b )/n nd P (x i +) = (b )/n. For the composite rule, (.1) gives f(x) dx = = n xi (b ) n x i 1 f(x) dx. = (b ) n n [f(x i 1 ) + f(x i )] {f() + [f(x 1 ) + f(x ) + + f(x n 1 )] + f(b)}. Let x = (b )/n. The error is En T (f) = 1 n xi f (x)p (x) dx x i 1 f n n [ x/ ( x ) ] n = f x dx = f xi x i 1 3 ( ) x (x y i) dx ( ) 3 x = (b )3 f. 1n

SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS 5 We consider this to be completely elementry derivtion of the trpezoidl rule. The method is perfectly suitble for presenting in clculus clss or numericl nlysis clss. Notice tht p(x) = (x )(x b) so it is not necessry for f to be continuous, provided f (x)(x ) nd f (x)(x b) hve limits s x + nd x b, respectively. In this cse, f will not be bounded so different methods will be needed to estimte f (x)p(x) dx. See projects 8 nd 13 in Section 6. 3. Corrected trpezoidl rule Qudrture rules re often constructed so tht they re exct for polynomils of certin degree. For exmple, see [18, 5.1]. Here we do something different. We will minimise the coefficient in the error estimte. In (.), we hve f (x)p(x) dx f b p(x) dx. This is version of the Hölder inequlity nd it is stndrd result of functionl nlysis tht this is the best possible estimte over ll such f nd p. See, for exmple, [14, p. 184]. For more on this point, see project 9 in Section 6. This begs the question: Wht vlues of α nd β will minimise p(x) dx? One of the requirements tht we obtined the trpezoidl rule in the bove clcultion ws tht the coefficients of f () nd f (b) vnish in (.1). When we choose α nd β to minimise p(x) dx the resulting qudrture formul will hve derivtives of f. But who cres? If we re ssuming we cn estimte f then surely we cn include first derivtive terms. We first need lemm bout polynomils tht cn minimise p(x) dx. Lemm 3.1. Fix k 1. Let P k be the monic polynomils of degree k, with rel coefficients. Let I(p) = p(x) dx. If p P k minimises I then p hs k rel roots in [, b], counting multiplicities. Proof. If k = 1 evlution of x c dx shows the minimum occurs when c = ( + b)/. This cn lso be seen grphiclly. Now ssume k. If I is minimised by p P k nd p hs root tht is not rel then write p(x) = [(x c) + d ]q(x) where c, d R, d > nd q P k. Then p(x) dx = (x c) q(x) dx + d q(x) dx > (x c) q(x) dx, contrdicting the ssumption tht p minimises I. A minimising polynomil then hs k rel roots, counting multiplicities. Now suppose p P k minimises I nd p( c) = for some c >. Then p(x) = (x + c)q(x) for some q P k 1. And, p(x) dx = (x ) q(x) dx + c q(x) dx > (x ) q(x) dx, contrdicting the ssumption tht p minimises I. Hence, p cnnot hve ny roots tht re less thn. A similr rgument shows p cnnot hve roots greter thn b. Now we cn prove the corrected trpezoidl rule.

6 ERIK TALVILA AND MATTHEW WIERSMA Theorem 3. (Corrected trpezoidl rule). Let f C ([, b]). Write (3.1) f(x) dx = b [f() + f(b)] + 3(b ) 3 [f () f (b)] + E CT (f). Then E CT (f) (b ) 3 f /3. The composite corrected trpezoidl rule is [ ] b f(x) dx = b n 1 3(b ) f() + f(x i ) + f(b) + [f () f (b)] + E CT n 3n n (f), with E CT n (f) (b ) 3 f /(3n ). Proof. As in the proof of the trpezoidl rule in Section, we re led to p(x) dx for p polynomil in P. But this time, we choose p to minimise this integrl. Due to the lemm, we cn write p(x) = (x α) γ where α γ α + γ b. Then p hs zeros t α ± γ, which re in [, b]. Let q(α, γ) = (x α) γ dx = α α x γ dx. This must be minimised over the tringulr region Q = {(x, y) R x b, y min(x, b x)}. Differentiting the integrl with respect to α, we hve q(α, γ)/ α = ( α) γ (b α) γ = α b + bα <, when α < ( + b)/ =, when α = ( + b)/ >, when ( + b)/ < α b. Hence, for ech llowed γ the minimum of q in Q occurs t α = ( + b)/. Now let r(γ) = q(( + b)/, γ) = h x γ dx, where h = (b )/. Differentiting under the integrl sign, we hve h ( γ h ) r (γ) = 4γ sgn(x γ ) dx = 4γ dx + dx γ = 8γ(γ h/) <, when < γ < h/ =, when γ = or h/ >, when h/ < γ h. Hence, the minimum of r occurs t γ = h/ = (b )/4. Now evlute q(( + b)/, h/) = h ( 1/ x h /4 dx = h 3 (1/4 x ) dx + = h 3 / = (b ) 3 /16. 1 1/ (x 1/4) dx The minimising polynomil is then p(x) = (x ( + b)/) (b ) /16. Using (.1) we hve (3.) f(x) dx = b [f() + f(b)] + where E CT (f) (b ) 3 f /3. 3(b ) 3 [f () f (b)] + E CT (f), )

SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS 7 For the composite corrected trpezoidl rule, pply the bove rule on ech intervl [x i 1, x i ] for 1 i n. This gives (3.3) f(x) dx. = = (b ) n n [f(x i 1 ) + f(x i )] + 3(b ) 3n n [f (x i 1 ) f (x i )] (b ) {f() + [f(x 1 ) + f(x ) + + f(x n 1 )] + f(b)} n 3(b ) + [f () f (b)]. 3n Let α i = (x i 1 + x i )/ = y i nd γ i = (x i x i 1 )/4 = (b )/(4n). The error estimte is E CT (f) f n xi x i 1 (x α i ) γ i dx (b )3 f 3n. In one-vrible clculus clss, the minimistion problem cn be done s bove but without using prtil derivtive nottion. Differentiting under the integrl sign with respect to α nd γ is justified with the Lebesgue dominted convergence theorem since the derivtive of the integrnd exists except t one point. To void higher integrtion theory, it is esy enough to evlute (x α) γ dx before differentiting with respect to α nd γ. But, s pointed out in project 8 of Section 6, the method used in the proof is useful for minimising with respect to the p-norm of f. Notice tht in the composite rule the sum of derivtive terms telescopes. This mens tht in (3.3) only f () nd f (b) pper. The composite trpezoidl, midpoint nd corrected trpezoidl rule ll hve n error term proportionl to (b ) 3 f /n. The constnt of proportionlity is 1/1, 1/4 nd 1/3, respectively. So with the composite corrected trpezoidl rule we hve smller error estimte but re only required to dd the dditionl two terms 3(b ) [f () f (b)]/(3n ) to the composite trpezoidl rule. If n is resonbly lrge this is negligible mount of dditionl work. If f cn be computed t nd b this becomes n ttrctive qudrture rule. The corrected trpezoidl rule given in Theorem 3. is not the usul one tht hs trditionlly ppered in the literture. For exmple, in Conte nd De Boor [6], Dvis nd Rbinowitz [9], Drgomir, et l [1], Pečri`c nd Ujevi`c [8], nd Squire [34], the coefficient is 1/1 in plce of our 3/3 in (3.1). The error estimte (b ) 5 f (4) /7 is obtined by polynomil interpoltion by Conte nd De Boor in [6] nd with two-point Tylor expnsion by Dvis nd Rbinowitz in [9]. Drgomir, et l [1], use Grüss s inequlity. In their Lemm, the error is given with f replced by sup [,b] f inf [,b] f. Pečri`c nd Ujevi`c [8] give the error estimte s 3 (b ) 3 f /54 in their eqution (3.3). This lso ppers in Dedi`c, et l [1]. Cerone nd Drgomir [4] hve coefficient 1/8 in their eqution (3.64) in plce of our 3/3 in (3.1). Their error estimte is (b ) 3 f /4, obtined with integrtion by prts. Squire [34] gives number of rules tht use derivtives but does not provide ny error estimtes. It is shown in [39] tht the coefficient 1/3 in Theorem 3. is the best possible.

8 ERIK TALVILA AND MATTHEW WIERSMA 4. Midpoint rule Notice tht with the composite trpezoidl rule, vlues of f were brought forth t discontinuities in the derivtive of p. For the midpoint rule we will define p so tht there is discontinuity in p t the midpoint c = ( + b)/. Assume p is piecewise monic qudrtic so tht it is continuous on [, b] with p continuous on [, c) nd on (c, b]. Proof. Integrting by prts twice, f (x)p(x) dx = c f (x)p(x) dx + c f (x)p(x) dx = f ()p() + f()p () + f (b)p(b) f(b)p (b) f(c)[p (c ) p (c+)] + f(x) dx. For the midpoint rule we require p() = p () = p(b) = p (b) = nd p (c ) p (c+) = (b ). This gives { (x ) p(x) =, x c (x b), c x b. The error stisfies E M (f) f ( c (x ) dx + c ) (x b) dx = f (b ) 3. 4 The composite rule follows s with the composite trpezoidl rule. Note tht p nd p vnish t nd b. Define P (x) = (x x i 1 ) for x i 1 x y i nd P (x) = (x x i ) for y i < x < x i for 1 i n. Then P nd P hve discontinuities only t the midpoints y i. Integrting by prts f (x)p (x) dx then gives the composite rule. Notice tht p(x) = (x ) for x c nd p(x) = (x b) for c x b. Hence, it is not necessry for f or f to be continuous, provided f (x)(x ) nd f(x)(x ) hve limits s x +. Similrly, s x b. In this cse, f will not be bounded so different methods will be needed to estimte f (x)p(x) dx. See projects 8 nd 13 in Section 6. Vrious versions of the midpoint rule re given in [5]. 5. Simpson s rule In Simpson s rule there re function evlutions t endpoints, b nd t midpoint c. As we sw with the midpoint rule, when we integrte f (4) (x)p(x) dx, discontinuities in p nd its derivtives t c led to evlutions of f nd its derivtives t c. Assume tht p is monic qurtic polynomil on [, c) nd on (c, b]. As we will now see, the requirement tht p C ([, b]) determines the coefficients of f(), f(b) nd f(c) in Simpson s rule. A brief explntion of this phenomenon ppers in [3]. It is similr to the construction of the Green s function for ordinry differentil equtions.

SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS 9 Proof. Integrte by prts four times to get f (4) (x)p(x) dx = f ()p() + f (c) [p(c ) p(c+)] + f (b)p(b) + f ()p () (5.1) f (c) [p (c ) p (c+)] f (b)p (b) f ()p () + f (c) [p (c ) p (c+)] + f (b)p (b) + f()p () f(c) [p (c ) p (c+)] f(b)p (b) + 4 f(x) dx. For our qudrture rule to hve no evlutions of derivtives of f we need p() = p () = p () = p(b) = p (b) = p (b) =. This mens there re constnts d 1 nd d such tht { (x ) p(x) = 3 (x + d 1 ), x c (x b) 3 (x + d ), c x b. Continuity of p t c requires p(c ) = p(c+). From this it follows tht d 1 + d = ( + b). The derivtive of p is { (x ) p (x) = (4x + 3d 1 ), x < c (x b) (4x + 3d b), c < x b. Continuity of p t c requires p (c ) = p (c+). From this it follows tht 3(d d 1 ) = b. Solving these two liner equtions gives d 1 = ( + b)/3 nd d = ( + b)/3. We now hve { 4(x )(3x b), x < c p (x) = 4(x b)(3x b), c < x b. This shows tht p (c ) = p (c+) = (b ). So p C ([, b]). Now, { 4(6x 5 b), x < c p (x) = 4(6x 5b), c < x b. And, p () = 4(b ), p (b) = 4(b ), p (c ) p (c+) = 16(b ). From (5.1) we get the required pproximtion in (1.3). The polynomil we re using is { (x ) p(x) = 3 (x /3 b/3), x c (x b) 3 (x /3 b/3), c x b. The error is then E S (f) = 1 4 f (4) (x)p(x) dx f (4) 4 p(x) dx. Note tht /3+b/3 (+b)/ = (b )/6 > nd /3+b/3 (+b)/ = ( b)/6 <. Therefore, p(x) dx = c (x )3 (/3 + b/3 x) dx + (b c x)3 (x /3 b/3) dx. The trnsformtion x + b x shows these lst two integrls re equl. Hence, p(x) dx = = c c (x ) 3 (/3 + b/3 x) dx (x ) 4 dx + = (b ) 5 /1. 4(b ) 3 c (x ) 3 dx

1 ERIK TALVILA AND MATTHEW WIERSMA This gives Simpson s rule. For the composite rule it is trditionl to tke n even, divide [, b] into n/ equl subintervls nd pply Simpson s rule on ech intervl [x i, x i ] for 1 i n/. The pproximtion is then f(x) dx = = n/ xi (b ) 3n f(x) dx =. x i f() + (b ) 3n n/ 1 The error is computed s with the trpezoidl rule. n/ [f(x i ) + 4f(x i 1 ) + f(x i )] n/ f(x i ) + 4 f(x i 1 ) + f(b). Notice tht p(x) = O((x ) 3 ) s x +. Hence, it is not necessry for f, f or f to be continuous, provided f (x)(x ) 3, f (x)(x ) nd f (x)(x ) hve limits s x +. Similrly, s x b. In this cse, f (4) will not be bounded so different methods will be needed to estimte f (4) (x)p(x) dx. See projects 8 nd 13 in Section 6. Liu uses integrtion by prts to prove version of Simpson s rule for which f C n ([, b]) [6]. 6. Clssroom projects The methods we hve used to produce the midpoint rule, the trpezoidl rule, the corrected trpezoidl rule nd Simpson s rule re: integrtion by prts, bsic optimistion, nd simple fct bout integrls of polynomils (Lemm 3.1). We hve not needed ny of the mchinery mentioned in the Introduction tht is often used in other proofs. This mens our methods re well suited for use by students. We list below number of topics tht cn be investigted in the clssroom. Some re t the level of clculus course, others would mke good ssignments or projects in beginning numericl nlysis course. A few would be suitble for senior undergrdute reserch project or perhps n M.Sc. project. 1. First order error estimtes. In ll of the bove rules it is ssumed tht f exists. Wht if f C 1 ([, b]) but f / C ([, b])? For exmple, f(x) = x α on [, 1] if 1 < α <. Then we could still derive qudrture formuls by using one integrtion by prts on f (x)p(x) dx. We cn get the trpezoidl rule if p is liner function. The error estimte is then (b ) f /4. See [] for geometric proof or [8] for n integrtion by prts proof. (The constnt of proportionlity is misprinted s 1/ in [8].) Tking p to be piecewise liner produces the midpoint rule with the sme error. The pper [7] gives severl different types of error estimtes bsed on f for the trpezoidl nd Simpson rules.. Midpoint modifictions. In the midpoint rule, wht hppens if we llow evlution of f or f t the endpoints nd midpoint of [, b]? How does the composite rule then compre with the trpezoidl rule nd corrected trpezoidl rules? 3. Periodic functions. If f is periodic nd we integrte over one period, how do the qudrture formuls simplify? Note tht for periodic function, ppliction of the trpezoidl rule ctully gives the corrected trpezoidl rule. A much deeper discussion cn be

SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS 11 found in [9]. 4. Higher order error estimtes. If f C n ([, b]) nd p is monic polynomil of degree k n then integrte by prts on f (n) (x)p(x) dx to get other qudrture formuls. If p is piecewise polynomil then f nd its derivtives cn be mde to be evluted t discontinuities in the derivtives of p. It is possible to mke systemtic study of qudrture formuls obtined in this mnner. In the corrected trpezoidl rule, the qudrtic polynomil tht minimised f (x)p(x) dx cused the f terms to telescope wy (3.3). This phenomenon cn lso be investigted for higher degree polynomils. 5. Liner combintions. It is well known tht Simpson s rule cn be obtined s liner combintion of trpezoidl rules or of midpoint nd trpezoidl rules. Look for other such reltionships mongst the vrious rules discussed bove. In Romberg integrtion, one tkes liner combintion of trpezoidl rules with n nd n. This yields qudrture formul with improved error estimte. This hierrchy is then repeted. See [9]. Does the integrl form of the trpezoidl rule error show how to do this? Cn this be done with the corrected trpezoidl rule? 6. Finite differences. If f ws specil function defined by definite integrl or series depending on prmeter then it my not be fesible to compute f. Similrly if f ws given by experimentl dt. In such cses, we could pproximte derivtives by finite differences, f (x). = [f(x) f(x + h)]/h if h is smll. Do this for the composite corrected trpezoidl rule nd compute the resulting error. 7. Relxing conditions on f. In the estimte f (x)p(x) dx f b p(x) dx it is not necessry tht f be continuous. If we use the Lebesgue integrl, the conditions on f cn be wekened to f being bsolutely continuous such tht f is essentilly bounded. This is the sme s f being Lipschitz continuous. Similr remrks pply for Simpson s rule nd in 1 bove. Under the ssumption tht f is Lipschitz continuous, wht do the error estimtes for the trpezoidl, corrected trpezoidl nd midpoint rules become? Wht Lipschitz condition could be used for Simpson s rule? 8. Using other Lebesgue norms to estimte the error. If f L r ([, b]) then the Hölder inequlity gives f (x)p(x) dx f r p s, with 1/r + 1/s = 1. The cse r =, s = 1 hs lredy been used. The cses 1 r < could be investigted. The cse r = s = serves s good wrm up since the integrl p(x) dx cn be evluted explicitly. The minimising method from the proof of Theorem 3. cn be used. Similrly with Simpson s rule nd 1. bove. See [39] for p-norm estimtes for modified trpezoidl rules. 9. Equlity in the corrected trpezoidl error. At the beginning of Section 3 we mentioned tht f (x)p(x) dx f p 1. Show tht for ech qudrtic p there is function f C 1 ([, b]) such tht f is piecewise constnt nd f (x)p(x) dx = f p 1. Show tht for ech ɛ > there is function g C ([, b]) such tht

1 ERIK TALVILA AND MATTHEW WIERSMA g (x)p(x) dx g p 1 ɛ. 1. Geometric proofs. Sketch the piecewise polynomil functions used in derivtion of ll the bove rules. Cn you find geometric proof of the choice of minimising polynomil in the corrected trpezoidl rule? Wht bout for minimising polynomils of p s? For exmple, Derek Lcoursiere hs observed tht if p is the monic qudrtic tht minimises p then p() = p(c) = p(b). 11. Non-uniform prtitions. The composite rules re much simpler when the prtition is uniform. But by tking non-uniform prtitions we cn get smller error estimtes. This will hppen if smller subintervls re tken where f is lrge nd lrger subintervls re llowed where f is smll. This could be done in systemtic wy if, sy, f ws positive nd decresing. This opens up the cretion of dptive lgorithms. See [41, p. 16] for met lgorithm on dptive integrtion. A bsic exmple of such n lgorithm is given in [3]. Rice [31] hs estimted there re from re from 1 to 1 million lgorithms tht re potentilly interesting nd significntly different from one nother. Get crcking! 1. Error estimtes on ech subintervl. By tking properties of f into ccount it is possible to get better error estimtes. Denote the chrcteristic function of intervl [s, t] by χ [s,t] (x) nd this is 1 if x [s, t] nd, otherwise. The estimte f χ [xi 1,x i ] f ws used in the proof of the trpezoidl rule. (Cn you see where?) It is the best we cn do for generic f such tht f is bounded, since then the supremum of f cn occur on ny subintervl. It my be fine if f (x) = sin(1/x) on [, 1] but is poor estimte for f(x) = x. If f ws positive nd incresing then f χ [xi 1,x i ] = f (x i ) < f. This estimte cn then be used on ech subintervl. Similrly if f is decresing. 13. Unbounded integrnds. It is not necessry for f or f to be integrble. If not, we my be ble to integrte ginst polynomil with zero of sufficient multiplicity. For exmple, suppose f C ((, 1]) such tht 1 f(x) dx exists nd s x + we hve f(x) = o(1/x) nd f (x) = o(1/x ). An exmple of such function on [, 1/] is f(x) = log x α for ech rel α. Let p(x) = x. Then 1 f (x)p(x) dx = f (1) f(1) + 1 f(x) dx. (This is Tylor s theorem.) Show this leds to qudrture formul with error multiple of 1 f (x)x dx. If lso f (x) = O(1/x ) s x + then this integrl is bounded by sup x [,1] f (x)x. There re similr results when f(x) c 1 /x for some constnt c 1 nd f (x) c /x for some constnt c. It is esy to modify this for higher order singulrities. 14. The Henstock Kurzweil integrl. The error estimtes ll depend on existence of f (x)p(x) dx. There re functions tht re differentible t ech point for which the derivtive is not integrble in the Riemnn or Lebesgue sense. An exmple is given by tking g : [, 1] R s g(x) = x sin(x 3 ) for x > nd g() =. Then g exists t ech point of [, 1] but is not continuous t. Since the derivtive is not bounded, 1 g (x) dx does not exist s Riemnn integrl. Since 1 g (x) dx =, we hve g / L 1 ([, 1]). In this cse, 1 g (x) dx exists s n improper Riemnn integrl. However, construction

SIMPLE DERIVATION OF BASIC QUADRATURE FORMULAS 13 in [19] shows how to use Cntor set to piece together such functions so tht improper Riemnn integrls do not exist but the Henstock Kurzweil integrl exists. The Henstock Kurzweil integrl is defined in terms of Riemnn sums tht re chosen somewht more crefully thn in Riemnn integrtion. It hs the property tht if g exists then g (x) dx = g(b) g(). In fct, if g is continuous, this fundmentl theorem of clculus formul will still hold when g fils to exist on countble sets nd certin sets of mesure zero. See [15]. Conditionlly convergent integrls such s x sin(e x ) dx lso exist in this sense. With the Henstock Kurzweil integrl there is the estimte f(x)g(x) dx f g BV. The Alexiewicz norm of f is f = sup [c,d] [,b] d f(x) dx. c The function g must be of bounded vrition nd g BV = g + V g, where V g is the vrition of g. See [4]. The conditions on f cn then be relxed to f integrble in the Henstock Kurzweil sense nd we cn estimte f (x)p(x) dx using the Alexiewicz norm f. See [11]. In fct, f need not even be function. The sme estimtes hold when f is merely continuous nd then f exists in the distributionl sense. See [37]. Similrly if f hs jump discontinuities of finite mgnitude. See [38]. References [1] T.M. Apostol, Clculus, vol. II, Wlthm, MA, Xerox, 1969. [] R.C. Buck, Advnced clculus, New York, McGrw-Hill, 1978. [3] R.L. Burden nd J.D. Fires, Numericl nlysis, Brooks-Cole, 11. [4] P. Cerone nd S.S. Drgomir, Trpezoidl-type rules from n inequlities point of view, in: G. Anstssiou (Ed.), Hndbook of nlytic-computtionl methods in pplied mthemtics, New York, CRC Press,, pp. 65 134. [5] P. Cerone nd S.S. Drgomir, Midpoint-type rules from n inequlities point of view, in: G. Anstssiou (Ed.), Hndbook of nlytic-computtionl methods in pplied mthemtics, New York, CRC Press,, pp. 135. [6] S.D. Conte nd C. de Boor, Elementry numericl nlysis, New York, McGrw-Hill, 198. [7] D. Cruz-Uribe nd C.J. Neugebuer, Shrp error bounds for the trpezoidl rule nd Simpson s rule, JIPAM. J. Inequl. Pure Appl. Mth. 3(), Article 49, pp. [8] D. Cruz-Uribe nd C.J. Neugebuer, An elementry proof of error estimtes for the trpezoidl rule, Mth. Mg. 76(3), 33 36. [9] P.J. Dvis nd P. Rbinowitz, Methods of numericl integrtion, New York, Dover, 7. [1] Lj. Dedi`c, M. Mti`c nd J. Pečri`c, On Euler trpezoid formule, Appl. Mth. Comput. 13(1), 37 6. [11] X. Ding, G. Ye nd W.-C. Yng, Estimtes of the integrl reminders in severl numericl integrl formuls using the Henstock Kurzweil integrl, J. Mth. Inequl. 3(9), 43 56. [1] S.S. Drgomir, P. Cerone, A. Sofo, Some remrks on the trpezoid rule in numericl integrtion, Indin J. Pure Appl. Mth. 31(), 475 494. [13] H. Engels, Numericl qudrture nd cubture, London, Acdemic Press, 198. [14] G.B. Follnd, Rel nlysis, New York, Wiley, 1999. [15] R.A. Gordon, The integrls of Lebesgue, Denjoy, Perron, nd Henstock, Providence, Americn Mthemticl Society, 1994. [16] P.C. Hmmer, The midpoint method of numericl integrtion, Mth. Mg. 31(1958), 193 195. [17] J.J. Hrt, A correction for the trpezoidl rule, Amer. Mth. Monthly 59(195), 33 37. Also, Correction: A Correction for the Trpezoidl Rule, Amer. Mth. Monthly 59(195), 46. [18] F.B. Hildebrnd, Introduction to numericl nlysis, New York, McGrw-Hill, 1974. [19] R.L. Jeffery, The theory of functions of rel vrible, Toronto, University of Toronto Press, 1951. [] W. Kpln nd D.J. Lewis, Clculus nd liner lgebr, New York, Wiley, 1971.

14 ERIK TALVILA AND MATTHEW WIERSMA [1] A.R. Krommer nd C.W. Ueberhuber, Computtionl integrtion, Phildelphi, Society for Industril nd Applied Mthemtics, 1998. [] V.I. Krylov, Approximte clcultion of integrls (trns. A.H. Stroud), New York, Mcmilln, 196. [3] P.K. Kythe nd M.R. Schäferkotter, Hndbook of computtionl methods of integrtion, Boc Rton, Chpmn nd Hll/CRC, 5. [4] P.-Y. Lee, Lnzhou lectures on Henstock integrtion, Singpore, World Scientific, 1989. [5] A.H. Lightstone, Concepts of clculus, New York, Hrper nd Row, 1965. [6] Z. Liu, An inequlity of Simpson type, Proc. R. Soc. Lond. Ser. A Mth. Phys. Eng. Sci. 461(5), 155 158. [7] J.M.H. Olmsted, Advnced clculus, New York, Appleton-Century-Crofts, 1961. [8] J. Pečri`c nd N. Ujevi`c, A representtion of the Peno kernel for some qudrture rules nd pplictions, Proc. R. Soc. Lond. Ser. A Mth. Phys. Eng. Sci. 46(6), 817 83. [9] I. Peterson, Jmes Stewrt nd the house tht Clculus built, MAA Focus 9(9), no. 4, 4 6. [3] B. Rennie, The error term in Simpson s rule, Mth. Gz. 53(1969), 159. [31] J.R. Rice, A metlgorithm for dptive qudrture, J. Assoc. Comput. Mch. (1975), 61 8. [3] E. Rozem, Estimting the error in the trpezoidl rule, Amer. Mth. Monthly 87(198), 14 18. [33] R.E.W. Shipp, A simple derivtion of the error in Simpson s rule, Mth. Gz. 54(197), 9 93. [34] W. Squire, Integrtion for engineers nd scientists, New York, Americn Elsevier, 197. [35] J. Stewrt, Single vrible clculus: erly trnscendentls, Belmont, CA, Thomson Higher Eduction, 8. [36] L.A. Tlmn, Simpson s rule is exct for quintics, Amer. Mth. Monthly 113(6), 144 155. [37] E. Tlvil, The distributionl Denjoy integrl, Rel Anl. Exchnge 33(8), 51 8. [38] E. Tlvil, The regulted primitive integrl, Illinois J. Mth. 53(9), 1187 119. [39] E. Tlvil nd M. Wiersm, Optiml error estimtes for corrected trpezoidl rules (preprint). [4] W.J. Thompson, Computing for scientists nd engineers, New York, Wiley, 199. [41] C.W. Ueberhuber, Numericl computtion, vol. II, Berlin, Springer Verlg, 1997. [4] D.J. Vellemn, The generlized Simpson s rule, Amer. Mth. Monthly 11(5), 34 35. [43] D. Zwillinger, Hndbook of integrtion, Boston, Jones nd Brtlett, 199. Deprtment of Mthemtics & Sttistics, University of the Frser Vlley, Abbotsford, BC Cnd VS 7M8 E-mil ddress: Erik.Tlvil@ufv.c Deprtment of Pure Mthemtics, University of Wterloo, Wterloo, ON Cnd NL 3G1 E-mil ddress: mwiersm@uwterloo.c