The Gamma and Beta functions #
This file defines the Γ
function (of a real or complex variable s
). We define this by Euler's
integral Γ(s) = ∫ x in Ioi 0, exp (-x) * x ^ (s - 1)
in the range where this integral converges
(i.e., for 0 < s
in the real case, and 0 < re s
in the complex case).
We show that this integral satisfies Γ(1) = 1
and Γ(s + 1) = s * Γ(s)
; hence we can define
Γ(s)
for all s
as the unique function satisfying this recurrence and agreeing with Euler's
integral in the convergence range. (If s = -n
for n ∈ ℕ
, then the function is undefined, and we
set it to be 0
by convention.)
Gamma function: main statements (complex case) #
complex.Gamma
: theΓ
function (of a complex variable).complex.Gamma_eq_integral
: for0 < re s
,Γ(s)
agrees with Euler's integral.complex.Gamma_add_one
: for alls : ℂ
withs ≠ 0
, we haveΓ (s + 1) = s Γ(s)
.complex.Gamma_nat_eq_factorial
: for alln : ℕ
we haveΓ (n + 1) = n!
.complex.differentiable_at_Gamma
:Γ
is complex-differentiable at alls : ℂ
withs ∉ {-n : n ∈ ℕ}
.complex.Gamma_ne_zero
: for alls : ℂ
withs ∉ {-n : n ∈ ℕ}
we haveΓ s ≠ 0
.complex.Gamma_seq_tendsto_Gamma
: for alls
, the limit asn → ∞
of the sequencen ↦ n ^ s * n! / (s * (s + 1) * ... * (s + n))
isΓ(s)
.complex.Gamma_mul_Gamma_one_sub
: Euler's reflection formulaGamma s * Gamma (1 - s) = π / sin π s
.
Gamma function: main statements (real case) #
real.Gamma
: theΓ
function (of a real variable).- Real counterparts of all the properties of the complex Gamma function listed above:
real.Gamma_eq_integral
,real.Gamma_add_one
,real.Gamma_nat_eq_factorial
,real.differentiable_at_Gamma
,real.Gamma_ne_zero
,real.Gamma_seq_tendsto_Gamma
,real.Gamma_mul_Gamma_one_sub
. real.convex_on_log_Gamma
:log ∘ Γ
is convex onIoi 0
.real.eq_Gamma_of_log_convex
: the Bohr-Mollerup theorem, which states that theΓ
function is the unique log-convex, positive-valued function onIoi 0
satisfying the functional equation and havingΓ 1 = 1
.
Beta function #
complex.beta_integral
: the Beta functionΒ(u, v)
, whereu
,v
are complex with positive real part.complex.Gamma_mul_Gamma_eq_beta_integral
: the formulaGamma u * Gamma v = Gamma (u + v) * beta_integral u v
.
Tags #
Gamma
The Euler integral for the Γ
function converges for positive real s
.
The integral defining the Γ
function converges for complex s
with 0 < re s
.
This is proved by reduction to the real case.
Euler's integral for the Γ
function (of a complex variable s
), defined as
∫ x in Ioi 0, exp (-x) * x ^ (s - 1)
.
See complex.Gamma_integral_convergent
for a proof of the convergence of the integral for
0 < re s
.
Now we establish the recurrence relation Γ(s + 1) = s * Γ(s)
using integration by parts.
The recurrence relation for the Γ
integral.
Now we define Γ(s)
on the whole complex plane, by recursion.
The n
th function in this family is Γ(s)
if -n < s.re
, and junk otherwise.
Equations
- complex.Gamma_aux (n + 1) = λ (s : ℂ), complex.Gamma_aux n (s + 1) / s
- complex.Gamma_aux 0 = complex.Gamma_integral
The Γ
function (of a complex variable s
).
Equations
- complex.Gamma s = complex.Gamma_aux ⌊1 - s.re⌋₊ s
The recurrence relation for the Γ
function.
At 0
the Gamma function is undefined; by convention we assign it the value 0
.
At -n
for n ∈ ℕ
, the Gamma function is undefined; by convention we assign it the value 0.
Now check that the Γ
function is differentiable, wherever this makes sense.
A uniform bound for the s
-derivative of the Γ
integrand for s
in vertical strips.
The derivative of the Γ
integral, at any s ∈ ℂ
with 1 < re s
, is given by the integral
of exp (-x) * log x * x ^ (s - 1)
over [0, ∞)
.
The Γ
function (of a real variable s
).
Equations
- real.Gamma s = (complex.Gamma ↑s).re
At 0
the Gamma function is undefined; by convention we assign it the value 0
.
At -n
for n ∈ ℕ
, the Gamma function is undefined; by convention we assign it the value 0
.
The Gamma function does not vanish on ℝ
(except at non-positive integers, where the function
is mathematically undefined and we set it to 0
by convention).
Log-convexity of the Gamma function on the positive reals (stated in multiplicative form), proved using the Hölder inequality applied to Euler's integral.
The Bohr-Mollerup theorem #
In this section we prove two interrelated statements about the Γ
function on the positive reals:
- the Euler limit formula
real.bohr_mollerup.tendsto_log_gamma_seq
, stating that for positive realx
the sequencex * log n + log n! - ∑ (m : ℕ) in finset.range (n + 1), log (x + m)
tends tolog Γ(x)
asn → ∞
. - the Bohr-Mollerup theorem (
real.eq_Gamma_of_log_convex
) which states thatΓ
is the unique log-convex, positive-real-valued function on the positive reals satisfyingf (x + 1) = x f x
andf 1 = 1
.
To do this, we prove that any function satisfying the hypotheses of the Bohr--Mollerup theorem must
agree with the limit in the Euler limit formula, so there is at most one such function. Then we
show that Γ
satisfies these conditions.
Since most of the auxiliary lemmas for the Bohr-Mollerup theorem are of no relevance outside the
context of this proof, we place them in a separate namespace real.bohr_mollerup
to avoid clutter.
(This includes the logarithmic form of the Euler limit formula, since later we will prove a more
general form of the Euler limit formula valid for any real or complex x
; see
real.Gamma_seq_tendsto_Gamma
and complex.Gamma_seq_tendsto_Gamma
.)
The function n ↦ x log n + log n! - (log x + ... + log (x + n))
, which we will show tends to
log (Gamma x)
as n → ∞
.
The Bohr-Mollerup theorem: the Gamma function is the unique log-convex, positive-valued
function on the positive reals which satisfies f 1 = 1
and f (x + 1) = x * f x
for all x
.
The Beta function #
Relation between Beta integral and Gamma function.
Recurrence formula for the Beta function.
The Euler limit formula #
The main techical lemma for Gamma_seq_tendsto_Gamma
, expressing the integral defining the
Gamma function for 0 < re s
as the limit of a sequence of integrals over finite intervals.
Euler's limit formula for the complex Gamma function.
The reflection formula #
Euler's reflection formula for the complex Gamma function.
The Gamma function does not vanish on ℂ
(except at non-positive integers, where the function
is mathematically undefined and we set it to 0
by convention).
Euler's limit formula for the real Gamma function.
Euler's reflection formula for the real Gamma function.