<<

Bulletin T.CXLV de l’Acad´emieserbe des sciences et des arts − 2013 Classe des Sciences math´ematiqueset naturelles Sciences math´ematiques, No 38

FAMILIES OF EULER-MACLAURIN FORMULAE FOR COMPOSITE GAUSS-LEGENDRE AND LOBATTO QUADRATURES

G. V. MILOVANOVIC´

(Presented at the 4th Meeting, held on May 31, 2013)

A b s t r a c t. Beside a short account on the Euler-Maclaurin for- mula, using a recent progress in -precision and symbolic computation and the corresponding Mathematica package Orthogonal- Polynomials [Facta Univ. Ser. Math. Inform. 19 (2004), 17 − 36; Math. Balkanica 26 (2012), 169−184], we obtain extensions of the Euler-Maclaurin formula for the composite (shifted) Gauss-Legendre formula, as well as for its Lobatto modification. Some special cases are also presented.

AMS Subject Classification (2000): 65D30, 65D32, 40C15

Key Words: Gauss-Legendre quadrature, Lobatto quadrature, Euler- Maclaurin formulae, Bernoulli , Bernoulli polynomials, orthogonal polynomials, quadrature sum, remainder term.

1. Introduction

The Euler-Maclaurin summation formula plays an important role in the broad area of , analytic theory, and the theory 64 G. V. Milovanovi´c of asymptotic expansions, as well as in many applications in other fields. In connection with the so-called problem (or in modern terminology, with determining ζ(2)), in 1732 Leonhard Euler discovered this formula, ∫ ∑n n 1 f(k) = f(x) dx + (f(0) + f(n)) 2 k=0 0 [ ] ∑r B + 2j f (2j−1)(n) − f (2j−1)(0) + E (f), (1.1) (2j)! r j=1

2r which holds for any n, r ∈ N and f ∈ C [0, n], where B2j are Bernoulli numbers (B0 = 1, B1 = −1/2, B2 = 1/6, B3 = 0, B4 = −1/30, ...). This formula was also found independently by Maclaurin. While in Euler’s case the formula (1.1) was applied for computing slowly converging infinite , in the second one Maclaurin used it to calculate . A history of this formula was given by Barnes [3], and some details can be found in [19], [1], [11], [12], [5]. Bernoulli numbers Bn, n = 0, 1,..., can be expressed as values at zero of the corresponding Bernoulli polynomials, which are defined by the gener- ating ∞ text ∑ B (x)tj = j . et − 1 j! j=0 Bernoulli polynomials play a similar role in numerical analysis and approx- imation theory like orthogonal polynomials. First few polynomials are

1 1 3x2 x B (x) = 1,B (x) = x − ,B (x) = x2 − x + ,B (x) = x3 − + , 0 1 2 2 6 3 2 2 1 5x4 5x3 x B (x) = x4 − 2x3 + x2 − ,B (x) = x5 − + − , etc. 4 30 5 2 3 6 Some interesting properties of these polynomials are ∫ 1 ′ − − n ∈ N Bn(x) = nBn−1(x),Bn(1 x) = ( 1) Bn(x), Bn(x) dx = 0 (n ). 0

The error term Er(f) in (1.1) can be expressed in the form (cf. [5])

∞ ∫ +∑ n ei2πkt + e−i2πkt E (f) = (−1)r f (2r)(x) dx, r (2πk)2r k=1 0 Families of Euler-Maclaurin formulae 65 or in the form ∫ n − ⌊ ⌋ B2r(x x ) (2r) Er(f) = − f (x) dx, (1.2) 0 (2r)! where ⌊x⌋ denotes the largest integer that is not greater than x. Supposing f ∈ C2r+1[0, n], after an in (1.2) and recalling that the odd Bernoulli numbers are zero, we get (cf. [14, p. 455]) ∫ n − ⌊ ⌋ B2r+1(x x ) (2r+1) Er(f) = f (x) dx. (1.3) 0 (2r + 1)! If f ∈ C2r+2[0, n], using Darboux’s formula one can obtain (1.1), with ∫ ( − ) 1 1 n∑1 E (f) = [B − B (x)] f (2r+2)(k + x) dx (1.4) r (2r + 2)! 2r+2 2r+2 0 k=0

(cf. Whittaker & Watson [26, p. 128]). This expression for Er(f) can be also derived from (1.3), writting it in the form ∫ ( − ) 1 B (x) n∑1 E (f) = 2r+1 f (2r+1)(k + x) dx r (2r + 1)! 0 k=0 ∫ ( − ) 1 B′ (x) n∑1 = 2r+2 f (2r+1)(k + x) dx, (2r + 2)! 0 k=0 and then by an integration by parts, the last expression becomes [ ] ( − ) 1 ∫ ( − ) B (x) n∑1 1B (x) n∑1 2r+2 f (2r+1)(k + x) − 2r+2 f (2r+2)(k + x) dx. (2r + 2)! 0 (2r + 2)! k=0 0 k=0

Because of B2r+2(1) = B2r+2(0) = B2r+2, Er(f) can be represented in the form (1.4). r Since (−1) [B2r+2 − B2r+2(x)] ≥ 0 on [0, 1] and ∫ 1 [B2r+2 − B2r+2(x)] dt = B2r+2, 0 according to the Second for Integrals, there exists η ∈ (0, 1) such that ( − ) B n∑1 B E (f) = 2r+2 f (2r+2)(k+η) = n 2r+2 f (2r+2)(ξ), 0 < ξ < n. r (2r + 2)! (2r + 2)! k=0 (1.5) 66 G. V. Milovanovi´c

Remark 1.1. The Euler-Maclaurin summation formula is implemented in Mathematica as the function NSum with option Method -> Integrate.

Practicaly, the Euler-Maclaurin summation formula (1.1) is related with the so-called composite , ∑n n∑−1 ′′ 1 1 T f := f(k) = f(0) + f(k) + f(n). n 2 2 k=0 k=1 Namely, [ ] ∑r B T f − I f = 2j f (2j−1)(n) − f (2j−1)(0) + ET (f), (1.6) n n (2j)! r j=1 ∫ n T where Inf := 0 f(x) dx and the remainder term Er (f) is given by (1.5) if the function f belongs to C2r+2[0, n]. Similarly, for a quadrature sum with values of the function f at the 1 − points x = k + 2 , k = 0, 1, . . . , n 1, i.e., for the midpoint rule − ( ) n∑1 1 M f := f k + , n 2 k=0 there exists the so-called second Euler-Maclaurin summation formula − [ ] ∑r (21 2j − 1)B M f − I f = 2j f (2j−1)(n) − f (2j−1)(0) + EM (f), (1.7) n n (2j)! r j=1 for which (2−1−2r − 1)B EM (f) = n 2r+2 f (2r+2)(ξ), 0 < ξ < n, r (2r + 2)! when f ∈ C2r+2[0, n] (cf. [20, p. 157]). The both formulas, (1.6) and (1.7), can be unified as [ ] ∑r B (τ) Q f − I f = 2j f (2j−1)(n) − f (2j−1)(0) + EQ(f), n n (2j)! r j=1 where τ = 0 for Qn ≡ Tn and τ = 1/2 for Qn ≡ Mn. It is true, because of the fact that [24, p. 765] (see also [7]) ( ) 1 B (0) = B and B = (21−j − 1)B . j j j 2 j Families of Euler-Maclaurin formulae 67

1 If we take a combination of Tnf and Mnf as Qnf = Snf = 3 (Tnf + 2Mnf), which is, in fact, the well-known classical composite Simpson rule, [ ] − − ( ) 1 1 n∑1 n∑1 1 1 S f := f(0) + f(k) + 2 f k + + f(n) , n 3 2 2 2 k=1 k=0 we obtain

− [ ] ∑r (41 j − 1)B S f − I f = 2j f (2j−1)(n) − f (2j−1)(0) + ES(f). (1.8) n n 3(2j)! r j=2

Notice that the summation on the right hand-side in the previous equality starts with j = 2, because the term for j = 1 vanishes. For f ∈ C2r+2[0, n] it can be proved that there exists ξ ∈ (0, n), such that

(4−r − 1)B ES(f) = n 2r+2 f (2r+2)(ξ). r 3(2r + 2)!

Some periodic analogues of the Euler-Maclaurin formula with applica- tions to have been developed by Berndt and Schoenfeld [4]. In the last section of [4], they showed how the composite Newton-Cotes quadrature formulas (Simpson’s parabolic and Simpson’s three-eighths rules), as well as various other quadratures (e.g., Weddle’s composite rule), can be derived from special cases of their periodic Euler-Maclaurin formula, includ- ing explicit formulas for the remainder term. Also, in the papers [8], [23], [25], the authors considered some generalizations of the Euler-Maclaurin for- mula for some particular Newton-Cotes rules, as well as for 2- and 3- Gauss-Legendre and Lobatto formulas (see also [2], [9], [16], [17]). A recent progress in variable-precision arithmetic and symbolic compu- tation has enabled a development of symbolic/variable-precision software for orthogonal polynomials and quadratures of Gaussian type, as well as for their many generalizations. The corresponding software is available to- day (Gautschi’s package SOPQ in Matlab (cf. [21]) and our Mathematica package OrthogonalPolynomials [6], [22]). Using this advantage in this paper we give extensions of Euler-Maclaurin formulae by replacing Qn by the composite Gauss-Legendre shifted formula, as well as by its Lobatto modification. Several special cases were obtained by using our Mathematica package OrthogonalPolynomials. 68 G. V. Milovanovi´c

2. Euler-Maclaurin formula based on the composite Gauss-Legendre formula

G G Let wν = wν and τν = τν , ν = 1, . . . , m, be weights (Christoffel num- bers) and nodes of the Gauss-Legendre quadrature formula on [0, 1], ∫ 1 ∑m G G G f(x) dx = wν f(τν ) + Rm(f), (2.1) 0 ν=1 where the nodes τν are zeros of the shifted (monic) Legendre polynomial ( ) −1 2m π (x) = P (2x − 1). m m m

− G Degree of its algebraic precision is d = 2m 1, i.e., Rm(f) = 0 for all algebraic polynomials of degree ≤ 2m − 1. The quadrature sum in (2.1) we G denote by Qmf, i.e., ∑m G G G Qmf = wν f(τν ). ν=1 A characterization of the Gaussian quadrature (2.1) can be done via an eigenvalue problem for the symmetric tridiagonal Jacobi (cf. [18, p. 326]),  √  α β O  √ 0 1 √     β1 α1 β2   √   ..  Jm =  β2 α2 .  , (2.2)    . . √   .. .. β −  √ m 1 O βm−1 αm−1 constructed with the three-term recurrence coefficients, 1 1 α = 1/2, β = · , k ∈ N. k k 16 1 − (2k)−2

G G The nodes τν = τν are the eigenvalues of Jm and∫ the weights wν are given G 2 1 by wν = β0vν,1, ν = 1, . . . , m, where β0 = µ0 = 0 dx = 1 and vν,1 is the T first component of the normalized eigenvector vν = [vν,1 ··· vν,m] (with T vν vν = 1) corresponding to the eigenvalue τν,

Jmvν = τνvν, ν = 1, . . . , m. Families of Euler-Maclaurin formulae 69

Golub and Welsch [13] gave an efficient procedure for constructing the Gaussian quadrature rules by simplifying the well-known QR algorithm so that only the first components of the eigenvectors are computed. Such a procedure is implemented in several programming packages including the most known ORTHPOL given by Gautschi [10], as well as in the previous mentioned packages SOPQ (in Matlab) and OrthogonalPolynomials (in Mathematica). The∫ corresponding composite Gauss-Legendre sum for approximating n Inf := 0 f(x) dx can be expressed in the form

n∑−1 ∑m n∑−1 (n) G · G G Gm f = Qmf(k + ) = wν f(k + τν ). (2.3) k=0 ν=1 k=0 In the sequel we use the following expansion of a function f ∈ Cs[0, 1] in Bernoulli polynomias for any x ∈ [0, 1] (see Krylov [15, p. 15])

∫ − [ ] ∫ 1 s∑1 B (x) 1 1 f(x) = f(t) dt+ j f (j−1)(1) − f (j−1)(0) − f (s)(t)L (x, t) dt, j! s! s 0 j=1 0 (2.4) ∗ − − ∗ ∗ where Ls(x, t) = Bs (x t) Bs (x) and Bs (x) is a function of period one, defined by

∗ ≤ ∗ ∗ Bs (x) = Bs(x), 0 x < 1,Bs (x + 1) = Bs (x). (2.5) ∗ ∗ − Notice that B0 (x) = 1, B1 (x) is a discontinuous function with a jump of 1 ∗ at each integer, and Bs (x), s > 1, is a . ∫ Now, we can prove the following composite formula for the Inf = n 0 f(t) dt.

Theorem 2.1. For n, m, r ∈ N (m ≤ r) and f ∈ C2r[0, n] we have [ ] ∑r QG (B ) G(n)f − I f = m 2j f (2j−1)(n) − f (2j−1)(0) + EG (f), (2.6) m n (2j)! n,m,r j=m

(n) G where Gm f is given by (2.3), and QmB2j denotes the basic Gauss-Legendre quadrature sum applied to the Bernoulli polynomial x 7→ B2j(x), i.e.,

∑m G G G − G Qm(B2j) = wν B2j(τν ) = Rm(B2j), (2.7) ν=1 70 G. V. Milovanovi´c

G where Rm(f) is the remainder term in (2.1). If f ∈ C2r+2[0, n] then there exists ξ ∈ (0, n), such that the error term in (2.6) can be expressed in the form

QG (B ) EG (f) = n m 2r+2 f (2r+2)(ξ). (2.8) n,m,r (2r + 2)!

P r o o f. Suppose that f ∈ C2r[0, n], where r ≥ m. G Since the all nodes τν = τν , ν = 1, . . . , m, of the Gaussian rule (2.1) belong to (0, 1), using (2.4) with x = τν and s = 2r + 1, we have [ ] ∑2r B (τ ) f(τ ) = I f + j ν f (j−1)(1) − f (j−1)(0) ν 1 j! j=1 ∫ 1 1 (2r+1) − f (t)L2r+1(τν, t) dt, (2r + 1)! 0

G from which, by multiplying by wν = wν and summing in ν from 1 to m, we get ( ) ∫ ∑m ∑m 1 wνf(τν) = wν f(t) dt ν=1 ν=1 0 ( ) [ ] ∑2r 1 ∑m + w B (τ ) f (j−1)(1) − f (j−1)(0) j! ν j ν j=1 ν=1 ∫ ( ) 1 ∑m 1 (2r+1) − f (t) wνL2r+1(τν, t) dt, (2r + 1)! 0 ν=1 i.e., ∫ [ ] 1 ∑2r QG (B ) QG f = QG (1) f(t) dt + m j f (j−1)(1) − f (j−1)(0) + EG (f), m m j! m,r 0 j=1 where ∫ 1 G − 1 (2r+1) G · Em,r(f) = f (t)Qm (L2r+1( , t)) dt. (2r + 1)! 0

Since ∫ { 1 1, j = 0, Bj(x) dx = 0 0, j ≥ 1, Families of Euler-Maclaurin formulae 71 and { ∑m 1, j = 0, QG (B ) = w B (τ ) = m j ν j ν ≤ ≤ − ν=1 0, 1 j 2m 1, because the Gauss-Legendre formula is exact for all algebraic polynomials of degree at most 2m − 1, the previous formula becomes ∫ [ ] 1 ∑2r QG (B ) QG f − f(t) dt = m j f (j−1)(1) − f (j−1)(0) + EG (f). (2.9) m j! m,r 0 j=2m Notice that for Gauss-Legendre nodes and weights the following equali- ties τν + τm−ν+1 = 1, wν = wm−ν+1 > 0, ν = 1, . . . , m, hold, as well as

j wνBj(τν) + wm−ν+1Bj(τm−ν+1) = wνBj(τν)(1 + (−1) ), which is equal to zero for odd j. Also, if m is odd, then τ(m+1)/2 = 1/2 and Bj(1/2) = 0 for each odd j. Thus, the quadrature sum ∑m G Qm(Bj) = wνBj(τν) = 0 ν=1 for odd j, so that (2.9) becomes ∫ [ ] 1 ∑r QG (B ) QG f − f(t) dt = m 2j f (2j−1)(1) − f (2j−1)(0) + EG (f). m (2j)! m,r 0 j=m (2.10) Now, for the (shifted) composite Gauss-Legendre formula we have [ ∫ ] n∑−1 k+1 (n) − G · − Gm f Inf = Qmf(k + ) f(t) dt k=0 k [ ∫ ] n∑−1 1 G · − = Qmf(k + ) f(k + x) dx . k=0 0 Finally, using (2.10) we obtain  −  [ ] n∑1 ∑r QG (B ) G(n)f − I f = m 2j f (2j−1)(k + 1) − f (2j−1)(k) m n  (2j)! k=0 j=m 72 G. V. Milovanovi´c } G · +Em,r(f(k + )) [ ] ∑r QG (B ) = m 2j f (2j−1)(n) − f (2j−1)(0) + EG (f), (2j)! n,m,r j=m

G where En,m,r(f) is given by

∫ ( − ) 1 1 n∑1 EG (f) = − f (2r+1)(k + t) QG (L ( · , t)) dt. (2.11) n,m,r (2r + 1)! m 2r+1 0 k=0 ∗ − − ∗ Since L2r+1(x, t) = B2r+1(x t) B2r+1(x) and 1 d B∗ (τ ) = B (τ ),B∗ (τ − t) = − B∗ (τ − t), 2r+1 ν 2r+1 ν 2r+1 ν 2r + 2 dt 2r+2 ν we have ( ) ( ) G · G ∗ · − − G ∗ · Qm (L2r+1( , t)) = Qm B2r+1( t) Qm B2r+1( ) ( ) 1 d = − QG B∗ ( · − t) , 2r + 2 m dt 2r+2

G · because Qm (B2r+1( )) = 0. Then for (2.11) we get

∫ ( − ) ( ) 1 n∑1 d (2r + 2)!EG (f) = f (2r+1)(k + t) QG B∗ ( · − t) dt. n,m,r m dt 2r+2 0 k=0 By using an integration by aprts, the right-hand side reduces to ∫ ( ) 1 1 ( ) G ∗ · − − G ∗ · − ′ RHS = F (t)Qm B2r+2( t) Qm B2r+2( t) F (t) dt, 0 0 where n∑−1 F (t) = f (2r+1)(k + t). k=0 ∗ − ∗ Since B2r+2(τν 1) = B2r+2(τν) = B2r+2(τν), we have

( ) 1 ( ) G ∗ · − − G ∗ · F (t)Qm B2r+2( t) = (F (1) F (0))Qm B2r+2( ) 0 ∫ 1 G · ′ = Qm (B2r+2( )) F (t) dt, 0 Families of Euler-Maclaurin formulae 73 so that ∫ 1 [ ( )] G · − G ∗ · − ′ RHS = Qm (B2r+2( )) Qm B2r+2( t) F (t) dt. 0 Since [ ] − r−m G · − ∗ · − ( 1) Qm B2r+2( ) B2r+2( t) > 0, 0 < t < 1, (2.12) there exists an η ∈ (0, 1) such that ∫ 1 [ ] ′ G · − ∗ · − RHS = F (η) Qm B2r+2( ) B2r+2( t) dt. 0 Because of continuity of f (2r+2) on [0, n] we conclude that there exists also ∈ ′ (2r+2) ξ (0, n) such∫ that F[(η) = nf ] (ξ). 1 G ∗ · − Because of 0 Qm B2r+2( t) dt = 0, we finally obtain that ∫ 1 G (2r+2) G · (2r + 2)!En,m,r(f) = nf (ξ) Qm [B2r+2( )] dt, 0 i.e., (2.8). 2

G Remark 2.1. Let gm,r(t) be the left-hand side in (2.12). Typical graphs G ≥ ≥ of functions gm,r(t) for some selected values of r m 1 are presented in Figure 2.1.

Now we consider some special cases of the formula (2.6) for some typical values of m. For a given m, by G(m) we denote the sequence of coefficients which appear in the sum on the right-hand side in (2.6), i.e., { } (m) { G }∞ G G G G = Qm(B2j) j=m = Qm(B2m),Qm(B2m+2),Qm(B2m+4),... . These Gaussian sums we can calculate very easy by using Mathematica Package OrthogonalPolynomials. In the sequel we mention cases when 1 ≤ m ≤ 7. Case . G G m = 1 Here τ1 = 1/2 and w1 = 1, so that, according to (2.7), G 1−2j − Q1 (B2j) = B2j(1/2) = (2 1)B2j, and (2.6) reduces to (1.7). Thus, { } 1 7 31 127 2555 1414477 57337 118518239 G(1) = − , , − , , − , , − , ,... . 12 240 1344 3840 33792 5591040 49152 16711680 74 G. V. Milovanovi´c

0.06 0.035 0.030 0.05 0.025 0.04 0.020 0.03 0.015 0.02 0.010 0.01 0.005

0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0

0.0025 0.010 0.0020 0.008 0.0015 0.006 0.0010 0.004

0.002 0.0005

0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0

7→ G Fig. 2.1. Graphs of t gm,r(t), r = m ( ), r = m + 1 (dashed line), and r = m + 2 (dotted line), when m = 1, m = 2 (top), and m = 3, m = 4 (bottom)

Case m = 2. Here ( ) ( ) 1 1 1 1 1 τ G = 1 − √ , τ G = 1 + √ and wG = wG = , 1 2 3 2 2 3 1 2 2 so that ( ) 1 QG(B ) = B (τ G) + B (τ G) = B (τ G). 2 2j 2 2j 1 2j 2 2j 1 In this case, the sequence of coefficients is { } 1 1 17 97 1291411 16367 243615707 G(2)= − , , − , , − , , − ,... . 180 189 2160 5346 21228480 58320 142767360

Case m = 3. Here ( ) ( ) 1 √ 1 1 √ τ G = 5 − 15 , τ G = , τ G = 5 + 15 1 10 2 2 3 10 5 4 5 wG = , wG = , wG = , 1 18 2 9 3 18 so that 5 4 QG(B ) = B (τ G) + B (τ G) 3 2j 9 2j 1 9 2j 2 Families of Euler-Maclaurin formulae 75 and { } 1 49 8771 4935557 15066667 3463953717 G(3) = − , , − , , − , ,... . 2800 72000 5280000 873600000 576000000 21760000000

Case m = 4. The corresponding sequence of coefficients is { } 1 41 3076 93553 453586781 G(4) = − , , − , , − ,... . 44100 565950 11704875 75631500 60000990000

Case m = 5. Here { } 1 205 100297 76404959 G(5) = − , , − , ,... . 698544 29719872 2880541440 352578272256

Case m = 6. Here { } 1 43 86221 147502043 G(6) = − , , − , ,... . 11099088 70436520 21074606784 4534139665440

Case m = 7. Here { } 1 1603 14669711 5003171345 G(7) = − , , − , + ,... . 176679360 31236910848 33282622264320 1147724953030656

3. Euler-Maclaurin formula based on the composite Lobatto formula

We can also consider the corresponding Gauss-Lobatto quadrature for- mula ∫ 1 m∑+1 L L L f(x) dx = wν f(τν ) + Rm(f), (3.1) 0 ν=0 L L with the nodes τ0 = τ0 = 0, τm+1 = τm+1 = 1, and others internal nodes L τν = τν , ν = 1, . . . , m, which are zeros of the shifted (monic) Jacobi poly- nomial, ( ) −1 2m + 2 π (x) = P (1,1)(2x − 1), m m m orthogonal on the interval (0, 1) with respect to the weight function x 7→ − L x(1 x). Degree of its algebraic precision is d = 2m + 1, i.e., Rm(f) = 0 for all algebraic polynomials of degree ≤ 2m + 1. 76 G. V. Milovanovi´c

In construction of the Gauss-Lobatto formula m∑+1 L L L Qm(f) = wν f(τν ), (3.2) ν=0 we can use parameters of the corresponding Gaussian formula ∫ 1 ∑m − bG bG bG g(x)x(1 x) dx = wν g(τν ) + Rm(g), 0 ν=1 which can be calculated from an eigenvalue problem for the symmetric tridi- agonal Jacobi matrix (2.2), in this case, with the three-term recurrence co- efficients, 1 k(k + 2) αb = 1/2, βb = · , k ∈ N. k k 4 (2k + 1)(2k + 3) L The nodes of the Gauss-Lobatto quadrature formula (3.1) are τ0 = 0, L bG L τν = τν , ν = 1, . . . , m, τm+1 = 1, and the corresponding weights (cf. [18, pp. 330–331]) are wbG wL = ν , ν = 1, . . . , m, ν bG − bG τν (1 τν ) and 1 ∑m wbG 1 ∑m wbG wL = − ν , wL = − ν . 0 2 τbG m+1 2 1 − τbG ν=1 ν ν=1 ν The corresponding composite rule is n∑−1 m∑+1 n∑−1 (n) L · L L Lm f = Qmf(k + ) = wν f(k + τν ), k=0 ν=0 k=0 i.e., ∑n ∑m n∑−1 (n) L L ′′ L L Lm f = (w0 + wm+1) f(k) + wν f(k + τν ). (3.3) k=0 ν=1 k=0 As in the Gauss-Legendere case, there exists a of nodes and weights, i.e.,

L L L L τν + τm+1−ν = 1, wν = wm+1−ν > 0, ν = 0, 1, . . . , m + 1, so that the Gauss-Lobatto quadrature sum m∑+1 L L L Qm(Bj) = wν Bj(τν ) = 0 ν=0 Families of Euler-Maclaurin formulae 77 for each odd j. Using the same arguments as before, we can state and prove the following result.

Theorem 3.1. For n, m, r ∈ N (m ≤ r) and f ∈ C2r[0, n] we have [ ] ∑r QL (B ) L(n)f − I f = m 2j f (2j−1)(n) − f (2j−1)(0) + EL (f), (3.4) m n (2j)! n,m,r j=m+1

(n) L where Lm f is given by (3.3), and QmB2j denotes the basic Gauss-Lobatto quadrature sum (3.2) applied to the Bernoulli polynomial x 7→ B2j(x), i.e.,

m∑+1 L L L − L Qm(B2j) = wν B2j(τν ) = Rm(B2j), ν=0

L where Rm(f) is the remainder term in (3.1). If f ∈ C2r+2[0, n] then there exists ξ ∈ (0, n), such that the error term in (3.4) can be expressed in the form

QL (B ) EL (f) = n m 2r+2 f (2r+2)(ξ). n,m,r (2r + 2)!

L Remark 3.1. As in Remark 2.1 we have gm,r(t) > 0 for 0 < t < 1, where [ ] L − r−m L · − ∗ · − gm,r(t) := ( 1) Qm B2r+2( ) B2r+2( t) . L ≥ ≥ Typical graphs of gm,r(t) for some selected values of r m + 1 1 are presented in Figure 3.1.

In the sequel we give the sequence of coefficients L(m) which appear in the sum on the right-hand side in (3.4), i.e., { } (m) { L }∞ L L L L = Qm(B2j) j=m+1 = Qm(B2m+2),Qm(B2m+4),Qm(B2m+6),... , obtained by using Mathematica Package OrthogonalPolynomials, for some typical values of m. Case m = 0. This is a case of the standard Euler-Maclaurin formula L L L L (1.1), for which τ0 = 0 and τ1 = 1, with w0 = w1 = 1/2. The sequence of coefficients is { } 1 1 1 1 5 691 7 3617 43867 174611 854513 L(0) = , − , , − , , − , , − , , − , ,... , 6 30 42 30 66 2730 6 510 798 330 138 78 G. V. Milovanovi´c

0.05 0.06 0.04 0.05

0.04 0.03 0.03 0.02 0.02 0.01 0.01

0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0

0.014 0.0030 0.012 0.0025 0.010 0.0020 0.008 0.0015 0.006 0.0010 0.004 0.002 0.0005

0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0

7→ L Fig. 3.1. Graphs of t gm,r(t), r = m+1 (solid line), r = m+2 (dashed line), and r = m + 3 (dotted line), when m = 0, m = 1 (top), and m = 2, m = 3 (bottom)

{ }∞ which is, in fact, the sequence of Bernoulli numbers B2j j=1. Case . L L m = 1 In this case τ0 = 0, τ1 = 1/2, and τ2 = 1, with the L L L corresponding weights w0 = 1/6, w1 = 2/3, and w2 = 1/6, which is, in fact, the Simpson formula (1.8). The sequence of coefficients is { } 1 5 7 425 235631 3185 19752437 958274615 L(1) = , − , , − , , − , , − ,... . 120 672 640 16896 2795520 8192 8355840 52297728

Case m = 2. Here 1 √ 1 √ τ L = 0, τ L = (5 − 5), τ L = (5 + 5), τ L = 1 0 1 10 2 10 3

L L L L and w0 = w3 = 1/12, w1 = w2 = 5/12, and the sequence of coefficients is { } 1 1 89 25003 3179 2466467 997365619 L(2) = , − , , − , , − , ,... . 2100 1125 41250 3412500 93750 11953125 623437500

Case m = 3. Here 1 √ 1 1 √ τ L = 0, τ L = (7 − 31), τ L = , τ L = (7 + 31), τ L = 1 0 1 14 2 2 3 14 4 Families of Euler-Maclaurin formulae 79 and 1 49 16 49 1 wL = , wL = , wL = , wL = , wL = , 0 20 1 180 2 45 3 180 4 20 and the sequence of coefficients is { } 1 65 38903 236449 1146165227 L(3) = , − , , − , ,... . 35280 724416 119857920 154893312 122882027520

Case m = 4. The corresponding sequence of coefficients is { } 1 17 173 43909 160705183 L(4) = , − , , − , ,... . 582120 2063880 4167450 170031960 79815002400

Case m = 5. Here { } 1 49 5453 671463061 L(5) = , − , , − ,... . 9513504 68999040 1146917376 17766424811520

Case m = 6. In this case the corresponding sequence of coefficients is { } 1 50 16331 19490189 L(6) = , − , , − ,... . 154594440 854134281 32502560805 3922888023054

Case m = 7. Here { } 1 29 89209 776272933 L(7) = , − , , − ,... . 2502957600 6216496000 1786424640000 1291329811200000

REFERENCES

[1] T. M. Apostol, An elementary view of Euler’s summation formula, Amer. Math. Monthly 106 (1999), 409–418. [2] C. T. H. Baker, G. S. Hodgson, Asymptotic expansions for integration formulae in one or more , SIAM J. Numer. Anal. 8 (1971), 473–480. [3] E. W. Barnes, The Maclaurin sum-formula, Proc. London Math. Soc. 2-3 (1905), 253–272. [4] B. C. Berndt, L. Schoenfeld, Periodic analogues of the Euler-Maclaurin and Poisson summation formulas with applications to number theory, Acta 28 (1975), 23–68. 80 G. V. Milovanovi´c

[5] P. L. Butzer, P. J. S. G. Ferreira, G. Schmeisser, R. L. Stens, The summation formulae of Euler-Maclaurin, Abel-Plana, Poisson, and their interconnections with the approx- imate sampling formula of signal analysis, Results. Math. 59 (2011), 359–400. [6] A. S. Cvetkovi´c,G. V. Milovanovi´c, The Mathematica Package “OrthogonalPolyno- mials”, Facta Univ. Ser. Math. Inform. 19 (2004), 17–36. [7] Dj. Cvijovi´c,J. Klinkovski, New formulae for the Bernoulli and Euler polynomials at rational arguments, Proc. Amer. Math. Soc. 123 (1995), 1527–1535. [8] L. Derr, C. Outlaw, D. Sarafyan, Generalization of Euler-Maclaurin sum formula to the six-point Newton-Cotes quadrature formula, Rend. Mat. (6) 12 (1979), no. 3-4, 597–607. [9] D. Elliott, The Euler-Maclaurin formula revisited, J. Austral. Math. Soc. Ser. B 40 (1998/99), (E), E27–E76. [10] W. Gautschi, Algorithm 726: ORTHPOL – a package of routines for generating orthogonal polynomials and Gauss-type quadrature rules, ACM Trans. Math. Software 20 (1994), 21–62. [11] W. Gautschi, Leonhard Eulers Umgang mit langsam konvergenten Reihen (Leonhard Euler’s handling of slowly convergent series), Elem. Math. 62 (2007), 174–183. [12] W. Gautschi, Leonhard Euler: his life, the man, and his works, SIAM Rev. 50 (2008), 3–33. [13] G. Golub, J. H. Welsch, Calculation of Gauss quadrature rules, Math. Comp. 23 (1969), 221–230. [14] P. Henrici, Applied and Computational . Volume 2. Special func- tions – Integral transforms – Asymptotics – Continued Fractions, Pure and Applied Mathematics, John Wiley & Sons Inc., New York – London – Sydney, 1977. [15] V. I. Krylov, Approximate Calculation of Integrals, Macmillan, New York, 1962. [16] J. N. Lyness, An algorithm for Gauss-Romberg integration, BIT 12 (1972), 294–203. [17] J. N. Lyness, The Euler Maclaurin expansion for the Cauchy principal value integral, Numer. Math. 46 (1985), 611–622. [18] G. Mastroianni, G. V. Milovanovi´c, Interpolation Processes – Basic Theory and Appli- cations, Springer Monographs in Mathematics, Springer Verlag, – Heidelberg – New York, 2008. [19] S. Mills, The independent derivations by Euler, Leonhard and Maclaurin, Colin of the Euler-Maclaurin summation formula, Arch. Hist. Exact Sci. 33 (1985), 1–13. [20] G. V. Milovanovi´c, Numerical Analysis, Part II , Nauˇcnaknjiga, Beograd, 1988 (Ser- bian). [21] G. V. Milovanovi´c, Chapter 23: Computer algorithms and software packages, In: Wal- ter Gautschi: Selected Works and Commentaries, Vol. 3 (C. Brezinski, A. Sameh, eds.), Birkh¨auser,Basel, 2013. [22] G. V. Milovanovi´c,A. S. Cvetkovi´c, Special classes of orthogonal polynomials and corresponding quadratures of Gaussian type, Math. Balkanica 26 (2012), 169–184. [23] C. Outlaw, D. Sarafyan, L. Derr, Generalization of the Euler-Maclaurin formula for Gauss, Lobatto and other quadrature formulas, Rend. Mat. (7) 2 (1982), no. 3, 523– 530. Families of Euler-Maclaurin formulae 81

[24] A. P. Prudnikov, Yu. A. Brychkov, O. I. Marichev, Integrals and Series, Vol. 3, Gor- don and Breach, New York, 1990. [25] D. Sarafyan, L. Derr, C. Outlaw, Generalizations of the Euler-Maclaurin formula, J. Math. Anal. Appl. 67 (1979), no. 2, 542–548. [26] E. T. Whittaker, G. N. Watson, A Course of Modern Analysis, 4th edition, Series: Cambridge Mathematical Library, Cambridge University Press, 1996.

Mathematical Institute Serbian Academy of Sciences and Arts Kneza Mihaila 36 11001 Belgrade, Serbia [email protected]