Analytic number theory is so abysmally complex that we need a basic toolkit of summation formulas first in order to prove some of the most basic theorems of the theory.
Note: We need the Riemann integrability to be able to apply the fundamental theorem of calculus.
Proof 1 :
We prove the theorem by induction on
⌊
x
⌋
{\displaystyle \lfloor x\rfloor }
.
1.
⌊
x
⌋
=
1
{\displaystyle \lfloor x\rfloor =1}
:
First, we have in this case
∑
1
≤
n
≤
x
a
n
f
(
n
)
=
a
1
f
(
1
)
{\displaystyle \sum _{1\leq n\leq x}a_{n}f(n)=a_{1}f(1)}
.
Then, we have
A
(
x
)
f
(
x
)
=
a
1
f
(
x
)
=
a
1
f
(
1
)
−
a
1
(
f
(
1
)
−
f
(
x
)
)
=
a
1
f
(
1
)
+
∫
1
x
A
(
y
)
f
′
(
y
)
d
y
{\displaystyle A(x)f(x)=a_{1}f(x)=a_{1}f(1)-a_{1}(f(1)-f(x))=a_{1}f(1)+\int _{1}^{x}A(y)f'(y)dy}
by the fundamental theorem of calculus.
2. Induction step:
Define
N
:=
⌊
x
⌋
{\displaystyle N:=\lfloor x\rfloor }
. We have
∑
1
≤
n
≤
x
a
n
f
(
n
)
=
∑
1
≤
n
≤
x
−
1
a
n
f
(
n
)
+
a
N
f
(
N
)
=
A
(
x
−
1
)
f
(
x
−
1
)
−
∫
1
x
−
1
A
(
y
)
f
′
(
y
)
d
y
+
a
N
f
(
N
)
{\displaystyle {\begin{aligned}\sum _{1\leq n\leq x}a_{n}f(n)&=\sum _{1\leq n\leq x-1}a_{n}f(n)+a_{N}f(N)\\&=A(x-1)f(x-1)-\int _{1}^{x-1}A(y)f'(y)dy+a_{N}f(N)\end{aligned}}}
by the induction hypothesis. Further,
−
∫
1
x
−
1
A
(
y
)
f
′
(
y
)
d
y
=
−
∫
1
x
A
(
y
)
f
′
(
y
)
d
y
+
∫
x
−
1
x
A
(
y
)
f
′
(
y
)
d
y
=
−
∫
1
x
A
(
y
)
f
′
(
y
)
d
y
+
∫
x
−
1
N
A
(
y
)
f
′
(
y
)
d
y
+
∫
N
x
A
(
y
)
f
′
(
y
)
d
y
=
−
∫
1
x
A
(
y
)
f
′
(
y
)
d
y
+
A
(
N
−
1
)
∫
x
−
1
N
f
′
(
y
)
d
y
+
A
(
N
)
∫
N
x
f
′
(
y
)
d
y
=
−
∫
1
x
A
(
y
)
f
′
(
y
)
d
y
+
A
(
N
−
1
)
(
f
(
N
)
−
f
(
x
−
1
)
)
+
A
(
N
)
(
f
(
x
)
−
f
(
N
)
)
{\displaystyle {\begin{aligned}-\int _{1}^{x-1}A(y)f'(y)dy&=-\int _{1}^{x}A(y)f'(y)dy+\int _{x-1}^{x}A(y)f'(y)dy\\&=-\int _{1}^{x}A(y)f'(y)dy+\int _{x-1}^{N}A(y)f'(y)dy+\int _{N}^{x}A(y)f'(y)dy\\&=-\int _{1}^{x}A(y)f'(y)dy+A(N-1)\int _{x-1}^{N}f'(y)dy+A(N)\int _{N}^{x}f'(y)dy\\&=-\int _{1}^{x}A(y)f'(y)dy+A(N-1)(f(N)-f(x-1))+A(N)(f(x)-f(N))\end{aligned}}}
.
Putting things together, we obtain
∑
1
≤
n
≤
x
a
n
f
(
n
)
=
A
(
x
−
1
)
f
(
x
−
1
)
−
∫
1
x
A
(
y
)
f
′
(
y
)
d
y
+
A
(
N
−
1
)
(
f
(
N
)
−
f
(
x
−
1
)
)
+
A
(
N
)
(
f
(
x
)
−
f
(
N
)
)
+
a
N
f
(
N
)
{\displaystyle \sum _{1\leq n\leq x}a_{n}f(n)=A(x-1)f(x-1)-\int _{1}^{x}A(y)f'(y)dy+A(N-1)(f(N)-f(x-1))+A(N)(f(x)-f(N))+a_{N}f(N)}
and thus the desired formula.
The method of proof we applied here was using induction and then trying to express the terms from the induction hypothesis in terms of the terms from the desired formula.
◻
{\displaystyle \Box }
Proof 2 :
We prove the theorem by direct manipulation of the term on the left.
Define
k
:=
⌊
x
⌋
{\displaystyle k:=\lfloor x\rfloor }
.
∑
1
≤
n
≤
x
a
n
f
(
n
)
=
∑
1
≤
n
≤
x
(
A
(
n
)
−
A
(
n
−
1
)
)
f
(
n
)
=
∑
1
≤
n
≤
x
A
(
n
)
f
(
n
)
−
∑
0
≤
n
≤
x
−
1
A
(
n
)
f
(
n
+
1
)
=
∑
1
≤
n
≤
x
A
(
n
)
f
(
n
)
−
∑
1
≤
n
≤
x
−
1
A
(
n
)
f
(
n
+
1
)
=
∑
1
≤
n
≤
x
−
1
A
(
n
)
(
f
(
n
)
−
f
(
n
+
1
)
)
+
A
(
k
)
f
(
k
)
=
∑
1
≤
n
≤
x
−
1
A
(
n
)
(
−
∫
n
n
+
1
f
′
(
t
)
d
t
)
+
A
(
x
)
f
(
x
)
−
∫
k
x
A
(
t
)
f
′
(
t
)
d
t
{\displaystyle {\begin{aligned}\sum _{1\leq n\leq x}a_{n}f(n)&=\sum _{1\leq n\leq x}(A(n)-A(n-1))f(n)\\&=\sum _{1\leq n\leq x}A(n)f(n)-\sum _{0\leq n\leq x-1}A(n)f(n+1)=\sum _{1\leq n\leq x}A(n)f(n)-\sum _{1\leq n\leq x-1}A(n)f(n+1)\\&=\sum _{1\leq n\leq x-1}A(n)(f(n)-f(n+1))+A(k)f(k)\\&=\sum _{1\leq n\leq x-1}A(n)\left(-\int _{n}^{n+1}f'(t)dt\right)+A(x)f(x)-\int _{k}^{x}A(t)f'(t)dt\end{aligned}}}
◻
{\displaystyle \Box }
Proof 3 :
We prove the formula by the means of the Riemann-Stieltjes integral. Indeed, by integration by parts, we have
∑
1
≤
n
≤
x
a
n
f
(
n
)
=
∫
0
x
f
(
t
)
d
A
(
t
)
=
A
(
x
)
f
(
x
)
−
∫
0
x
A
(
t
)
d
f
(
t
)
=
A
(
x
)
f
(
x
)
−
∫
1
x
A
(
t
)
f
′
(
t
)
d
t
{\displaystyle {\begin{aligned}\sum _{1\leq n\leq x}a_{n}f(n)=\int _{0}^{x}f(t)dA(t)&=A(x)f(x)-\int _{0}^{x}A(t)df(t)\\&=A(x)f(x)-\int _{1}^{x}A(t)f'(t)dt\end{aligned}}}
.
◻
{\displaystyle \Box }
Corollary 1.2 :
∑
y
<
n
≤
x
a
n
f
(
n
)
=
A
(
x
)
f
(
x
)
−
A
(
y
)
f
(
y
)
−
∫
y
x
A
(
t
)
f
′
(
t
)
d
t
{\displaystyle \sum _{y<n\leq x}a_{n}f(n)=A(x)f(x)-A(y)f(y)-\int _{y}^{x}A(t)f'(t)dt}
.
Proof 1 :
We deduce the formula from integration by parts for the Riemann-Stieltjes integral.
∑
y
<
n
≤
x
a
n
f
(
n
)
=
∫
y
x
f
(
t
)
d
A
(
t
)
=
f
(
x
)
A
(
x
)
−
f
(
y
)
A
(
y
)
−
∫
y
x
A
(
t
)
d
f
(
t
)
=
f
(
x
)
A
(
x
)
−
f
(
y
)
A
(
y
)
−
∫
y
x
A
(
t
)
f
′
(
t
)
d
t
{\displaystyle {\begin{aligned}\sum _{y<n\leq x}a_{n}f(n)=\int _{y}^{x}f(t)dA(t)&=f(x)A(x)-f(y)A(y)-\int _{y}^{x}A(t)df(t)\\&=f(x)A(x)-f(y)A(y)-\int _{y}^{x}A(t)f'(t)dt\end{aligned}}}
◻
{\displaystyle \Box }
Proof 2 :
We directly manipulate the LHS (left hand side).
Define
k
:=
⌊
x
⌋
{\displaystyle k:=\lfloor x\rfloor }
and
m
:=
⌊
y
⌋
{\displaystyle m:=\lfloor y\rfloor }
.
∑
y
<
n
≤
x
a
n
f
(
n
)
=
∑
y
<
n
≤
x
(
A
(
n
)
−
A
(
n
−
1
)
)
f
(
n
)
=
∑
y
<
n
≤
x
A
(
n
)
f
(
n
)
−
∑
y
−
1
<
n
≤
x
−
1
A
(
n
)
f
(
n
+
1
)
=
∑
y
<
n
≤
x
−
1
A
(
n
)
(
f
(
n
)
−
f
(
n
+
1
)
)
−
A
(
m
)
f
(
m
)
+
A
(
k
)
f
(
k
)
=
∑
y
<
n
≤
x
−
1
A
(
n
)
−
(
∫
n
n
+
1
f
′
(
t
)
d
t
)
−
A
(
y
)
f
(
y
)
+
A
(
x
)
f
(
x
)
−
∫
y
m
A
(
t
)
f
′
(
t
)
d
t
−
∫
k
x
A
(
t
)
f
′
(
t
)
d
t
{\displaystyle {\begin{aligned}\sum _{y<n\leq x}a_{n}f(n)&=\sum _{y<n\leq x}(A(n)-A(n-1))f(n)\\&=\sum _{y<n\leq x}A(n)f(n)-\sum _{y-1<n\leq x-1}A(n)f(n+1)\\&=\sum _{y<n\leq x-1}A(n)(f(n)-f(n+1))-A(m)f(m)+A(k)f(k)\\&=\sum _{y<n\leq x-1}A(n)-\left(\int _{n}^{n+1}f'(t)dt\right)-A(y)f(y)+A(x)f(x)-\int _{y}^{m}A(t)f'(t)dt-\int _{k}^{x}A(t)f'(t)dt\end{aligned}}}
◻
{\displaystyle \Box }
Two further proofs are given in exercises 1.1.1 and 1.1.5.
We note that induction and direct manipulation are quicker proofs for theorem 1.1, while corollary 1.2 is quicker proven from theorem 1.1 or Riemann-Stieltjes integration.
Exercise 1.1.1 : Prove corollary 1.2 from theorem 1.1. Hint:
∑
y
<
n
≤
x
a
n
f
(
n
)
=
∑
1
≤
n
≤
x
a
n
f
(
n
)
−
∑
1
<
n
≤
y
a
n
f
(
n
)
{\displaystyle \sum _{y<n\leq x}a_{n}f(n)=\sum _{1\leq n\leq x}a_{n}f(n)-\sum _{1<n\leq y}a_{n}f(n)}
.
Exercise 1.1.2 : Compute
∑
n
=
1
N
n
3
{\displaystyle \sum _{n=1}^{N}n^{3}}
. Hint: Use
a
n
=
n
{\displaystyle a_{n}=n}
,
f
(
x
)
=
x
2
{\displaystyle f(x)=x^{2}}
, apply Abelian summation and split the resulting integral into pieces where
A
(
t
)
{\displaystyle A(t)}
is constant. Then apply a similar process.
Exercise 1.1.3 : Prove that the limit
lim
n
→
∞
(
−
log
(
n
)
+
∑
k
=
1
n
1
k
)
{\displaystyle \lim _{n\to \infty }\left(-\log(n)+\sum _{k=1}^{n}{\frac {1}{k}}\right)}
exists. This limit is called the Euler–Mascheroni constant . Hint: Use
a
n
=
1
{\displaystyle a_{n}=1}
and
f
(
x
)
=
1
x
{\displaystyle f(x)={\frac {1}{x}}}
.
Exercise 1.1.4 : Prove theorem 1.1 from corollary 1.2.
Exercise 1.1.5 : Prove corollary 1.2 using induction on
⌊
x
⌋
{\displaystyle \lfloor x\rfloor }
.
Definition 1.3 :
For
x
∈
R
{\displaystyle x\in \mathbb {R} }
, we define
{
x
}
:=
x
−
⌊
x
⌋
{\displaystyle \{x\}:=x-\lfloor x\rfloor }
.
Theorem 1.4 (Euler's summation formula) :
Let
f
:
R
→
R
{\displaystyle f:\mathbb {R} \to \mathbb {R} }
be a differentiable function, such that
f
′
{\displaystyle f'}
is Riemann integrable. Then
∑
y
<
n
≤
x
f
(
n
)
=
{
x
}
f
(
x
)
−
{
y
}
f
(
y
)
+
∫
y
x
f
(
t
)
d
t
+
∫
y
x
{
t
}
f
′
(
t
)
d
t
{\displaystyle \sum _{y<n\leq x}f(n)=\{x\}f(x)-\{y\}f(y)+\int _{y}^{x}f(t)dt+\int _{y}^{x}\{t\}f'(t)dt}
.
Proof :
We prove the theorem from Corollary 1.2, setting
a
n
=
1
{\displaystyle a_{n}=1}
and using integration by parts (integration by parts is proven using the fundamental theorem of calculus).
Indeed,
∑
y
<
n
≤
x
f
(
n
)
=
⌊
x
⌋
f
(
x
)
−
⌊
y
⌋
f
(
y
)
−
∫
y
x
⌊
t
⌋
f
′
(
t
)
d
t
=
⌊
x
⌋
f
(
x
)
−
⌊
y
⌋
f
(
y
)
−
∫
y
x
t
f
′
(
t
)
d
t
+
∫
y
x
{
t
}
f
′
(
t
)
d
t
=
{
x
}
f
(
x
)
−
{
y
}
f
(
y
)
+
∫
y
x
f
(
t
)
d
t
+
∫
y
x
{
t
}
f
′
(
t
)
d
t
{\displaystyle {\begin{aligned}\sum _{y<n\leq x}f(n)&=\lfloor x\rfloor f(x)-\lfloor y\rfloor f(y)-\int _{y}^{x}\lfloor t\rfloor f'(t)dt\\&=\lfloor x\rfloor f(x)-\lfloor y\rfloor f(y)-\int _{y}^{x}tf'(t)dt+\int _{y}^{x}\{t\}f'(t)dt\\&=\{x\}f(x)-\{y\}f(y)+\int _{y}^{x}f(t)dt+\int _{y}^{x}\{t\}f'(t)dt\end{aligned}}}
,
where in the last line we used integration by parts on the integral
∫
y
x
t
f
′
(
t
)
d
t
{\displaystyle \int _{y}^{x}tf'(t)dt}
.
◻
{\displaystyle \Box }
Prove corollary 1.5.
Proof 1 :
We prove the theorem by direct computation.
{\displaystyle {\begin{aligned}\end{aligned}}}
Proof 2 :
We prove the theorem from Euler's summation formula.