Euler-Maclaurin Formula: 1 Bernoulli Numbers
Euler-Maclaurin Formula: 1 Bernoulli Numbers
Michael S. Floater
May 2, 2019
1 Bernoulli numbers
We start by defining the Bernoulli numbers Bn , n = 0, 1, 2, . . .. We define
them as the coefficients in the expansion
X xj ∞
x
= Bj .
ex − 1 j=0
j!
Thus,
1 1
B1 = − B0 = − ,
2 2
1
1 1
B2 = − (B0 + 3B1 ) = ,
3 6
1
B3 = − (B0 + 4B1 + 6B2 ) = 0,
4
n 0 1 2 3 4 5 6
Bn 1 -1/2 1/6 0 -1/30 0 1/42
We will show that Bn = 0 for n ≥ 3 and n odd. This follows from the
fact that
x
f (x) := x − (B0 + B1 x)
e −1
is symmetric, i.e., f (x) = f (−x). To show this observe that the constant B0
is trivially symmetric, and so it is sufficient to show that
x x x(ex + 1)
g(x) := + =
ex − 1 2 2(ex − 1)
−x(e−x + 1) −x(1 + ex )
g(−x) = = = g(x).
2(e−x − 1) 2(1 − ex )
2 Bernoulli polynomials
We define the Bernoulli polynomial of degree n ≥ 0 as
n
X n
Bn (t) = Bj tn−j .
j=0
j
2
So
B0 (t) = 1,
1
B1 (t) = t − ,
2
1
B2 (t) = t2 − t + ,
6
3 1
B3 (t) = t3 − t2 + t,
2 2
1
B4 (t) = t4 − 2t3 + t2 − ,
30
5 5 1
B5 (t) = t5 − t4 + t3 − t,
2 3 6
5 1 1
B6 (t) = t6 − 3t5 + t4 − t2 + ,
2 2 42
and so on. From the definition and using (1) we deduce the following prop-
erties:
• Endpoint property:
n
X n
Bn (1) = Bj = Bn = Bn (0), n ≥ 2.
j=0
j
• Differentiation:
n−1
X n
Bn0 (t) = (n − j) Bj tn−j−1 = nBn−1 (t), n ≥ 1.
j=0
j
• Integration:
Z 1 Z 1
1 0
Bn (t) dt = Bn+1 (t) dt = 0, n ≥ 1.
0 n+1 0
3
To do this we use Fourier series. We define
bn (t) = Bn (t − j),
B j ≤ t ≤ j + 1, j ∈ Z,
n!
Bn(j) (t) = Bn−j (t), j = 0, 1, . . . , n, n ≥ 1,
(n − j)!
The coefficients of B
bn are
Z 1
ck = Bn (t)e−2πikt dt.
0
We find Z 1
c0 = Bn (t) dt = 0, n ≥ 1,
0
and for k 6= 0,
1 Z 1
e−2πikt
ck = Bn (t) +n Bn−1 (t)e−2πikt dt =
−2πik 0 0
Z 1
n! −n!
··· = n−1
B1 (t)e−2πikt dt = = ak + ibk .
(2πik) 0 (2πik)n
4
It follows that a0 = b0 = 0 and for k 6= 0,
(2r)!
ak = (−1)r−1 , bk = 0, if n = 2r,
(2πk)2r
(2r − 1)!
ak = 0, bk = (−1)r , if n = 2r − 1.
(2πk)2r−1
We now deduce that
∞
b2r (t) = (−1)r−1 2(2r)!
X cos(2πkt)
B ,
k=1
(2πk)2r
and ∞
b2r−1 (t) = (−1)r 2(2r − 1)!
X sin(2πkt)
B 2r−1
.
k=1
(2πk)
From this we obtain the claimed upper bound since
∞
X 1
|B
b2r (t)| ≤ 2(2r)! = |B
b2r (0)| = |B2r |.
k=1
(2πk)2r
where Z 1
1
Rr := B2r+2 (t)F (2r+2) (t) dt.
(2r + 2)! 0
5
Proof. Using integration by parts twice,
Z 1 Z 1 h i1 Z 1
F (t) dt = B0 (t)F (t) dt = B1 (t)F (t) − B1 (t)F 0 (t) dt
0 0 0 0
1 1
Z
1 1 h
0
i 1
= (F (0) + F (1)) − B2 (t)F (t) + B2 (t)F 00 (t) dt
2 2 0 2 0
1 B2 0
= (F (0) + F (1)) − (F (1) − F 0 (0)) + R0 ,
2 2
which proves the lemma in the case r = 0. Otherwise, suppose r ≥ 1, and
assume that the lemma holds with r replaced by r − 1. Then again using
integration by parts twice,
Z 1
1
Rr−1 = B2r (t)F (2r) (t) dt
(2r)! 0
Z 1
1 h
(2r)
i1 1
= B2r+1 (t)F (t) − B2r+1 (t)F (2r+1) (t) dt
(2r + 1)! 0 (2r + 1)! 0
Z 1
1 h
(2r+1)
i 1 1
=− B2r+2 (t)F (t) + B2r+2 (t)F (2r+2) (t) dt
(2r + 2)! 0 (2r + 2)! 0
1
=− (F (2r+1) (1) − F (2r+1) (0)) + Rr ,
(2r + 2)!
The Bernoulli polynomial B2r+2 (t) in the remainder term Rr is not of one
sign, so we cannot apply the mean value theorem. However, we can fix this
by combining Rr with the last term in the expansion.
Lemma 2 For r ≥ 0 and F ∈ C 2r+2 [0, 1], there is some ξ ∈ (0, 1) such that
Z 1 r
1 X B2k
F (t) dt = (F (0) + F (1)) − (F (2k−1) (1) − F (2k−1) (0)) − R,
0 2 k=1
(2k)!
where
B2r+2
R= F (2r+2) (ξ).
(2r + 2)!
6
Proof. The last term in the expansion in Lemma 1 plus the remainder can
be written as
B2r+2
− (F (2r+1) (1) − F (2r+1) (0)) + Rr
(2r + 2)!
Z 1
B2r+2
=− F (2r+2) (t) dt + Rr = −R,
(2r + 2)! 0
where Z 1
1
R := (B2r+2 − B2r+2 (t))F (2r+2) (t) dt.
(2r + 2)! 0
Using the upper bound on B2r (t) of the previous section, the difference B2r −
B2r (t) is of one sign in [0, 1], because
sgn(B2r )(B2r − B2r (t)) = |B2r | − sgn(B2r )B2r (t) ≥ |B2r | − |B2r (t)| ≥ 0.
where
n−1
h X
T (h) = (f (a) + f (b)) + h f (xi ),
2 i=1
and
B2r+2
R= (b − a)h2r+2 f (2r+2) (ξ).
(2r + 2)!
7
Proof. Let F (t) = f (xi−1 + ht), t ∈ [0, 1], i = 1, . . . , n. Then Lemma 2 gives
Z xi Z 1
f (x) dx = h F (t) dt =
xi−1 0
r
h X B2k 2k (2k−1)
(f (xi−1 ) + f (xi )) − h (f (xi−1 ) − f (2k−1) (xi )) − Ri ,
2 k=1
(2k)!
where
B2r+2 2r+3 (2r+2)
Ri = h f (ξi )
(2r + 2)!
for some ξi ∈ (xi−1 , xi ). Summing this equation over i = 1, . . . , n yields the
desired expansion except that the remainder term is
n n
X B2r+2 2r+3 X (2r+2)
R= Ri = h f (ξi ).
i=1
(2r + 2)! i=1
for some ξ ∈ (a, b), and this leads to the remainder term as claimed. 2
5 Applications
5.1 Endpoint corrections
We can view the endpoint derivatives in the Euler-Maclaurin expansion as
correction terms that greatly improve the accuracy of the trapezoidal rule, if
they are available. From Theorem 1 we have
as h → 0.
8
5.2 Superconvergence of the trapezoidal rule
For some functions, the trapezoidal rule itself has higher accuracy than usual.
Corollary 2 Suppose r ≥ 0 and f ∈ C 2r+2 [a, b]. If f (2k−1) (b) = f (2k−1) (a)
for k = 1, . . . , r, then
Z b
f (x) dx = T (h) + O(h2r+2 ) as h → 0.
a
This we will be the case for any r ≥ 0 for functions f ∈ C ∞ (R) that are
periodic with period b − a. In fact for some functions of this type, the
trapezoidal rule is exact.
Theorem 2 Let [a, b] = [0, 2π] and let
n−1
X n−1
X
f (x) = ak cos(kx) + bk sin(kx),
k=0 k=1
So if k = 0,
T (h) = hn = 2π,
and if 1 ≤ k ≤ n − 1,
n−1
X e2kiπ − 1
T (h) = h (e2kiπ/n )j = h = 0.
j=0
e2kiπ/n − 1
2
9
5.3 Sums of p-th powers
We can also use the expansion to obtain a formula for sums of p-th powers.
Corollary 3 For p ≥ 1,
n−1
X 1
jp = (Bp+1 (n) − Bp+1 ).
j=1
p+1
10
and therefore,
n−1 r
np+1
X
p 1 p 1 X p+1
j = − n + B2k np−2k+1
j=1
p + 1 2 p + 1 k=1
2k
p
1 X p+1
= Bk np−k+1
p + 1 k=0 k
1
= (Bp+1 (n) − Bp+1 ).
p+1
2
11