Bernoulli Numbers and The Euler-Maclaurin Summation Formula

Download as ps, pdf, or txt
Download as ps, pdf, or txt
You are on page 1of 10

Physics 116A Winter 2006

Bernoulli numbers and the Euler-Maclaurin summation formula


In this note, I shall motivate the origin of the Euler-Maclaurin summation
formula. I will also explain why the coecients on the right hand side of this
formula involve the Bernoulli numbers.
First, we dene the Bernoulli numbers B
2n
. These arise in the Taylor series ex-
pansions of xcoth(x) and xcot(x) about x = 0.

It is convenient to dene the nor-


malization of the Bernoulli numbers via the Taylor expansion of (x/2) coth(x/2)
as follows:
x
2
coth
_
x
2
_
=

k=0
B
2k
x
2k
(2k)!
, |x| < 2 . (1)
This formula only denes Bernoulli numbers with even non-negative indices. The
more common denition is based on the observation that
x
2
_
coth
_
x
2
_
1
_
=
x
e
x
1
(2)
is an identity.

Then,
x
e
x
1
=

k=0
B
k
x
k
k!
, |x| < 2 .
denes all the Bernoulli numbers with non-negative indices. Comparing the above
formulae, it follows that B
1
=
1
2
and B
2k+1
= 0 for k = 1, 2, 3, . . .. For the
remainder of this note, we will only be concerned with Bernoulli numbers of the
form B
2k
, for non-negative integers k. For the record, we list the rst six B
2k
here:
B
0
= 1 , B
2
=
1
6
, B
4
=
1
30
, B
6
=
1
42
, B
8
=
1
30
, B
10
=
5
66
, etc.
In general, the signs alternate beginning with B
2
, so that
B
2k
= (1)
k+1
|B
2k
| , for k = 1, 2, 3, . . . .

As x 0, both coth(x) and cot(x) behave as 1/x; hence we multiply by x in order to have
a function with a nite limit as x 0.

To prove this, recall that coth(x) = cosh(x)/ sinh(x) where cosh(x)


1
2
(e
x
+ e
x
) and
sinh(x)
1
2
(e
x
e
x
).
1
Given the Taylor series for xcoth(x) [expanded about x = 0], one can immedi-
ately obtain the Taylor series for xcot x by using xcot(x) = ixcoth(ix). By using
the following hyperbolic and trigonometric identities:
tanh(x) = 2 coth(2x) coth(x) , tan(x) = cot(x) 2 cot(2x) ,
csch(2x) = coth(x) coth(2x) , csc(2x) = cot(x) cot(2x) ,
one nds that the Taylor expansions about x = 0 for cot(x), tan(x), csc(x) and
the corresponding hyperbolic functions all involve the Bernoulli numbers. Note
that there are no similar identities for sech(x) and sec(x) in terms of coth(x)
and cot(x), respectively. Hence, the Taylor expansions about x = 0 of these two
functions do not involve the Bernoulli numbers.

One property of the Bernoulli numbers will be important in what follows. We


will need to know the behavior of the B
2k
as k becomes very large. We can
determine this by using the famous connection between the Bernoulli numbers
and the Riemann zeta function:
|B
2k
| =
2 (2k)! (2k)
(2)
2k
, (3)
where (2k)

n=0
(1/(2k)
n
). Note that lim
k
(2k) = 1, since in this limit
only the rst term in the series (which is equal to one) survives. Hence, using this
result in eq. (3) and employing Stirlings approximation for (2k)!,
(2k)! (4k)
1/2
(2k)
2k
e
2k
, as k ,
we end up with
|B
2k
| 4(k)
1/2
_
k
e
_
2k
, as k . (4)
With this background, we are now ready to introduce the Euler-Maclaurin
summation formula.

This formula arises in the following context. Suppose we


wish to numerically approximate an integral of the form:
I
_
k+n
k
f(x)dx,
where k is an integer and n is a positive integer. The simplest possible approxi-
mation to the integral corresponds to dividing up the interval k x k + n in
units of one, and estimating the value of the integral by computing the area of
all the rectangles of unit length that approximate the area under the curve. We
illustrate this procedure with the following graph at the top of the next page.

Instead, they require the introduction of a new type of numbers called the Euler numbers.
The explicit denition of the Euler numbers was given at the end of the handout on the Riemann
zeta function. We will not need the Euler numbers in this note.

This presentation is inspired by Jon Mathews and R.L. Walker, Mathematical Methods of
Physics, Chapter 13.
2
Here, one can either compute the area bounded by the rectangles indicated by the
solid lines or by the rectangles indicated by the dashed lines. (In this particular
example, k = 2 and n = 5.) The former underestimates the area under the curve
y = f(x), while the latter overestimates this area. That is, I
1
< I < I
2
where
I
1
= f(k + 1) + f(k + 2) + + f(k + n) ,
I
2
= f(k) + f(k + 1) + + f(k + n 1) . (5)
The trapezoidal rule for numerical integration takes the average of I
1
and I
2
. So,
we shall make the approximation I =
1
2
(I
1
+ I
2
), which we can write as:
_
k+n
k
f(x) dx
1
2
[f(k) + f(k + n)] +
n1

j=1
f(k + j) .
The Euler-Maclaurin sum formula arises when we attempt to convert the above
result into an exact formula. That is, we seek to determine an expression, R, such
that:
_
k+n
k
f(x) dx =
1
2
[f(k) + f(k + n)] +
n1

m=1
f(k + m) +R. (6)
I will show you a sophisticated, yet simple, method for determining R. You should
be forewarned that this method is slick and will gloss over some subtleties that I
will mention later. The trick is to introduce two operators called D and E. These
operators act on

a function f(x) and have very simple denitions:


Df(k) f

(k) , Ef(k) f(k + 1) , (7)

By act on, I mean that D and E operate on functions. You can think of D and E as little
machines. You feed these machines a function and they will spit out a new function.
3
where as usual, f

(k) (df/dx)
x=k
. With this notation, eq. (6) reads:
_
k+n
k
f(x) dx = [
1
2
+ E + E
2
+ + E
n1
+
1
2
E
n
]f(k) +R,
since, e.g., E
2
f(k) = E Ef(k) = Ef(k + 1) = f(k + 2), etc. Now, for the slick
part. We shall write:
1
2
+ E + E
2
+ + E
n1
+
1
2
E
n
= 1 + E + E
2
+ + E
n1

1
2
(1 E
n
)
=
1 E
n
1 E

1
2
(1 E
n
)
= (E
n
1)
_
1
2
+
1
E 1
_
, (8)
where we have summed a nite geometric series in the usual way. But, E is an
operator, so what does (1 E)
1
mean? The answer is that we are actually using
a short-hand notation. When in doubt, a function of an operator is always dened
by its Taylor series. For example, in eq. (8), (1E)
1
= 1+E+E
2
+ . This is
an innite series, so we should really worry about convergence (what does it mean
when you have an innite convergent series of operators rather than numbers?).
For the moment, I will treat these power series expansions as formal objects, and
postpone questions of convergence until later.
So, if you are willing to go along with this strategy, then we have the following
result:
_
k+n
k
f(x) dx = (E
n
1)
_
1
2
+
1
E 1
_
f(k) +R. (9)
Our next step is to consider the Taylor expansion of f(x) about x = k:
f(x) = f(k) +

m=1
f
(m)
(k)
m!
(x k)
m
.
Again, we should check for which values of x this series converges, but we will
sidestep this issue again. If we set x = k + 1 in the above expansion, we nd:
f(k + 1) =

m=0
f
(m)
(k)
m!
.
Thus, we can use our operators D and E to rewrite this as
Ef(k) =

m=0
D
m
m!
f(k) .
4
Note that this formula would be true for any function f, so we can conclude that
we have an operator identity:
E =

m=0
D
m
m!
. (10)
I hope you recognize the sum on the right hand side of eq. (10). This is the power
series expansion of e
D
. Thus, we conclude that
E = e
D
. (11)
Once again, we have introduced a strange new objectthe exponential of an
operator. As before, this is a formal denition, and you should always think of
e
D
as being equal to its Taylor series expansion [eq. (10)].
The nal step of our analysis introduces the indenite integral of f(x). Let us
call it g(x):
g(x) =
_
f(x) dx, or equivalently f(x) =
dg(x)
dx
.
In particular, g

(k) = Dg(k) = f(k). The fundamental theorem of calculus then


allows us to write:
_
k+n
k
f(x) dx = g(k + n) g(k) = (E
n
1)g(k) .
Now for the bold move. Since Dg(k) = f(k), we shall write:
g(k) =
1
D
f(k) .
This will allow us to write
_
k+n
k
f(x) dx = (E
n
1)
1
D
f(k) . (12)
We now have two dierent expressions for
_
k+n
k
f(x) dx given by eqs. (9) and
(12). Since only one of these expressions involves R, this means that we can now
solve for R. Setting eqs. (9) and (12) equal to each other, we obtain:
R = (E
n
1)
_
1
D

1
2

1
E 1
_
f(k)
= (E
n
1)
1
D
_
1 D
_
1
2
+
1
E 1
__
f(k) .
At this point, we shall substitute E = e
D
[eq. (11)] inside the brackets to obtain
R = (E
n
1)
1
D
_
1 D
_
1
2
+
1
e
D
1
__
f(k) .
5
Using the identity given by eq. (2), we can write this last result in a very suggestive
way:
R = (E
n
1)
1
D
_
1
D
2
coth
D
2
_
f(k) .
Once again, we have a function of an operator, which we are instructed to interpret
as a power series. It is at this point that the Bernoulli numbers enter. Using
eq. (1), we can write:
1
D
_
1
D
2
coth
D
2
_
=

m=1
B
2m
D
2m1
(2m)!
. (13)
Notice that at this point, we only have non-negative powers of the operator D on
the right hand side of eq. (13), which we can easily handle. Thus, we conclude
that:
R =
_
(1 E
n
)

m=1
B
2m
D
2m1
(2m)!
_
f(k) .
We can write out this expression more explicitly by using the denitions of the
operators D and E [eq. (7)]:
R =

m=1
B
2m
(2m)!
_
f
(2m1)
(k + n) f
(2m1)
(k)

.
Inserting this result back into eq. (6) yields the following remarkable formula:
_
k+n
k
f(x) dx =
n1

m=1
f(k+m)+
1
2
[f(k)+f(k+n)]

m=1
B
2m
(2m)!
_
f
(2m1)
(k + n) f
(2m1)
(k)

.
Notice that this is an exact result. Somehow, we have managed to turn a formula
that started out as an approximation to an integral into an exact result.
The nite sum

m
f(k+m) is also an interesting object, and we can reinterpret
the above result as providing a formula for this nite sum. If we write:
n1

m=1
f(k + m) +
1
2
[f(k) + f(k + n)] =
n

m=1
f(k + m)
1
2
[f(k) + f(k + n)] ,
then we end up with the Euler-Maclaurin summation formula:
n

m=1
f(k + m) =
_
k+n
k
f(x) dx +
1
2
[f(k) + f(k + n)]
+

m=1
B
2m
(2m)!
_
f
(2m1)
(k + n) f
(2m1)
(k)

.
(14)
6
It is now time to face up to the question of convergence. The Euler-Maclaurin
summation formula as presented here involves an innite sum. Given the behavior
of the Bernoulli numbers B
2m
as m [see eq. (4)], it is not surprising to
learn that in most cases of interest this is a divergent series. Our derivation has
been too slick, in that it ignored questions of convergence. In fact, one can be
more careful by replacing all innite sums encountered above by nite sums plus
remainder terms. By carefully keeping track of these remainder terms, one can
obtain a more robust version of the Euler-Maclaurin summation formula with a
remainder term explicitly included. This derivation is beyond the scope of these
notes. You can nd (the more conventional) derivation of the Euler-Maclaurin
summation formula with remainder term in the textbook by Arfken and Weber,
Mathematical Methods for Physicists. For completeness, I shall display the nal
result here:
n

m=1
f(k + m) =
_
k+n
k
f(x) dx +
1
2
[f(k) + f(k + n)]
+
p

m=1
B
2m
(2m)!
_
f
(2m1)
(k + n) f
(2m1)
(k)

+
1
(2p)!
_
1
0
B
2p
(x)
n1

m=0
f
(2p)
(x + k + m) dx, (15)
where B
2p
(x) is the Bernoulli polynomial of order 2p (dened on p. 152 of Mc-
Quarrie).
In many applications, the Euler-Maclaurin summation formula provides an
asymptotic expansion, in which case the divergent nature of the series in eq. (14) is
not problematical. In other cases, the innite sum turns out to be nite. We shall
end this note with a few applications. For our rst example, we take f(x) = x
p
and k = 0 in eq. (14). The innite sum on the right hand side of eq. (14) is
in fact nite in this case, since f
(2m1)
(x) = 0 for 2m p + 2. Evaluating the
derivatives on the right hand side of eq. (14), we can cast the resulting formula
into the following form:
n

m=1
m
p
=
1
2
n
p
+
1
p + 1
[p/2]

m=0
_
p + 1
2m
_
B
2m
n
p+12m
,
where [p/2] is the integer part of
1
2
p. For example, if p = 2 then
n

m=1
m
2
=
1
3
n
3
+
1
2
n
2
+
1
6
n =
1
6
n(n + 1)(2n + 1) ,
which reproduces a formula I derived in the rst lecture.
7
Our second application is the derivation of the asymptotic series for ln n! as
n . Here, we take f(x) = ln x, with k = 1 and n n 1 in eq. (14). The
integral in eq. (14) is easily computed:
_
n
1
ln xdx = nln n n + 1 ,
and the derivatives f
(2m1)
(x) are given by:
f
(2m1)
(x) =
(2m2)!
x
2k1
, m = 1, 2, 3, . . .
Noting that the summation on the left hand side of eq. (14) takes the following
form:
n1

m=1
ln(1 + m) = ln 1 + ln 2 + + ln n = ln(1 2 3 n) = ln n!
we can write eq. (14) as
ln n! = (n +
1
2
) ln n n + C +

m=1
B
2m
2m(2m1)
1
n
2m1
, (16)
where the constant C represents all the remaining terms of eq. (14) that are
independent of n:
C = 1

m=1
B
2m
2m(2m1)
. (17)
Unfortunately, due to the asymptotic behavior of B
2m
as m [eq. (4)], the
sum in eq. (17) is divergent. However, this is not surprising since we are using the
form of the Euler-Maclaurin summation formula without the remainder term. If
we would have included the remainder term, the summations on the right hand
sides of eqs. (16) and (17) would have been nite sums. In addition, we would
have included the n-independent part of the remainder term in the denition of
C above. In this case, the resulting expression for C would have been perfectly
well-dened and nite. In fact, one can analyze that resulting form for C and
evaluate this constant. However, this requires a number of additional tricks that
lie beyond the scope of these notes. Finally, the n-dependent part of the remainder
term would appear in eq. (16). By examining its form [c.f. eq. (15)], one can prove
that the remainder term is of O(1/n
2p
). This means that eq. (16) is indeed an
asymptotic expansion as n .
Here we shall take the simpler approach. Namely, we shall simply assume
that eq. (16) is an asymptotic expansion as n . Comparing this result with
Stirlings approximation, we conclude that C = ln 2. Thus, eq. (16) now reads:
ln n! (n +
1
2
) ln n n + ln 2 +

m=1
B
2m
2m(2m1)
1
n
2m1
, n . (18)
8
This is called Stirlings asymptotic series. Although the proof given here strictly
applies only for the case of positive integer n, there is a generalization of this
derivation that can yield the full asymptotic series for ln (x + 1) for any real
number x . Not surprisingly, the resulting asymptotic series is identical to
eq. (18) with n replaced by x.
For our third example, we choose f(x) = 1/x, with k = 1 and n n 1 in
eq. (14). Again, the integral and (2m1)-fold derivatives are easily computed:
_
n
1
dx
x
= ln n, f
(2m1)
(x) =
(2m1)!
x
2m
.
Thus,
n

m=1
1
m
= ln n + C +
1
2n

m=1
B
2m
2m
1
n
2m
, (19)
where
C =
1
2
+

m=1
B
2m
2m
.
Once again, C appears to be divergent. However, as in the previous example, a
more careful analysis including the remainder term would produce a nite expres-
sion for C and prove that eq. (19) is an asymptotic series. Thus, if we proceed
under this assumption, we can compute the constant C by taking the n
limit of eq. (19):
C = lim
n
_
n

m=1
1
m
ln n
_
= . (20)
We recognize this limit as Eulers constant. Thus, we have derived the following
asymptotic series:
n

m=1
1
m
ln n + +
1
2n

m=1
B
2m
2m
1
n
2m
, n .
By the way, we can turn this equation around and use it for an accurate numerical
computation of .
Many other nite series, summed from m = 1 to n, can be expressed in the
form of an asymptotic series as n . I will leave it to you as an exercise to
work out the asymptotic series for:
n

m=1
1
m
p
(p) +
1
n
p
_
n
1 p
+
1
2
+O
_
1
n
__
, n ,
where p > 1 and (p) is the Riemann zeta function. The O(1/n) term above can
be expressed in terms of an asymptotic series with coecients proportional to the
Bernoulli numbers, using the same techniques employed above.
9
In our nal example, we choose f(x) = (ln x)/x, with k = 1 and n n 1.
It follows that
n

m=1
ln m
m

_
n
1
ln x
x
dx + C +
ln n
2n
+O
_
ln n
n
2
_
C +
1
2
ln
2
n +
ln n
2n
+O
_
ln n
n
2
_
, (21)
where C represents the n-independent pieces of eq. (14), and the O(ln n/n
2
) re-
mainder corresponds to a sum with Bernoulli number coecients (which we do
not write out explicitly here). Thus,
C = lim
n
_
n

m=1
ln m
m

1
2
ln
2
n
_
. (22)
This result can be used to evaluate the sum
S

n=1
(1)
n
ln n
n
.
Consider the sum S
2N
made up of the rst 2N terms of the above series. We can
write:
S
2N
=
2N

n=1
(1)
n
ln n
n
=
2N

n=1
ln n
n
+ 2
N

n=1
ln 2n
2n
=
2N

n=1
ln n
n
+
N

n=1
ln n
n
+ ln 2
N

n=1
1
n
, (23)
where we have used ln(2n) = ln n + ln 2 in obtaining the second line of eq. (23).
However, eqs. (21) and (22) and eqs. (19) and (20) imply respectively that:
N

n=1
ln n
n
= C +
1
2
ln
2
N +O
_
1
N
_
,
N

n=1
1
n
= + ln N +O
_
1
N
_
.
Inserting these result into eq. (23), the constant C drops out, and we nd:
S
2N
=
1
2
ln
2
(2N) +
1
2
ln
2
N + ln 2 ( + ln N) +O
_
1
N
_
= ln 2
_

1
2
ln 2
_
+O
_
1
N
_
.
Taking the limit of N , we obtain the desired sum S = lim
N
S
2N
:

n=1
(1)
n
ln n
n
= ln 2
_

1
2
ln 2
_
.
This result (the n = 1 term does not contribute to the sum) was previously noted
in the Riemann zeta function handout.
10

You might also like