Applied Mathematics Letters 19 (2006) 32–37 www.elsevier.com/locate/aml
Error inequalities for a generalized trapezoid rule Nenad Ujevi´c Department of Mathematics, University of Split, Teslina 12/III, 21000 Split, Croatia Received 17 September 2004; received in revised form 23 March 2005; accepted 24 March 2005
Abstract A generalized trapezoid rule is derived. Various error bounds for this rule are established. © 2005 Elsevier Ltd. All rights reserved. MSC: 26D15; 65D30 Keywords: Quadrature rule; Generalization; Numerical integration; Error bounds
1. Introduction In recent years a number of authors have considered error inequalities for some known and some new quadrature rules. Sometimes they have considered generalizations of these rules. For example, the well-known trapezoid quadrature rule is considered in [1–6] and some generalizations are given in [1] and [3]. In [1] we can find b n−1 (b − a)k+1 f (t)dt = [ f (k) (a) + (−1)k f (k) (b)] k+1 (k + 1)! 2 a k=0 a + b n (n) (−1)n b t− f (t)dt. + n! 2 a For n = 1 we get the trapezoid rule, b b a+b b−a t− f (t)dt = [ f (a) + f (b)] − f (t)dt. 2 2 a a E-mail address:
[email protected]. 0893-9659/$ - see front matter © 2005 Elsevier Ltd. All rights reserved. doi:10.1016/j.aml.2005.03.005
N. Ujevi´c / Applied Mathematics Letters 19 (2006) 32–37
33
In this paper we consider a different generalization of the trapezoid rule and give corresponding error inequalities. Similar error inequalities are established in [5] and [7]. We also give a numerical example which shows that this generalization can be very effective. 2. Main results Lemma 1. Let f : [a, b] → R be a function such that f (n−1) is absolutely continuous. Then b m 2i(b − a)2i+1 (2i) a + b f (a) + f (b) f f (x)dx = (b − a) − + R( f ), 2 2 22i (2i + 1)! a i=1 where m = n−1 2 , the integer part of (n − 1)/2, b n Sn (t) f (n) (t)dt R( f ) = (−1)
(1)
(2)
a
and
(n − 2)a − nb (t − a)n−1 t+ , n! 2 Sn (t) =
(t − b)n−1 (n − 2)b − na t+ , n! 2
a+b t ∈ a, 2
a+b ,b . t∈ 2
(3)
Proof. We briefly sketch the proof. First we note that S1 (t) = t −
a+b , 2
1 (t − a)(t − b) 2 are Peano kernels for the trapezoid quadrature rule, that is, we have b b b f (a) + f (b) S2 (t) f (t)dt = − S1 (t) f (t)dt = − f (t)dt. (b − a) + 2 a a a S2 (t) =
Now it is not difficult to prove that (1) holds, for example, by induction. Remark 2. If we introduce the notations
(t − a)n−1 (n − 2)a − nb Pn (t) = t+ n! 2
n−1 (t − b) (n − 2)b − na t+ Q n (t) = n! 2
(4) (5)
then we see that Pn and Q n form Appell sequences of polynomials, that is Pn (t) = Pn−1 (t),
Q n (t) = Q n−1 (t),
P0 (t) = Q 0 (t) = 1.
Thus we can also use integration by parts to prove that (1) holds.
34
N. Ujevi´c / Applied Mathematics Letters 19 (2006) 32–37
Lemma 3. The Peano kernels Sn (t), n > 1, satisfy b Sn (t)dt = 0, if n is odd, a b n(b − a)n+1 , |Sn (t)|dt = n 2 (n + 1)! a (n − 1)(b − a)n max |Sn (t)| = . t∈[a,b] 2n n!
(6) (7) (8)
Proof. A simple calculation gives b (b − a)n+1 [1 − (−1)n+1 ]. Sn (t)dt = − n+1 2 (n + 1)! a From the above relation we see that (6) holds, since 1 − (−1)n+1 = 0 if n is odd. We have a+b b b 2 |Sn (t)|dt = |Pn (t)|dt + |Q n (t)|dt a
a+b 2
a
=
n(b − a)n+1 . 2n (n + 1)!
Finally, we have
max |Sn (t)| = max
t∈[a,b]
max |Pn (t)|, max |Q n (t)|
t∈[a, a+b 2 ]
t∈[ a+b ,b]
2
a + b a + b , Qn = max Pn 2 2
=
(n − 1)(b − a)n . 2n n!
We introduce the notations b I = f (t)dt, a
m f (a) + f (b) 2i(b − a)2i+1 (2i) a + b (b − a) − f F= . 2 22i (2i + 1)! 2 i=1 Theorem 4. Let f : [a, b] → R be a function such that f (n−1) , n > 1, is absolutely continuous and there exist real numbers γn , Γn such that γn ≤ f (n) (t) ≤ Γn , t ∈ [a, b]. Then |I − F | ≤
Γn − γn n (b − a)n+1 (n + 1)! 2n+1
|I − F | ≤
(b − a)n+1 n (n) f ∞ if n is even. 2n (n + 1)!
if n is odd
(9)
and (10)
N. Ujevi´c / Applied Mathematics Letters 19 (2006) 32–37
Proof. Let n be odd. From (2) and (6) we get b n (n) n Sn (t) f (t)dt = (−1) R( f ) = (−1) a
b
Sn (t) f
a
(n)
35
γn + Γn dt (t) − 2
such that we have
(n) γn + Γn b |R( f )| = |I − F | ≤ max f (t) − |Sn (t)|dt. t∈[a,b] 2 a
We also have (n) γn + Γn Γn − γn max f (t) − ≤ . t∈[a,b] 2 2
(11)
(12)
From (11), (12) and (7) we get Γn − γn n (b − a)n+1 . (n + 1)! 2n+1 Let n be even. Then we have b (b − a)n+1 n (n) |R( f )| = |I − F | ≤ |Sn (t)|dt f (n) ∞ = n f ∞ . 2 (n + 1)! a
|I − F | ≤
Theorem 5. Let f : [a, b] → R be a function such that f (n−1) , n > 1, is absolutely continuous and let n be odd. If there exists a real number γn such that γn ≤ f (n) (t), t ∈ [a, b] then |I − F | ≤ (Tn − γn )
(n − 1)(b − a)n+1 , 2n n!
(13)
where Tn =
f (n−1) (b) − f (n−1) (a) . b−a
If there exists a real number Γn such that f (n) (t) ≤ Γn , t ∈ [a, b] then |I − F | ≤ (Γn − Tn )
(n − 1)(b − a)n+1 . 2n n!
(14)
Proof. We have
b (n) |R( f )| = |I − F | = ( f (t) − γn )Sn (t)dt , a
since (6) holds. Then we have b b (n) ( f (t) − γn )Sn (t)dt ≤ max |Sn (t)| ( f (n) (t) − γn )dt a
t∈[a,b]
a
(n − 1)(b − a)n (n−1) = [f (b) − f (n−1) (a) − γn (b − a)] 2n n! (n − 1)(b − a)n+1 (Tn − γn ). = 2n n! In a similar way we can prove that (14) holds.
36
N. Ujevi´c / Applied Mathematics Letters 19 (2006) 32–37
Remark 6. Note that we can apply the estimations (9) and (10) only if f (n) is bounded. On the other hand, we can apply the estimation (13) if f (n) is unbounded above and we can apply the estimation (14) if f (n) is unbounded below. 3. A numerical example
x Here we consider the integral (special function) Si(x) = 0 sint t dt and apply the summation formula (1) to this integral. We get the summation formula Si(x) = F (x) + R(x), where m sin x 2i x 2i+1 x (2i) x 1+ − f (15) F (x) = 2 x 22i (2i + 1)! 2 i=1
and f (t) = (sin t)/t. We calculate the derivatives f ( j ) (t) as follows. We have j j ( j) g (k) (t)h ( j −k) (t). (g(t)h(t)) = k k=0 If we choose g(t) = sin t and h(t) = 1/t then we get f
( j)
x 2
=
j −1 2
i=0
j ( j − 2i − 1)!2 j −2i x (−1) j −i+1 cos 2i + 1 x j −2i 2
2 j ( j − 2i)!2 j −2i+1 x (−1) j −i + sin . j −2i+1 2i 2 x i=0 j
We now compare the summation formula (15) with the known compound formula (for the trapezoid rule), x n−1 h f (t)dt = [ f (0) + f (x)] + h f (x i ) + R(x), (16) 2 0 i=1 where x i = ih, h = x/n. Let us choose x = 1. The “exact” value is Si(1) = 0.946083070367. If we choose m = 2 in (15) and n = 100 in (16) then we get Si(1) ≈ 0.946080675618 and Si(1) ≈ 0.946080560625, respectively. If we choose m = 3 in (15) and n = 8200 in (16) then we get Si(1) ≈ 0.946083078954 and Si(1) ≈ 0.946083069999, respectively. If we choose m = 4 in (15) and n = 32000 in (16) then we get Si(1) ≈ 0.946083070347 and Si(1) ≈ 0.946083070342, respectively. All calculations are done in double precision arithmetic. The first approximate results (derived from (15)) are obtained much faster than the second approximate results (derived from (16)). The same is valid if we use some quadrature rule of higher order, for example Simpson’s rule. This is a consequence of the fact that we have to calculate the function sin t many times when we apply the compound formula and we have only to calculate sin(x/2) and cos(x/2) when we apply the summation formula. x Similar summation formulas can be obtained for the integrals (special functions) 0 [(et − 1)/t]dt, x x 2 0 [(cos t − 1)/t]dt, 0 exp(−t )dt, etc.
N. Ujevi´c / Applied Mathematics Letters 19 (2006) 32–37
37
References [1] P. Cerone, S.S. Dragomir, Trapezoidal-type rules from an inequalities point of view, in: G. Anastassiou (Ed.), Handbook of Analytic-Computational Methods in Applied Mathematics, CRC Press, New York, 2000, pp. 65–134. [2] D. Cruz-Uribe, C.J. Neugebauer, Sharp error bounds for the trapezoidal rule and Simpson’s rule, J. Inequal. Pure Appl. Math. 3 (4) (2002) 1–22 Article 49. [3] Lj. Dedi´c, M. Mati´c, J. Peˇcari´c, On Euler trapezoid formulae, Appl. Math. Comput. 123 (2001) 37–62. [4] S.S. Dragomir, P. Cerone, J. Roumeliotis, A new generalization of Ostrowski’s integral inequality for mappings whose derivatives are bounded and applications in numerical integration and for special means, Appl. Math. Lett. 13 (2000) 19–25. [5] N. Ujevi´c, New bounds for the first inequality of Ostrowski–Gruss type and applications, Comput. Math. Appl. 46 (2003) 421–427. [6] N. Ujevi´c, A generalization of Ostrowski’s inequality and applications in numerical integration, Appl. Math. Lett. 17 (2) (2004) 133–137. [7] N. Ujevi´c, A.J. Roberts, A corrected quadrature formula and applications, ANZIAM J. 45 (E) (2004) E41–E56.