http://jipam.vu.edu.au/

Volume 3, Issue 4, Article 49, 2002

**SHARP ERROR BOUNDS FOR THE TRAPEZOIDAL RULE AND SIMPSON’S**
**RULE**

D. CRUZ-URIBE AND C.J. NEUGEBAUER DEPARTMENT OFMATHEMATICS

TRINITYCOLLEGE

HARTFORD, CT 06106-3100, USA.

david.cruzuribe@mail.trincoll.edu DEPARTMENT OFMATHEMATICS

PURDUEUNIVERSITY

WESTLAFAYETTE, IN 47907-1395, USA.

neug@math.purdue.edu

*Received 04 April, 2002; accepted 01 May, 2002*
*Communicated by A. Fiorenza*

ABSTRACT. We give error bounds for the trapezoidal rule and Simpson’s rule for “rough” con-
tinuous functions—for instance, functions which are Hölder continuous, of bounded variation, or
which are absolutely continuous and whose derivative is inL^{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 functions, the error esti-
mates for the trapezoidal rule are better (that is, have smaller constants) than those for Simpson’s
rule.

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

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

**1. I****NTRODUCTION**

**1.1. Overview of the Problem. Given a finite interval** I = [a, b] and a continuous function
f :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

ISSN (electronic): 1443-5756

c 2002 Victoria University. All rights reserved.

031-02

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 partitionIinto2nintervals, Simpson’s rule approximates the integral with the sum

(1.2) S_{2n}(f) = |I|

6n f(x_{0}) + 4f(x_{1}) + 2f(x_{2}) + 4f(x_{3})· · ·+ 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) =

S_{2n}(f)−
Z

I

f(x)dx

≤ |I|^{5}kf^{(4)}k_{∞}
180n^{4} .
(See, for example, Ralston [13].)

Typically, these estimates are derived using polynomial approximation, which leads natu- rally to the higher derivatives on the righthand sides. However, the assumption that f is not only continuous but has continuous higher order derivatives means that we cannot use them to estimate directly the error when approximating the integral of such a well-behaved function as f(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 error E_{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 constantsc_{n} are independent off, c_{n} → 0as 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(xi−1)|,

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

• W_{1}^{p}(I), 1≤ p ≤ ∞: absolutely continuous functions such thatf^{0} ∈ L^{p}(I), with norm
kf^{0}kp,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 Theorem 1.15 in Section 4 below, or see Stein and Weiss [17].)

• W_{2}^{p}(I), 1 ≤p ≤ ∞: differentiable functions such thatf^{0} is absolutely continuous and
f^{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 onC(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 of f_{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 sometimes clever
fashion: integration by parts and elementary inequalities. The idea 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 following 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 functionf, definef_{r}(x) =
f(x)−rx,r∈R, andf_{s}(x) =f(x)−s(x), wheresis any polynomial of degree at most three
such that s(0) = 0. Also, in the statements of the results, the intervals J_{i} and the points c_{i},
1≤i≤n, are defined in terms of the partition for the trapezoidal rule, and the intervalsIiand
pointsai andbi are defined in terms of the partition for Simpson’s rule. Precise definitions are
given in Section 2 below.

* 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_{Λ}_{α},
*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.2. We conjecture that inequality (1.5) is sharp, but we have been unable to construct**
an example which shows this.

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

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

* Corollary 1.4. 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)

!
.
*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.5. Inequality (1.6) was first proved by Kim and Neugebauer [9] as a corollary to a**
theorem on integral means.

* Theorem 1.6. 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.7. 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.8. 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},
*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) = d1
n

X

i=1

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

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

i(t)

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

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

i(t)

+d2t^{2}+d3t+d4,

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

**Remark 1.9. 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 equaling1 and2respectively. In this case Theorem 1.8 is a special case of Theorem
1.6 since iff is absolutely continuous it is of bounded variation, andkf^{0}k_{1,I} =kfk_{BV,I}.

**Remark 1.10. When**1< p <∞we can restate Theorem 1.8 in a form analogous to Theorem
1.6. We define the spaceBV_{p} of functions of boundedp-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}}ofI. Thenf ∈BV_{p} if and only if it
is absolutely continuous andf^{0} ∈ L^{p}(I), andkfkBVp,I =||f^{0}||p,I. This characterization is due
to F. Riesz; see, for example, Natanson [10].

**Remark 1.11. When** p = ∞, Theorem 1.8 is equivalent to Theorem 1.1 with α = 1, since
f ∈ W_{1}^{∞}(I) if and only iff ∈ Λ_{1}(I), and kf^{0}k∞,I = kfk_{Λ}_{1}_{,I}. (See, for example, Natanson
[10].)

**Remark 1.12. Inequality (1.12), with**r= 0andp > 1was independently proved by Dragomir
[5] as a corollary to a rather lengthy general theorem. Very recently, we learned that Dragomir
*et al. [4] gave a direct proof similar to ours for (1.12) for all*p but still withr = 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.13. 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 replaced by*n^{a}*for any*
a >1.

**Remark 1.14. Unlike most of our proofs, the proof of Theorem 1.13 requires that we approxi-**
matef by smooth functions. It would be of interest to find a proof of this result which avoided
this.

* Theorem 1.15. 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.16. When**p=qthen Theorem 1.15 reduces to Theorem 1.8.

**Remark 1.17. Theorem (1.15) 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.

**Remark 1.18. The constant in (1.19) is considerably more complicated than that in (1.18); the**
functionC(u, v)can be rewritten in terms of the Beta function and the hypergeometric function

2F_{1}, but the resulting expression is no simpler. (Details are left to the reader.) However it is easy
to show thatC(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.19. 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−c_{i})^{2}
p^{0}−1

χ_{J}_{i}(t),

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

(1.23) f^{00}(t) =d_{1}

n

X

i=1

|I_{i}|^{2}

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

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

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

p^{0}−1

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

+
|I_{i}|^{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 intervalsI˜_{i}^{j}*,* 1≤j ≤ 4, defined in (5.2) below, are such that
*the corresponding functions are positive.*

**Remark 1.20. When** p = 1, p^{0} = ∞, and we interpret B(p^{0} + 1, p^{0} + 1)^{1/p}^{0} as the limiting
value1/4. This follows immediately from the identityB(u, v) = Γ(u)Γ(v)/Γ(u+v)and from
Stirling’s formula. (See, for instance, Whittaker and Watson [20].)

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

**Remark 1.22. Like the function**C(u, v)in Theorem 1.15, the functionD(u, v)can be rewritten
in terms of the Beta function and the hypergeometric function 2F_{1}. However, the resulting
expression does not seem significantly better, and details are left to the reader.

Prior to Theorem 1.19, 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 for E_{2n}^{S}(f). (We use
E_{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 calculations show that, for instance, whenp = 10/9, the constant in (1.20) is smaller, but when p = 10, (1.21) has the smaller constant. Furthermore, the following analogue of Theorem 1.13 shows that though the constants in Theorem 1.19 are sharp, Simpson’s rule is asymptotically better than the trapezoidal rule.

* Theorem 1.23. 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.24. (Added in proof.) Given Theorems 1.13 and 1.23, it would be interesting to*
compare the asymptotic behavior of E

_{n}

^{T}(f) and E

_{2n}

^{S}(f) for extremely rough functions, say those inΛ

_{α}(I)andCBV(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.)

**1.3. Organization of the Paper. The remainder of this paper is organized as follows. In Sec-**tion 2 we make some preliminary observations and define notation that will be used in all of our proofs. In Section 3 we prove Theorems 1.1 and 1.6 and Corollary 1.4. In Section 4 we prove Theorems 1.8, 1.13 and 1.15. In Section 5 we prove Theorems 1.19 and 1.23.

Throughout this paper all notation is standard or will be defined when needed. Given an
interval I, |I| will denote its length. Given p, 1 ≤ p ≤ ∞, p^{0} will denote the conjugate
exponent: 1/p+ 1/p^{0} = 1.

**2. P****RELIMINARY****R****EMARKS**

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 ofn + 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) Li =

Z

J_{i}^{−}

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

Z

J_{i}^{+}

f(xi)−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,

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

(2.4) L_{i} = 1

2 Z

Ji

|Ji|^{2}

4 −(t−c_{i})^{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. Given I, we form a partition with 2n+ 1 points,xj =a+j|I|/2n,0≤j ≤2n, and form the intervalsIi = [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 partition I_{i} into four intervals of different
lengths. Define

ai = 2x_{2i−2}+x_{2i−1}

3 bi = 2x_{2i}+x_{2i−1}

3 ,

and let

I_{i}^{1} = [x2i−2, a_{i}], I_{i}^{2} = [a_{i}, x2i−1], I_{i}^{3} = [x2i−1, b_{i}], I_{i}^{4} = [b_{i}, x_{2i}].

Then|I_{i}^{1}|=|I_{i}^{4}|=|I|/6nand|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(x_{2i})−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}^{+}

|I_{i}|^{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}|.

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) S_{2n}(f) = 4

3T_{2n}(f)−1
3T_{n}(f).

**2.2. Modifying the Norm. In all of our results, we estimate the error in the trapezoidal rule**
with an expression of the form

infr kf_{r}k,

where the infimum is taken over allr ∈ R. It will be enough to prove the various inequalities
withkfkon 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 withkfkon the
righthand side instead ofinf_{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}), fors(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].)

**3. F****UNCTIONS IN**Λ_{α}**(I),**0< α≤1, **AND**CBV(I)

*Proof of Theorem 1.1. We first prove inequality (1.4). By (2.2), for each*i,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}^{−}

|xi−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 Section 2.2 we 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+α} ,
which in turn implies (1.5).

To see that inequality (1.4) is sharp, fix n ≥ 1 and 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 extend f to the interval [0,1] as a periodic function with period 1/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.4. Inequalities (1.6) and (1.7) follow immediately from (1.4) and (1.5).*

Recall that iff ∈Λ_{1}(I), thenf is differentiable almost everywhere,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),
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 1.** M >0andm =−M. In this case,

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

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−ci)f^{0}(t)dt

+ Z

J_{i}^{+}

(t−ci)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}
8nM,

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.

Hence, by (3.2), onJi

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

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

i (t),

with eitherα_{i}, β_{i} >0for alli, orα_{i}, β_{i} <0for alli. 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 Case 1.

**Case 2. The general case:**m < M. Letr= (M +m)/2; then
E_{n}^{T}(f) = |I|^{2}

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

Since Case 1 applies tof_{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 sincef^{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.6. We first prove (1.10). By (2.2) and the definition of the norm in*CBV(I),
for eachi,1≤i≤n,

|L_{i}| ≤
Z

J_{i}^{−}

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

J_{i}^{+}

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

≤ 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 Section 2.2.

To show that inequality (1.10) is sharp, fixn ≥1and fork ≥1definea_{k}= 4^{−k}/n. We now
define the functionf_{k}onI = [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− ^{1}_{n}

a_{n}
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 that
kf_{k}k_{BV,[0,1]} = 2n. Furthermore,

E_{n}^{T}(f_{k}) =

T_{n}(f_{k})−
Z 1

0

f_{k}(t)dt

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

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 constant 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}.

Sincef is non-constant, chooseisuch thatf is not constant onJ_{i}. Sincef is continuous, the
function|f(xi−1) +f(x_{i})−2f(t)|achieves its maximum at somet ∈ J_{i}, and, again because

f 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(x_{i})−2f(t)|<kfk_{BV,J}_{i}, and so (3.4) follows
from (2.1), since we can rewrite this as

L_{i} = 1
2

Z

Ji

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

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

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

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

Iff(t)were not of the formmt+b, so thatfr0 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 function f_{k} on I = [0,1]as
follows: on[0,1/n]let

f_{k}(x) =

0 0≤x≤ 1

2n −a_{n}
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 +a_{n}≤x≤ 1
n.

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

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.

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

**4. F****UNCTIONS IN**W_{1}^{p}(I)**AND**W_{1}^{pq}(I),1≤p, q ≤ ∞

*Proof of Theorem 1.8. As we noted in Remarks 1.9 and 1.11, it suffices to consider the case*
1< p <∞.

We first prove inequality (1.12). If we apply Hölder’s inequality to (2.3), then for all i, 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 = |Ji|^{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 Section 2.2.

The proof of inequality (1.13) is essentially the same as the proof of inequality (1.12), begin- ning instead with (2.8) and using the fact that

Z

I_{i}^{−}

|t−a_{i}|^{p}^{0}dt+
Z

I_{i}^{+}

|t−b_{i}|^{p}^{0}dt = 2(1 + 2^{p}^{0}^{+1})|I|^{p}^{0}^{+1}
(p^{0}+ 1)6^{p}^{0}^{+1}n^{p}^{0}^{+1}.

We will now show that inequality (1.12) is sharp. We writeL_{i} =L^{+}_{i} +L^{−}_{i} , where

(4.1) L^{+}_{i} =

Z

J_{i}^{+}

(t−ci)f^{0}(t)dt, L^{−}_{i} =
Z

J_{i}^{−}

(t−ci)f^{0}(t)dt.

Also note that

Z

J_{i}^{+}

(t−c_{i})^{p}^{0}dt=
Z

J_{i}^{−}

(c_{i}−t)^{p}^{0}dt= |I|^{p}^{0}^{+1}
(p^{0} + 1)(2n)^{p}^{0}^{+1}.
We first assume thatf^{0} has the desired form. A pair of calculations shows that

E_{n}^{T}(f) = 2|d_{1}| |I|^{p}^{0}^{+1}n

(p^{0}+ 1)(2n)^{p}^{0}^{+1}, kf^{0} −d_{2}k_{p,I} =|d_{1}| |I|^{(p}^{0}^{+1)/p}(2n)^{1/p}
(p^{0}+ 1)^{1/p}(2n)^{(p}^{0}^{+1)/p},
and since

p^{0}+ 1

p =p^{0}− 1

p^{0}, and 2n

(2n)^{p}^{0} = 1
(2n)^{p}^{0}^{−1},
we have the desired equality.

To show the converse, we first consider when equality holds withr= 0. Observe that by the above argument,

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

n

X

i=1

Li

=

n

X

i=1

(L^{+}_{i} +L^{−}_{i} )

≤

n

X

i=1

|L^{+}_{i} |+

n

X

i=1

|L^{−}_{i} |

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

n

X

i=1

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

i +kf^{0}k_{p,J}^{−}

i

≤ |I|^{1+p}^{0}

(p^{0}+ 1)^{1/p}^{0}(2n)^{1+1/p}^{0}kf^{0}kp,I(2n)^{1/p}^{0}

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

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

Since the first and last terms are equal, each inequality must be an equality. Hence allL^{+}_{i} and
L^{−}_{i} have the same sign; without loss of generality we may assume they are all positive. By the
criterion for equality in Hölder’s inequality onJ_{i}(see, for example, Rudin [16, p. 63]),

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

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

i (t),
whereαi, βi >0. (Here we used the assumption thatL^{+}_{i} , L^{−}_{i} >0.)

Next we claim thatα_{1} =β_{1} =· · ·=α_{n} =β_{n}. To see this, first note that
E_{n}^{T}(f) =

n

X

i=1

Z

J_{i}^{+}

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

J_{i}^{−}

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

!

=

n

X

i=1

(αi+βi) |I|^{p}^{0}^{+1}
(p^{0}+ 1)(2n)^{p}^{0}^{+1},
and this equals

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

(p^{0}+ 1)^{1/p}^{0}kf^{0}k_{p,I} = |I|^{1+1/p}^{0}
(p^{0}+ 1)^{1/p}^{0}2n

n

X

i=1

(α^{p}_{i} +β_{i}^{p}) |I|^{p}^{0}^{+1}
(p^{0} + 1)(2n)^{p}^{0}^{+1}

!1/p

=

n

X

i=1

(α_{i}^{p}+β_{i}^{p})

!1/p

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

Since1 + 1/p^{0}+ (p^{0}+ 1)/p=p^{0}+ 1and2n(2n)^{(p}^{0}^{+1)/p} = (2n)^{p}^{0}^{+1−1/p}^{0}, it follows that

n

X

i=1

(α_{i}+β_{i}) =

n

X

i=1

(α^{p}_{i} +β_{i}^{p})

!1/p

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

This is equality in Hölder’s inequality for series, which occurs precisely when all theα_{i}’s and
β_{i}’s are equal. (See, for example, Hardy, Littlewood and Pólya [8, p. 22].) This establishes
when equality holds whenr = 0.

Finally, as we observed in Section 2.2, inf_{r}kf_{r}^{0}k_{p,I} = kf_{r}^{0}_{0}k_{p,I} for some r_{0} ∈ R. Since
E_{n}(f) =E_{n}(f_{r}_{0})we conclude that (1.12) holds if and only if (1.14) holds.

The proof that (1.13) is sharp and that equality holds if and only if (1.15) holds is essentially

the same as the above argument and we omit the details.

*Proof of Theorem 1.13. We first prove the limit (1.16) for*f ∈C^{1}(I). DefineL^{−}_{i} andL^{+}_{i} as in
(4.1), and define the four values M_{i}^{±} = max{f^{0}(t) : t ∈ J_{i}^{±}}, m^{±}_{i} = min{f^{0}(t) : t ∈ J_{i}^{±}}.

Then, since

Z

J_{i}^{+}

(t−c_{i})dt = 1
8

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

Z

J_{i}^{−}

(c_{i}−t)dt,
we have that

m^{+}_{i} |I|^{2}

8n^{2} ≤L^{+}_{i} ≤M_{i}^{+}|I|^{2}

8n^{2}, −M_{i}^{−}|I|^{2}

8n^{2} ≤L^{−}_{i} ≤ −m^{−}_{i} |I|^{2}
8n^{2}.
Hence,

|I|^{2}

8n (m^{+}_{i} −M_{i}^{−})≤nL_{i} ≤ |I|^{2}

8n (M_{i}^{+}−m^{−}_{i} );

this in turn implies that

(4.2) |I|

8

n

X

i=1

|I|

n (m^{+}_{i} −M_{i}^{−})≤n

n

X

i=1

L_{i} ≤ |I|

8

n

X

i=1

|I|

n (M_{i}^{+}−m^{−}_{i} ).

Sincef^{0} ∈C(I),

n→∞lim

n

X

i=1

|I|

n (M_{i}^{+}−m^{−}_{i} ) =
Z

I

f^{0}(t)dt−
Z

I

f^{0}(t)dt= 0.

Similarly, the left side of (4.2) converges to 0 asn → ∞. This yields (1.16) iff ∈C^{1}(I).

We will now show that (1.16) holds in general. If 1 < p ≤ ∞, W_{1}^{p}(I) ⊂ W_{1}^{1}(I), so we
may assume without loss of generality thatp = 1. Fixε > 0and chooseg ∈ C^{1}(I)such that
kf^{0}−g^{0}k_{1,I} ≤2ε/|I|. Then

(4.3) E_{n}^{T}(f)≤E_{n}^{T}(g) +E_{n}^{T}(f −g).

If we let

(4.4) φn(t) =

n

X

i=1

(t−ci)χJi(t), then

E_{n}^{T}(f−g) =
Z

I

φ_{n}(t)(f^{0}−g^{0})(t)dt
.
Hence,

|nE_{n}^{T}(f −g)| ≤nkf^{0}−g^{0}k_{1,I}kφ_{n}k∞,I ≤ε.

Therefore, by (4.3) and the special case above, 0≤lim sup

n→∞

nE_{n}^{T}(f)≤ε;

sinceε >0is arbitrary, we get that (1.16) holds.

We can prove (1.17) in essentially the same way, beginning by rewriting (2.8) as
K_{i} =

Z

I_{i}^{1}

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

I_{i}^{2}

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

I_{i}^{3}

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

I_{i}^{4}

(t−b_{i})f^{0}(t)dt,
where the intervals I_{j}, 1 ≤ j ≤ 4, are defined as in (2.7). Alternatively, it follows from the
identity (2.11), the triangle inequality, and (1.16):

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

S_{2n}(f)−
Z

I

f(t)dt

≤ 4 3

T2n(f)− Z

I

f(t)dt

+ 1 3

Tn(f)− Z

I

f(t)dt

= 4

3E_{2n}^{T} (f) + 1

3E_{n}^{T}(f).

To see that (1.16) is sharp, fixa > 1; without loss of generality we may assume a = 1 +r, 0< r <1.

We define a functionf on[0,1]as follows: forj ≥ 1define the intervalsI_{j} = (2^{−j},2^{−j+1}].

Define the function

g(t) =

∞

X

j=1

2^{(1−r)j}χ_{I}_{j}.

It follows immediately thatg ∈L^{p}[0,1]if1≤p <1/(1−r). Now definef by
f(t) =

Z t 0

g(s)ds;

thenf ∈W_{1}^{p}[0,1]forpin the same range.