volume 3, issue 4, article 49, 2002.

*Received 04 April, 2002;*

*accepted 01 May, 2002.*

*Communicated by:**A. Fiorenza*

Abstract Contents

### JJ II

### J I

Home Page Go Back

Close Quit

**Journal of** **Inequalities in** **Pure and** **Applied** **Mathematics**

**SHARP ERROR BOUNDS FOR THE TRAPEZOIDAL RULE AND SIMP-**
**SON’S RULE**

D. CRUZ-URIBE AND C.J. NEUGEBAUER

Department of Mathematics Trinity College

Hartford, CT 06106-3100, USA.

*EMail:*david.cruzuribe@mail.trincoll.edu
Department of Mathematics

Purdue University West Lafayette, IN 47907-1395, USA.

*EMail:*neug@math.purdue.edu

c

2000School of Communications and Informatics,Victoria University of Technology ISSN (electronic): 1443-5756

031-02

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page2of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**Abstract**

We give error bounds for the trapezoidal rule and Simpson’s rule for “rough”

continuous functions—for instance, functions which are Hölder continuous, of
bounded variation, or which are absolutely continuous and whose derivative
is in L^{p}. These differ considerably from the classical results, which require
the functions to have continuous higher derivatives. Further, we show that our
results are sharp, and in many cases precisely characterize the functions for
which equality holds. One consequence of these results is that for rough func-
tions, the error estimates for the trapezoidal rule are better (that is, have smaller
constants) than those for Simpson’s rule.

*2000 Mathematics Subject Classification:*26A42, 41A55.

*Key words: Numerical integration, Trapezoidal rule, Simpson’s rule*

**Contents**

1 Introduction. . . 3

1.1 Overview of the Problem . . . 3

1.2 Statement of Results . . . 6

1.3 Organization of the Paper. . . 15

2 Preliminary Remarks . . . 16

2.1 Estimating the Error . . . 16

2.2 Modifying the Norm . . . 19

3 Functions inΛα(I),0< α≤1, andCBV(I) . . . 20

4 Functions inW_{1}^{p}(I)andW_{1}^{pq}(I),1≤p, q≤ ∞ . . . 28

5 Functions inW_{2}^{p}(I),1≤p≤ ∞ . . . 41
References

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page3of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**1.** **Introduction**

**1.1.** **Overview of the Problem**

Given a finite intervalI = [a, b]and a continuous functionf :I →R, there are two elementary methods for approximating the integral

Z

I

f(x)dx,

the trapezoidal rule and Simpson’s rule. Partition the intervalI intonintervals
of equal length with endpointsx_{i} =a+i|I|/n,0≤i≤n. Then the trapezoidal
rule approximates the integral with the sum

(1.1) T_{n}(f) = |I|

2n f(x_{0}) + 2f(x_{1}) +· · ·+ 2f(xn−1) +f(x_{n})
.

Similarly, if we partition I into2n intervals, Simpson’s rule approximates the integral with the sum

(1.2) S2n(f) = |I|

6n f(x0) + 4f(x1) + 2f(x2) + 4f(x3) +· · ·

+ 4f(x2n−1) +f(x_{2n})
.
Both approximation methods have well-known error bounds in terms of higher
derivatives:

E_{n}^{T}(f) =

T_{n}(f)−
Z

I

f(x)dx

≤ |I|^{3}kf^{00}k∞

12n^{2} ,
E_{2n}^{S} (f) =

S2n(f)− Z

I

f(x)dx

≤ |I|^{5}kf^{(4)}k_{∞}
180n^{4} .

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page4of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

(See, for example, Ralston [13].)

Typically, these estimates are derived using polynomial approximation, which leads naturally to the higher derivatives on the righthand sides. However, the as- sumption thatf is not only continuous but has continuous higher order deriva- tives means that we cannot use them to estimate directly the error when approx- imating the integral of such a well-behaved function asf(x) =√

xon[0,1]. (It is possible to use them indirectly by approximatingf with a smooth function;

see, for example, Davis and Rabinowitz [3].)

In this paper we consider the problem of approximating the errorE_{n}^{T}(f)and
E_{2n}^{S} (f)for continuous functions which are much rougher. We prove estimates
of the form

(1.3) E_{n}^{T}(f), E_{2n}^{S} (f)≤c_{n}kfk;

where the constants cn are independent of f, cn → 0 as n → ∞, and k · k denotes the norm in one of several Banach function spaces which are embedded inC(I). In particular, in order (roughly) of increasing smoothness, we consider functions in the following spaces:

• Λ_{α}(I),0< α≤1: Hölder continuous functions with norm

kfk_{Λ}_{α} = sup

x,y∈I

|f(x)−f(y)|

|x−y|^{α} .

• CBV(I): continuous functions of bounded variation, with norm

kfk_{BV,I} = sup

Γ n

X

i=1

|f(x_{i})−f(x_{i−1})|,

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page5of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

wherea =x_{0} < x_{1} < · · ·< x_{n} = b, and the supremum is taken over all
such partitionsΓ ={xi}ofI.

• W_{1}^{p}(I),1≤p≤ ∞: absolutely continuous functions such thatf^{0} ∈L^{p}(I),
with normkf^{0}k_{p,I}.

• W_{1}^{pq}(I), 1 ≤ p ≤ ∞: absolutely continuous functions such that f^{0} is in
the Lorentz spaceL^{pq}(I), with norm

||f^{0}||_{pq,I} =
Z ∞

0

t^{q/p−1}(f^{0})^{∗q}(t)dt
1/q

= p

q Z ∞

0

λ_{f}^{0}(y)^{q/p}d(y^{q})
1/q

. (For precise definitions, see the proof of Theorem1.6in Section4below, or see Stein and Weiss [17].)

• W_{2}^{p}(I), 1 ≤ p ≤ ∞: differentiable functions such that f^{0} is absolutely
continuous andf^{00} ∈L^{p}(I), with normkf^{00}k_{p,I}.

(Properly speaking, some of these norms are in fact semi-norms. For our purposes we will ignore this distinction.)

In order to prove inequalities like (1.3), it is necessary to make some kind
of smoothness assumption, since the supremum norm on C(I)is not adequate
to produce this kind of estimate. For example, consider the family of functions
{f_{n}}defined on[0,1]as follows: on[0,1/n]let the graph off_{n}be the trapezoid
with vertices(0,1),(1/n^{2},0),(1/n−1/n^{2},0),(1/n,1), and extend periodically
with period1/n. ThenE_{n}(f_{n}) = 1−1/nbut||f_{n}||∞,I = 1.

Our proofs generally rely on two simple techniques, albeit applied in a some- times clever fashion: integration by parts and elementary inequalities. The idea

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page6of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

of applying integration by parts to this problem is not new, and seems to date
back to von Mises [19] and before him to Peano [11]. (This is described in
the introduction to Ghizzetti and Ossicini [7].) But our results themselves are
either new or long-forgotten. After searching the literature, we found the fol-
lowing papers which contain related results, though often with more difficult
proofs and weaker bounds: Pólya and Szegö [12], Stroud [18], Rozema [15],
Rahman and Schmeisser [14], Büttgenbach et al. [2], and Dragomir [5]. Also,
as the final draft of this paper was being prepared we learned that Dragomir,
*et al. [4] had independently discovered some of the same results with similar*
proofs. (We would like to thank A. Fiorenza for calling our attention to this
paper.)

**1.2.** **Statement of Results**

Here we state our main results and make some comments on their relationship
to known results and on their proofs. Hereafter, given a function f, define
f_{r}(x) =f(x)−rx,r∈R, andf_{s}(x) =f(x)−s(x), wheresis any polynomial
of degree at most three such thats(0) = 0. Also, in the statements of the results,
the intervalsJiand the pointsci,1≤i≤n, are defined in terms of the partition
for the trapezoidal rule, and the intervalsI_{i} and points a_{i} andb_{i} are defined in
terms of the partition for Simpson’s rule. Precise definitions are given in Section
2below.

* Theorem 1.1. Let*f ∈Λ

_{α}(I),0< α≤1. Then forn≥1,

(1.4) E_{n}^{T}(f)≤ |I|^{1+α}

(1 +α)2^{α}n^{α}inf

r kf_{r}k_{Λ}_{α},

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page7of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

*and*

(1.5) E_{2n}^{S} (f)≤ 2(1 + 2^{α+1})|I|^{1+α}
(1 +α)6^{1+α}n^{α} inf

s kf_{s}k_{Λ}_{α},

*Further, inequality (1.4) is sharp, in the sense that for each* n *there exists a*
*function*f *such that equality holds.*

**Remark 1.1. We conjecture that inequality (1.5) is sharp, but we have been***unable to construct an example which shows this.*

**Remark 1.2. Inequality (1.4) should be compared to the examples of increasing***functions in* Λ_{α}*,* 0 < α < 1, constructed by Dubuc and Topor [6], for which
E_{n}^{T}(f) =O(1/n).

In the special case of Lipschitz functions (i.e., functions inΛ_{1}) Theorem1.1
can be improved.

* Corollary 1.2. Let*f ∈Λ

_{1}

*. Then for*n≥1,

|E_{n}^{T}(f)| ≤ |I|^{2}

8n(M −m), (1.6)

|E_{2n}^{S} (f)| ≤ 5|I|^{2}

72n (M−m), (1.7)

*where* M = sup_{I}f^{0}*,* m = inf_{I}f^{0}*. Furthermore, equality holds in (1.6) if and*
*only if*f *is such that its derivative is given by*

(1.8) f^{0}(t) = ±

n

X

i=1

M χ_{J}^{+}

i (t) +mχ_{J}^{−}

i (t)

! .

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page8of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

*Similarly, equality holds in (1.7) if and only if*

(1.9) f^{0}(t) = ±

n

X

i=1

mχ_{I}^{1}

i(t) +M χ_{I}^{2}

i(t) +mχ_{I}^{3}

i(t) +M χ_{I}^{4}

i(t)

! .

**Remark 1.3. Inequality (1.6) was first proved by Kim and Neugebauer [9] as***a corollary to a theorem on integral means.*

* Theorem 1.3. Let*f ∈CBV(I). Then forn ≥1,

(1.10) E_{n}^{T}(f)≤ |I|

2ninf

r kf_{r}k_{BV,I},
*and*

(1.11) E_{2n}^{S} (f)≤ |I|

3ninf

r kf_{r}k_{BV,I}.

*Both inequalities are sharp, in the sense that for each*n*there exists a sequence*
*of functions which show that the given constant is the best possible. Further, in*
*each equality holds if and only if both sides are equal to zero.*

**Remark 1.4. Pölya and Szegö [12] proved an inequality analogous to (1.10)***for rectangular approximations. However, they do not show that their result is*
*sharp.*

* Theorem 1.4. Let*f ∈W

_{1}

^{p}(I),1≤p≤ ∞. Then for alln ≥1, (1.12) E

_{n}

^{T}(f)≤ |I|

^{1+1/p}

^{0}

2n(p^{0} + 1)^{1/p}^{0} inf

r kf_{r}^{0}k_{p,I},

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page9of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

*and*

(1.13) E_{n}^{S}(f)≤ 2^{1/p}^{0}(1 + 2^{p}^{0}^{+1})^{1/p}^{0}|I|^{1+1/p}^{0}
(p^{0}+ 1)^{1/p}^{0}6^{1+1/p}^{0}n inf

s kf_{s}^{0}k_{p,I}.

*Inequality (1.12) is sharp, and when*1< p <∞, equality holds if and only if
(1.14) f^{0}(t) =d_{1}

n

X

i=1

(t−c_{i})^{p}^{0}^{−1}χ_{J}^{+}

i (t)−(c_{i}−t)^{p}^{0}^{−1}χ_{J}^{−}

i (t)
+d_{2},

*where*d_{1}, d_{2} ∈ R*. Similarly, inequality (1.13) is sharp, and when*1 < p <∞,
*equality holds if and only if*

(1.15) f^{0}(t) =d_{1}

n

X

i=1

(t−a_{i})^{p}^{0}^{−1}χ_{I}^{2}

i(t) + (t−b_{i})^{p}^{0}^{−1}χ_{I}^{4}

i(t)

−(a_{i}−t)^{p}^{0}^{−1}χ_{I}^{1}

i(t)−(b_{i}−t)^{p}^{0}^{−1}χ_{I}^{3}

i(t)

+d_{2}t^{2} +d_{3}t+d_{4},

*where*d_{i} ∈R*,*1≤i≤4.

* Remark 1.5. When* p = 1, p

^{0}= ∞, and we interpret (1 +p

^{0})

^{1/p}

^{0}

*and*(1 + 2

^{p}

^{0}

^{+1})

^{1/p}

^{0}

*in the limiting sense as equaling*1

*and*2

*respectively. In this case*

*Theorem1.4is a special case of Theorem1.3since if*f

*is absolutely continuous*

*it is of bounded variation, and*kf

^{0}k

_{1,I}=kfk

_{BV,I}

*.*

* Remark 1.6. When* 1 < p < ∞

*we can restate Theorem*

*1.4*

*in a form anal-*

*ogous to Theorem*

*1.3. We define the space*BVp

*of functions of bounded*p-

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page10of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

*variation by*

kfk_{BV}_{p}_{,I} = sup

Γ n

X

i=1

|f(x_{i})−f(xi−1)|^{p}

|x_{i} −x_{i−1}|^{p−1} <∞,

*where the supremum is taken over all partitions*Γ ={x_{i}}*of*I. Thenf ∈BV_{p}*if*
*and only if it is absolutely continuous and*f^{0} ∈L^{p}(I), andkfk_{BV}_{p}_{,I} =||f^{0}||_{p,I}*.*
*This characterization is due to F. Riesz; see, for example, Natanson [10].*

* Remark 1.7. When* p = ∞, Theorem

*1.4*

*is equivalent to Theorem*

*1.1*

*with*α = 1, since f ∈ W

_{1}

^{∞}(I)

*if and only if*f ∈ Λ

_{1}(I), and kf

^{0}k∞,I = kfk

_{Λ}

_{1}

_{,I}

*.*

*(See, for example, Natanson [10].)*

* Remark 1.8. Inequality (1.12), with*r= 0

*and*p >1

*was independently proved*

*by Dragomir [5] as a corollary to a rather lengthy general theorem. Very re-*

*cently, we learned that Dragomir et al. [4] gave a direct proof similar to ours*

*for (1.12) for all*p

*but still with*r = 0. Neither paper considers the question of

*sharpness.*

While inequalities (1.12) and (1.13) are sharp in the sense that for a givenn
equality holds for a given function,E_{n}^{T}(f)andE_{2n}^{S} (f)go to zero more quickly
than1/n.

* Theorem 1.5. Let*f ∈W

_{1}

^{p}(I),1≤p≤ ∞. Then

n→∞lim n·E_{n}^{T}(f) = 0
(1.16)

n→∞lim n·E_{2n}^{S} (f) = 0.

(1.17)

*Further, these limits are sharp in the sense that the factor of* n *cannot be re-*
*placed by*n^{a}*for any*a >1.

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page11of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**Remark 1.9. Unlike most of our proofs, the proof of Theorem**1.5requires that*we approximate*f *by smooth functions. It would be of interest to find a proof of*
*this result which avoided this.*

* Theorem 1.6. Let*f ∈W

_{1}

^{pq}(I),1≤p, q ≤ ∞. Then forn≥1, (1.18) E

_{n}

^{T}(f)≤B(q

^{0}/p

^{0}, q

^{0}+ 1)

^{1/q}

^{0}|I|

^{1+1/p}

^{0}

2n inf

r kf_{r}^{0}k_{pq,I},
*where*B *is the Beta function,*

B(u, v) = Z 1

0

x^{u−1}(1−x)^{v−1}dx, u, v >0.

*Similarly,*

(1.19) E_{2n}^{S} (f)≤C(q^{0}/p^{0}, q^{0} + 1)^{1/q}^{0}|I|^{1+1/p}^{0}
n inf

s kf_{s}^{0}k_{pq,I},
*where*

C(u, v) = Z 1/3

0

t^{u−1}
1

3− t 2

v−1

dt+ Z 1

1/3

t^{u−1}
1

4− t 4

v−1

dt.

* Remark 1.10. When*p=q

*then Theorem1.6reduces to Theorem1.4.*

* Remark 1.11. Theorem (1.6) is sharp; when* 1 ≤ q < p

*the condition for*

*equality to hold is straightforward (f*

*is constant), but when*q ≥ p

*it is more*

*technical, and so we defer the statement until after the proof, when we have*

*made the requisite definitions.*

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page12of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**Remark 1.12. The constant in (1.19) is considerably more complicated than***that in (1.18); the function*C(u, v)*can be rewritten in terms of the Beta function*
*and the hypergeometric function*_{2}F_{1}*, but the resulting expression is no simpler.*

*(Details are left to the reader.) However it is easy to show that*C(q^{0}/p^{0}, p^{0}+1)≤
B(q^{0}/p^{0}, p^{0}+ 1)/3^{q}^{0}*, so that we have the weaker but somewhat more tractable*
*estimate*

E_{2n}^{S} (f)≤B(q^{0}/p^{0}, q^{0}+ 1)^{1/q}^{0}|I|^{1+1/p}^{0}
3n inf

s kf_{s}^{0}k_{pq,I}.
* Theorem 1.7. Let*f ∈W

_{2}

^{p}(I),1≤p≤ ∞. Then forn≥1, (1.20) E

_{n}

^{T}(f)≤B(p

^{0}+ 1, p

^{0}+ 1)

^{1/p}

^{0}|I|

^{2+1/p}

^{0}

2n^{2} kf^{00}k_{p,I}
*and*

(1.21) E_{2n}^{S} (f)≤D(p^{0}+ 1, p^{0}+ 1)^{1/p}^{0} |I|^{2+1/p}^{0}
2^{1/p}3^{2+1/p}^{0}n^{2} inf

s kf_{s}^{00}kp,I,
*where*

D(u, v) = Z 3/2

0

t^{u−1}|1−t|^{v−1}dt.

*Inequality (1.20) is sharp, and when*1< p <∞*equality holds if and only if*

(1.22) f^{00}(t) =d

n

X

i=1

|J_{i}|^{2}

4 −(t−ci)^{2}
p^{0}−1

χJi(t),

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page13of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

*where* d ∈ R*. Similarly, inequality (1.21) is sharp, and when* 1 < p < ∞
*equality holds if and only if*

(1.23) f^{00}(t) =d1
n

X

i=1

|I_{i}|^{2}

36 −(t−ai)^{2}
p^{0}−1

χI˜_{i}^{1}(t)

−

(t−a_{i})^{2}− |I_{i}|^{2}
36

p^{0}−1

χI˜_{i}^{2}(t)

+
|Ii|^{2}

36 −(t−b_{i})^{2}
p^{0}−1

χI˜_{i}^{3}(t)

−

(t−b_{i})^{2}− |I_{i}|^{2}
36

p^{0}−1

χI˜_{i}^{4}(t)

!

+d_{2}t+d_{3},

*where* d_{i} ∈ R*,* 1 ≤ i ≤ 3, and the intervals I˜_{i}^{j}*,* 1 ≤ j ≤ 4, defined in (5.2)
*below, are such that the corresponding functions are positive.*

* Remark 1.13. When*p = 1, p

^{0}= ∞, and we interpretB(p

^{0}+ 1, p

^{0}+ 1)

^{1/p}

^{0}

*as*

*the limiting value*1/4. This follows immediately from the identity B(u, v) = Γ(u)Γ(v)/Γ(u+v)

*and from Stirling’s formula. (See, for instance, Whittaker*

*and Watson [20].)*

* Remark 1.14. When* p = ∞, (1.20) reduces to the classical estimate given

*above.*

* Remark 1.15. Like the function* C(u, v)

*in Theorem*

*1.6, the function*D(u, v)

*can be rewritten in terms of the Beta function and the hypergeometric function*

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page14of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au
2F_{1}*. However, the resulting expression does not seem significantly better, and*

*details are left to the reader.*

Prior to Theorem1.7, each of our results shows that for rough functions, the
trapezoidal rule is better than Simpson’s rule. More precisely, the constants in
the sharp error bounds for E_{2n}^{T} (f)are less than or equal to the constants in the
sharp error bounds forE_{2n}^{S}(f). (We useE_{2n}^{T} (f)instead ofE_{n}^{T}(f)since we want
to compare numerical approximations with the same number of data points.)

This is no longer the case for twice differentiable functions. Numerical cal- culations show that, for instance, when p = 10/9, the constant in (1.20) is smaller, but whenp= 10, (1.21) has the smaller constant. Furthermore, the fol- lowing analogue of Theorem 1.5 shows that though the constants in Theorem 1.7are sharp, Simpson’s rule is asymptotically better than the trapezoidal rule.

* Theorem 1.8. Given*f ∈W

_{2}

^{p}(I),1≤p≤ ∞,

(1.24) lim

n→∞n^{2}E_{n}^{T}(f) =

|I|^{2}
12

Z

I

f^{00}(t)dt
,

*but*

(1.25) lim

n→∞n^{2}E_{2n}^{S} (f) = 0.

**Remark 1.16. (Added in proof.) Given Theorems**1.5and1.8, it would be inter-*esting to compare the asymptotic behavior of*E_{n}^{T}(f)*and*E_{2n}^{S} (f)*for extremely*
*rough functions, say those in* Λα(I) *and* CBV(I). We suspect that in these
*cases their behavior is the same, but we have no evidence for this. (We want to*
*thank the referee for raising this question with us.)*

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page15of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**1.3.** **Organization of the Paper**

The remainder of this paper is organized as follows. In Section 2 we make some preliminary observations and define notation that will be used in all of our proofs. In Section 3we prove Theorems1.1and1.3 and Corollary1.2. In Section4we prove Theorems1.4,1.5and1.6. In Section5we prove Theorems 1.7and1.8.

Throughout this paper all notation is standard or will be defined when needed.

Given an intervalI,|I|will denote its length. Givenp, 1≤p ≤ ∞,p^{0} will de-
note the conjugate exponent: 1/p+ 1/p^{0} = 1.

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page16of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**2.** **Preliminary Remarks**

In this section we establish notation and make some observations which will be used in the subsequent proofs.

**2.1.** **Estimating the Error**

Given an interval I = [a, b], for the trapezoidal rule we will always have an
equally spaced partition of n+ 1points, x_{i} = a+i|I|/n. Define the intervals
J_{i} = [xi−1, x_{i}],1≤i≤n; then|J_{i}|=|I|/n.

For eachi,1≤i≤n, define
(2.1) Li = |J_{i}|

2 f(xi−1) +f(xi)

− Z

Ji

f(t)dt.

If we divide eachJ_{i}into two intervalsJ_{i}^{−}andJ_{i}^{+}of equal length, then (2.1) can
be rewritten as

(2.2) L_{i} =
Z

J_{i}^{−}

f(x_{i−1})−f(t)
dt+

Z

J_{i}^{+}

f(x_{i})−f(t)
dt.

Alternatively, if f is absolutely continuous, then we can apply integration by parts to (2.1) to get that

(2.3) L_{i} =

Z

Ji

(t−c_{i})f^{0}(t)dt,

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page17of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

wherec_{i} = (xi−1 +x_{i})/2is the midpoint ofJ_{i}. If f^{0} is absolutely continuous,
then we can apply integration by parts again to get

(2.4) Li = 1

2 Z

Ji

|J_{i}|^{2}

4 −(t−ci)^{2}

f^{00}(t)dt.

From the definition of the trapezoidal rule (1.1) it follows immediately that

(2.5) E_{n}^{T}(f) =

n

X

i=1

L_{i}

≤

n

X

i=1

|L_{i}|,
and our principal problem will be to estimate|L_{i}|.

We make similar definitions for Simpson’s rule. GivenI, we form a partition
with 2n + 1 points, x_{j} = a+j|I|/2n, 0 ≤ j ≤ 2n, and form the intervals
Ii = [x2i−2, x2i],1≤i≤n. Then|Ii|=|I|/n.

For eachi,1≤i≤n, define
(2.6) K_{i} = |I|

6n f(x2i−2) + 4f(x2i−1) +f(x_{2i})

− Z

Ii

f(t)dt.

To get an identity analogous to (2.2), we need to partitionI_{i} into four intervals
of different lengths. Define

a_{i} = 2x2i−2+x2i−1

3 b_{i} = 2x_{2i} +x2i−1

3 ,

and let

I_{i}^{1} = [x2i−2, ai], I_{i}^{2} = [ai, x2i−1], I_{i}^{3} = [x2i−1, bi], I_{i}^{4} = [bi, x2i].

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page18of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

Then|I_{i}^{1}| =|I_{i}^{4}| =|I|/6n and|I_{i}^{2}| = |I_{i}^{3}| = |I|/3n, and we can rewrite (2.6)
as

(2.7) K_{i} =
Z

I_{i}^{1}

f(x2i−2)−f(t) dt+

Z

I_{i}^{2}

f(x2i−1)−f(t) dt +

Z

I_{i}^{3}

f(x2i−1)−f(t) dt+

Z

I_{i}^{4}

f(x2i)−f(t) dt.

Iff is absolutely continuous we can apply integration by parts to (2.6) to get

(2.8) K_{i} =

Z

I_{i}^{−}

(t−a_{i})f^{0}(t)dt+
Z

I^{+}_{i}

(t−b_{i})f^{0}(t)dt.

Iff^{0} is absolutely continuous we can integrate by parts again to get
(2.9) K_{i} = 1

2 Z

I_{i}^{−}

|I_{i}|^{2}

36 −(t−a_{i})^{2}

f^{00}(t)dt

+ 1 2

Z

I_{i}^{+}

|Ii|^{2}

36 −(t−b_{i})^{2}

f^{00}(t)dt.

Whichever expression we use, it follows from the definition of Simpson’s rule (1.2) that

(2.10) E_{2n}^{S} (f) =

n

X

i=1

K_{i}

≤

n

X

i=1

|K_{i}|.

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page19of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

Finally, we want to note that there is a connection between Simpson’s rule and the trapezoidal rule: it follows from the definitions (1.1) and (1.2) that

(2.11) S2n(f) = 4

3T2n(f)− 1 3Tn(f).

**2.2.** **Modifying the Norm**

In all of our results, we estimate the error in the trapezoidal rule with an expres- sion of the form

infr kf_{r}k,

where the infimum is taken over allr∈R. It will be enough to prove the various
inequalities with kfkon the righthand side: since the trapezoidal rule is exact
on linear functions,E_{n}^{T}(f_{r}) = E_{n}^{T}(f)for allf andr. Further, we note that for
eachf, there existsr0 ∈Rsuch that

kf_{r}_{0}k= inf

r kf_{r}k.

This follows since the norm is continuous inrand tends to infinity as|r| → ∞.

Similarly, in our estimates forE_{2n}^{S}(f), it will suffice to prove the inequalities
with kfk on the righthand side instead of inf_{s}kf_{s}k: because Simpson’s rule
is exact for polynomials of degree 3 or less, E_{n}^{S}(f) = E_{n}^{T}(f_{s}), for s(x) =
ax^{3}+bx^{2}+cx. Again the infimum is attained, since the norm is continuous in
the coefficients ofsand tends to infinity as|a|+|b|+|c| → ∞.

(The exactness of the Trapezoidal rule and Simpson’s rule is well-known;

see, for example, Ralston [13].)

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page20of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**3.** **Functions in** Λ

_{α}

**(I),** 0 < α ≤ 1, and CBV (I )

*Proof of Theorem*1.1. We first prove inequality (1.4). By (2.2), for eachi,1≤
i≤n,

|L_{i}| ≤
Z

J_{i}^{−}

|f(xi−1)−f(t)|dt+ Z

J_{i}^{+}

|f(x_{i})−f(t)|dt

≤ kfk_{Λ}_{α}
Z

J_{i}^{−}

|x_{i−1}−t|^{α}dt+kfk_{Λ}_{α}
Z

J_{i}^{−}

|x_{i}−t|^{α}dt;

by translation and reflection,

= 2kfk_{Λ}_{α}
Z

J_{i}^{−}

(t−xi−1)^{α}dt

= 2kfk_{Λ}_{α}|J_{i}^{−}|^{1+α}
1 +α

= |I|^{1+α}kfkΛα

(1 +α)2^{α}n^{1+α}.
Therefore, by (2.5)

(3.1) E_{n}^{T}(f)≤ |I|^{1+α}kfkΛα

(1 +α)2^{α}n^{α},
and by the observation in Section2.2we get (1.4).

The proof of inequality (1.5) is almost identical to the proof of (1.4): we begin with inequality (2.7) and argue as before to get

|K_{i}| ≤ 2(1 + 2^{α+1})|I|^{1+α}kfk_{Λ}_{α}
(1 +α)6^{1+α}n^{1+α} ,

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page21of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

which in turn implies (1.5).

To see that inequality (1.4) is sharp, fixn ≥ 1and define the function f as follows: on[0,1/n]let

f(x) =

x^{α}, 0≤x≤ 1
2n

x− 1 n

α

, 1

2n ≤x≤ 1 n.

Now extendf to the interval[0,1]as a periodic function with period1/n. It is
clear that kfk_{Λ}_{α} = 1, and it is immediate from the definition thatT_{n}(f) = 0.

Therefore,

E_{n}^{T}(f) =
Z 1

0

f(x)dx= 2n Z 1/2n

0

x^{α}dx= 1
(1 +α)2^{α}n^{α},
which is precisely the righthand side of (3.1).

*Proof of Corollary*1.2. Inequalities (1.6) and (1.7) follow immediately from
(1.4) and (1.5). Recall that if f ∈ Λ_{1}(I), then f is differentiable almost ev-
erywhere,f^{0} ∈L^{∞}(I)andkfk_{Λ}_{1} =kf^{0}k∞. (See, for example, Natanson [10].)
Letr= (M+m)/2; then

kf −rxk_{Λ}_{1} =kf^{0}−rk∞= M−m
2 .

We now show that (1.6) is sharp and that equality holds exactly when (1.8) holds. First note that if (1.8) holds, then by (2.3),

L_{i} =
Z

J_{i}^{+}

(t−c_{i})M dt+
Z

J_{i}^{−}

(t−c_{i})m dt=±|I|^{2}

8n^{2}(M −m),

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page22of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

and it follows at once from (2.5) that equality holds in (1.6).

To prove that (1.8) is necessary for (1.6) to hold, we consider two cases.

**Case 3.1.** M > 0*and*m =−M*. In this case,*
E_{n}^{T}(f) = |I|^{2}

4nM.

*Again by (2.3),*
E_{n}^{T}(f)≤

n

X

i=1

Z

Ji

(t−c_{i})f^{0}(t)dt

≤

n

X

i=1

Z

J_{i}^{−}

(t−c_{i})f^{0}(t)dt

+ Z

J_{i}^{+}

(t−c_{i})f^{0}(t)dt

≤ |I|^{2}
8n^{2}

n

X

i=1

kf^{0}k_{∞,J}^{−}

i +kf^{0}k_{∞,J}^{+}

i

≤ |I|^{2}

8n M +|I|^{2}
8n M,

*and since the first and last terms are equal, equality must hold throughout.*

*Therefore, we must have that*
(3.2) |L^{−}_{i} |=kf^{0}k_{∞,J}^{−}

i

Z

J_{i}^{−}

(c_{i}−t)dt, |L^{+}_{i} |=kf^{0}k_{∞,J}^{+}

i

Z

J_{i}^{+}

(t−c_{i})dt,
*and*

(3.3) |I|^{2}

8n^{2}

n

X

i=1

kf^{0}k_{∞,J}^{+}

i = |I|^{2}
8n^{2}

n

X

i=1

kf^{0}k_{∞,J}^{−}

i = |I|^{2}
8n M.

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page23of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

*Hence, by (3.2), on*J_{i}

f^{0}(t) =α_{i}χ_{J}^{+}

i (t)−β_{i}χ_{J}^{−}

i (t),

*with either*α_{i}, β_{i} >0*for all*i, orα_{i}, β_{i} <0*for all*i. Without loss of generality
*we assume that*α_{i}, β_{i} >0.

Further, we must have thatM = sup{α_{i} : 1 ≤ i ≤ n}, so it follows from
(3.3) thatα_{i} = M for alli. Similarly, we must have thatβ_{i} = M,1 ≤ i ≤ n.

This completes the proof of Case3.1.

* Case 3.2. The general case:* m < M

*. Let*r= (M +m)/2; then

E_{n}^{T}(f) = |I|^{2}

8n (M −m) =E_{n}^{T}(f_{r}).

*Since Case3.1applies to*f_{r}*, we have that*

f_{r}^{0}(t) = M −m
2

n

X

i=1

χ_{J}^{+}

i (t)−χ_{J}^{−}

i (t) .

*This completes the proof since*f^{0} =f_{r}^{0} +r.

The proof that (1.7) is sharp and equality holds if and only if (1.9) holds is essentially the same as the above argument, and we omit the details.

*Proof of Theorem*1.3. We first prove (1.10). By (2.2) and the definition of the
norm inCBV(I), for eachi,1≤i≤n,

|L_{i}| ≤
Z

J_{i}^{−}

|f(xi−1)−f(t)|dt+ Z

J_{i}^{+}

|f(x_{i})−f(t)|dt

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page24of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

≤ kfk_{BV,J}^{−}

i |J_{i}^{−}|+kfk_{BV,J}^{+}

i |J_{i}^{+}|

= 1

2nkfk_{BV,J}_{i}.
If we sum overi, we get

E_{n}^{T}(f)≤ 1
2n

n

X

i=1

kfk_{BV,J}_{i} = 1

2nkfk_{BV,I};
inequality (1.10) now follows from the remark in Section2.2.

To show that inequality (1.10) is sharp, fix n ≥ 1 and for k ≥ 1 define
a_{k} = 4^{−k}/n. We now define the function f_{k} on I = [0,1] as follows: on
[0,1/n]let

f_{k}(x) =

1− x

a_{n} 0≤x≤a_{n}

0 a_{n} ≤x≤ 1

n −a_{n}

1 + x−_{n}^{1}
an

1

n −a_{n}≤x≤ 1
n.

Extend f_{k} to [0,1] periodically with period 1/n. It follows at once from the
definition thatkf_{k}k_{BV,[0,1]} = 2n. Furthermore,

E_{n}^{T}(fk) =

Tn(fk)− Z 1

0

fk(t)dt

= 1−akn= 1−4^{−k}.
Thus the constant1/2nin (1.10) is the best possible.

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page25of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

We now consider when equality can hold in (1.10). Iff(t) = mt+b, then we have equality since both sides are zero.

For the converse implication we first show that iff ∈ CBV(I)is not con- stant onI, then

(3.4) E_{n}^{T}(f)< |I|

2nkfk_{BV,I}.

By the above argument, it will suffice to show that for somei,

|L_{i}|< |I|

2nkfk_{BV,J}_{i}.

Since f is non-constant, choose i such that f is not constant on J_{i}. Since f
is continuous, the function|f(xi−1) +f(xi)−2f(t)|achieves its maximum at
some t ∈ J_{i}, and, again becausef is non-constant, it must be strictly smaller
than its maximum on a set of positive measure. Hence on a set of positive
measure,|f(xi−1) +f(xi)−2f(t)|<kfkBV,Ji, and so (3.4) follows from (2.1),
since we can rewrite this as

L_{i} = 1
2

Z

Ji

f(xi−1) +f(x_{i})−2f(t)
dt.

To finish the proof, note that as we observed in Section2.2, there existsr_{0}
such thatkf_{r}_{0}k_{BV,I} = inf_{r}kf_{r}k_{BV,I}. Hence, we would have that

E_{n}^{T}(f) =E_{n}^{T}(f_{r}_{0})≤ |I|

2nkf_{r}_{0}k_{BV,I}.

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page26of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

Iff(t)were not of the formmt+b, so thatf_{r}_{0} could not be a constant function,
then by (3.4), the inequality would be strict. Hence equality can only hold iff
is linear.

The proof that inequality (1.11) holds is almost identical to the proof of (1.10): we begin with inequality (2.7) and argue exactly as we did above.

The proof that inequality (1.11) is sharp requires a small modification to the
example given above. Fix n ≥ 1 and, as before, let a_{k} = 4^{−k}/n. Define the
functionf_{k}onI = [0,1]as follows: on[0,1/n]let

f_{k}(x) =

0 0≤x≤ 1

2n −an

1 + x− _{2n}^{1}
a_{n}

1

2n −a_{n}≤x≤ 1
2n

1 +

1 2n −x

an

1

2n ≤x≤ 1
2n +a_{n}

0 1

2n +an ≤x≤ 1 n.

Extendf_{k}to[0,1]periodically with period1/n. Then we again havekf_{k}k_{BV,[0,1]} =
2n; furthermore,

E_{2n}^{S} (f_{k}) =

S_{2n}(f_{k})−
Z 1

0

f_{k}(t)dt

= 2

3 −a_{k}n = 2

3 −4^{−k}.
Thus the constant1/3nin (1.11) is the best possible.

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page27of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

The proof that equality holds in (1.11) only when both sides are zero is again very similar to the above argument, replacingLi byKi and using (2.6) instead of (2.1).

**Sharp Error Bounds for the**
**Trapezoidal Rule and Simpson’s**

**Rule**

D. Cruz-Uribe,C.J. Neugebauer

Title Page Contents

### JJ II

### J I

Go Back Close

Quit Page28of49

**J. Ineq. Pure and Appl. Math. 3(4) Art. 49, 2002**

http://jipam.vu.edu.au

**4.** **Functions in** W

_{1}

^{p}

## (I ) **and** W

_{1}

^{pq}

## (I ), 1 ≤ p, q ≤ ∞

*Proof of Theorem*1.4. As we noted in Remarks 1.5 and1.7, it suffices to con-
sider the case1< p <∞.

We first prove inequality (1.12). If we apply Hölder’s inequality to (2.3), then for alli,1≤i≤n,

|L_{i}| ≤ kf^{0}k_{p,J}_{i}
Z

Ji

|t−c_{i}|^{p}^{0}dt
1/p^{0}

.

An elementary calculation shows that Z

Ji

|t−c_{i}|^{p}^{0}dt= |J_{i}|^{p}^{0}^{+1}
(p^{0} + 1)2^{p}^{0}.

Hence, by (2.5) and by Hölder’s inequality for series,
E_{n}^{T}(f)≤ |I|^{1+1/p}^{0}

2(p^{0}+ 1^{1/p}^{0})n^{1+1/p}^{0}

n

X

i=1

Z

Ji

|f^{0}(t)|^{p}dt
1/p

≤ |I|^{1+1/p}^{0}
2(p^{0}+ 1)^{1/p}^{0}n^{1+1/p}^{0}

Z

I

|f^{0}(t)|^{p}dt
1/p

n^{1/p}^{0}

= |I|^{1+1/p}^{0}

2(p^{0} + 1)^{1/p}^{0}nkf^{0}k_{p,I}.

Inequality (1.12) now follows from the observation in Section2.2.