The Gamma function #
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.differentiableAt_Gamma
:Γ
is complex-differentiable at alls : ℂ
withs ∉ {-n : n ∈ ℕ}
.
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.differentiableAt_Gamma
.
Tags #
Gamma
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.GammaIntegral_convergent
for a proof of the convergence of the integral for
0 < re s
.
Instances For
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.GammaAux 0 = Complex.GammaIntegral
- Complex.GammaAux (Nat.succ n) = fun (s : ℂ) => Complex.GammaAux n (s + 1) / s
Instances For
The Γ
function (of a complex variable s
).
Equations
Instances For
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.
Expresses the integral over Ioi 0
of t ^ (a - 1) * exp (-(r * t))
in terms of the Gamma
function, for complex a
.
Now check that the Γ
function is differentiable, wherever this makes sense.
Rewrite the Gamma integral as an example of a Mellin transform.
The derivative of the Γ
integral, at any s ∈ ℂ
with 1 < re s
, is given by the Melllin
transform of log t * exp (-t)
.
At s = 0
, the Gamma function has a simple pole with residue 1.
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
.
Expresses the integral over Ioi 0
of t ^ (a - 1) * exp (-(r * t))
, for positive real r
,
in terms of the Gamma function.
The positivity
extension which identifies expressions of the form Gamma a
.
Instances For
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).