Background Notes 0.5. Replacing Sums by Integrals II

Background Notes 0.5.
Replacing Sums by Integrals II
Theorem 1 Abel or Partial Summation (Discrete Version) For integers N ≥ M ≥ 0 we have
N
X
a (r) f (r) =
r=M +1
N
X
A (r) (f (r) − f (r + 1))
r=M +1
+A (N ) f (N ) − A (M ) f (M )
where A(n) =
Pn
r=1
a (r) (A (0) = 0).
Theorem 2 Abel or Partial
P Summation (Continuous Version) Let
g : N → C and set G (x) = n≤x g (n). Let f be a differentiable function on
x ≥ 1. Then
Z x
X
g (d) f (d) = f (x) G (x) −
G (t) f 0 (t) dt.
1
1≤d≤x
Proof The proof is an exercise in the interchange of a finite sum and a finite
integral. Start with the simple observation
Z x
f (d) = f (x) − (f (x) − f (d)) = f (x) −
f 0 (t) dt.
d
Then, multiplying by g (d) and summing over d ≤ x gives
Z x
X
X
0
g (d) f (d) =
g (d) f (x) −
f (t) dt
1≤d≤x
d
1≤d≤x
= f (x) G (x) −
X
1≤d≤x
The second term here can be written as
X Z x
g (d) f 0 (t) dt.
1≤d≤x 1
d≤t
1
Z
g (d)
d
x
f 0 (t) dt.
Finite integrals and sums can be interchanged to give
Z x X
Z x
Z
X
0
0
f (t)
g (d) f (t) dt =
g (d) dt =
1
1
1≤d≤x
d≤t
x
G (t) f 0 (t) dt
1
1≤d≤t
as required.
Problem 3 Let ζ ∈ C, |ζ| = 1 and ζ 6= 1. Show that
ζ − ζ N +1
.
G (N ) =
ζ =
1−ζ
1≤n≤N
X
n
Deduce that
|G (N )| ≤
2
|1 − ζ|
for all N ≥ 1.
Use Abel Summation with x = N to show that
Z N
X ζn
G (N )
G (t)
=
+s
dt.
s
s
n
N
t1+s
1
1≤n≤N
Deduce that
∞
X
ζn
n=1
ns
converges for all Res > 0.
Compare this to an example above, for when ζ = 1 the series converges
if, and only if, σ > 1.
P
P
Problem 4 Let π (x) = p≤x 1 and ϑ (x) = p≤x log p where the sums are
over primes. Show that for x ≥ 2 we have
Z x
ϑ (t)
ϑ (x)
π (x) =
+
2 dt
log x
2 t log t
and
Z
ϑ (x) = π (x) log x −
2
Hint: Write π (x) =
P
n≤x
x
π (t)
dt.
t
an where an = 1 is n is prime, 0 otherwise.
2
The simplest application of partial summation is when g (d) = 1 for all
integers d, when G (x) = [x], the greatest integer ≤ x (called the integer
part of x). Partial Summation then gives
Z x
X
[t] f 0 (t) dt.
f (d) = f (x) [x] −
1
1≤d≤x
The discontinuous function [x]
P can be approximated by the continuous function x. Doing this, the sum 1≤d≤x f (d) is then approximated by
Z
f (x) x −
x
Z
0
x
f (t) dt + f (1) ,
tf (t) dt =
1
1
P
the equality following by partial integration. So we see how the sum 1≤d≤x f (d)
Rx
is approximated by the integral 1 f (t) dt. But replacing [x] by x has incurred an error. Let {x} = x − [x], the fractional part of x. Then we
have
Z x
Z x
X
{t} f 0 (t) dt − f (x) {x} .
f (t) dt + f (1) =
f (d) −
1
1
1≤d≤x
For the fractional part we only know that for general x, 0 ≤ {x} ≤ 1. In
which case
Z x
Z x
X
|{t} f 0 (t)| dt + |f (x) {x}|
f (t) dt + f (1) ≤
f (d) −
1
1
1≤d≤x
Z x
≤
|f 0 (t)| dt + |f (x)| .
1
If f is monotonic then f 0 (t) is of constant sign for all t, so
Z x
Z x
|f 0 (t)| dt = f 0 (t) dt = |f (x) − f (1)| .
1
1
Combining, we see that for monotonic functions f , we have
Z x
X
f (d) −
f (t) dt ≤ 2 (|f (x)| + |f (1)|) .
1
1≤d≤x
This is in fact weaker than we saw earlier in Section 0.1. But we can do
better, since x is not necessarily the ‘best’ continuous approximation to [x].
3
The function {x} = x − [x] is periodic with period 1. And though it is
always small its average is not zero. By average we mean the integral over a
period, and because
Z α+1
1
{t} dt = ,
2
α
for any α, the average value of {t} is 1/2. This suggests that we subtract
1/2 from
R α+1{t} and consider P1 (t) = {t} − 1/2. This function has average 0
since α P1 (t) dt = 0 for any α. In fact the first Bernoulli Polynomial
is defined to beB1 (t) = t − 1/2 and so what we have called P1 (t) is, in fact,
B1 ({t}). We are interested in the integral of P1 over any interval. This can
be calculated as in
Z
x
P1 (t) dt =
0
[x] Z
X
=
P1 (t) dt
[x]
Z
x
(t − [x] − 1/2) dt
0+
[x]
x−[x]
Z
(t − 1/2) dt =
=
0
=
x
P1 (t) dt +
n=1
Z
Z
n−1
n=1
[x]
X
n
{x}
P1 (t) dt
0
{x} (1 − {x})
.
2
It is easily checked that the maximum of u(1 − u)/2 for 0 ≤ u ≤ 1 is 1/8 at
u = 1/2. Hence
Z x
1
(1)
0≤
B1 ({t}) dt ≤
8
0
for all x > 0. It will be necessary for later to note that this integral is 0 when
x is an integer.
Rx
Problem 5 Show that the average value of 0 B1 ({t}) dt is 1/12.
Hint Calculate
Z Z
1
x
B1 ({t}) dtdx.
0
0
Using what we hope is a better approximation to [t], Partial Summation
4
with g(d) = 1 for all d and x = N an integer, states
Z N
X
[t] f 0 (t) dt
f (d) = f (N ) N −
1
1≤d≤N
N
Z
(t − 1/2 − B1 ({t})) f 0 (t) dt
= f (N ) N −
1
= f (N ) N − [(t − 1/2) f
(t)]N
1
Z
N
Z
f (t) dt +
+
N
Z
B1 ({t}) f 0 (t) dt
1
1
1
1
=
f (N ) + f (1) +
2
2
N
N
Z
B1 ({t}) f 0 (t) dt.
f (t) dt +
1
(2)
1
This is Euler’s Summation Formula and is the simplest
R N form of the
Euler-Maclaurin Summation Formula. If we look upon 1 B1 ({t}) f 0 (t) dt
RN
as being an error we see that 1 f (t) dt is in fact an approximation to the
P
P
sum 01≤d≤N f (d) where the 0 means that the end values, f (1) and f (N )
are halved. This is something seen often in numerical analysis where one
gets a better approximation to a trapezium than a rectangle.
RN
Question. What to do with the error term 1 B1 ({t}) f 0 (t) dt?
R∞
Assume first that the integral 1 B1 ({t}) f 0 (t) dt converges. This means
first that B1 ({t}) f 0 (t) → 0 as t → ∞, and thus f 0 (t) → 0 as t → ∞. Next,
write
Z ∞
Z ∞
Z N
0
0
B1 ({t}) f 0 (t) dt,
B1 ({t}) f (t) dt −
B1 ({t}) f (t) dt =
1
1
N
and substitute in (2) to get
1
f (d) = f (N ) + γ f +
2
1≤d≤N
Z
1
=
f (1) +
2
Z
1
f (1) +
2
Z
= f (1) +
Z
X
N
Z
∞
f (t) dt −
1
B1 ({t}) f 0 (t) dt,
N
where
γf
∞
B1 ({t}) f 0 (t) dt
1
∞
({t} − 1/2) f 0 (t) dt
=
1
∞
{t} f 0 (t) dt
1
5
(3)
is a constant. For the error term in (3) use integration by parts:
Z t
∞
Z ∞
0
0
B1 ({t}) f (t) dt =
B1 ({u}) du f (t)
N
N
N
Z ∞ Z
t
−
N
B1 ({u}) du f 00 (t) dt.
N
The first term is zero since f 0 (t) → 0 as t → ∞. For the second term use (1)
to say
Z ∞ Z t
Z
1 ∞ 00
00
B1 ({u}) du f (t) dt ≤
|f (t)| dt.
8
N
N
N
00
Further, if f (t) is of constant sign, at least for all large t, then for sufficiently
large N we have
Z ∞
Z ∞
00
00
f (t) dt = |f 0 (N )| .
|f (t)| dt = N
N
So, in this case, the Euler’s Summation Formula gives
Z N
X
f 0 (N )
1
f (d) −
f (t) dt − γ f − f (N ) ≤
.
2
8
1
1≤d≤N
Problem 6 Use this method to show that there exists a constant γ such that
N
X 1
1 1
− log N − γ −
.
≤
d
2N 8N 2
d=1
Note, this says that γ can be approximated by
N
X
1
d=1
d
− log N −
1
,
2N
with an error no larger that 1/8N 2 . For example, with N = 1000 we get
an approximation of 0.577215581.., which can be wrong by no more that
1/8000000 = 0.000000125. Thus
γ ∈ [0.577215456, 0.577215706] .
In fact, γ = 0.577215663... and it is called Euler’s constant. (Some times
Euler-Masheroni constant).
P
1
If we were to calculate γ using just N
d=1 d − log N the error may be as
large as 1/2N + 1/8N 2 . In fact N = 1000 here gives an approximation of
0.577715581... which is only correct to the first 3 decimal places.
6
Problem 7 Use this method to show that for a fixed k ≥ 1,
k N
X
logk d
logk+1 N
log N
=
+ Ck + O
d
k+1
N
d=1
where
Z
∞
{t}
Ck =
1
(k − log t) logk−1 t
dt.
t2
R∞
It may be that the integral 1 B1 ({t}) f 0 (t) dt does not converge. To
RN
deal with 1 B1 ({t}) f 0 (t) dt in (2) integrate by parts to get
Z t
N Z N Z t
0
B1 ({u}) du f (t) −
B1 ({u}) du f 00 (t) dt.
0
1
1
0
The first term is zero because N is an integer. For the second term assume
the integral over t completed to ∞converges, in which case f 00 (t) → ∞ as
t → ∞. Then replace the integral over [1, N ] by one over [1, ∞] and we have
Z ∞ Z t
Z N
X
1
B1 ({u}) du f 00 (t) dt,
f (t) dt +
f (d) = f (N ) + Cf +
2
N
0
1
1≤d≤N
(4)
where
Z ∞ Z t
1
Cf = f (1) −
B1 ({u}) du f 00 (t) dt
2
1
0
is a constant. The error in (j) is now
Z
1 ∞ 00
≤
|f (t)| dt,
8 N
which again is ≤ f 0 (N) /8 if f 00 is of constant sign. (This can be improved
Rt
if the 0 B1 ({u}) du in (4) is replaced by its average value 1/12, giving
f 0 (N ) /12 irrespective of the sign of f 00 , and the resulting error is integrated
by parts again.)
Problem 8 Apply this last method with f (d) = log d to show that there
exists C such that
1
1
0 ≤ log N ! − C − N +
log N + N ≤
.
2
8N
Note that this gives Stirling’s formula:
eC N N +1/2 e−N ≤ N ! ≤ eC+1/8N N N +1/2 e−N ,
as promised earlier.
7