Documentation

Mathlib.Analysis.SpecialFunctions.Gamma.Digamma

The digamma function #

This file defines the digamma function as the logarithmic derivative of the Gamma function and proves some basic properties.

Main definitions #

Main statements #

TODO #

noncomputable def Complex.digamma :

The digamma function, defined as the logarithmic derivative of the Gamma function.

Equations
Instances For
    @[simp]
    theorem Complex.digamma_apply_add_one (s : ) (hs : ∀ (m : ), s -m) :
    theorem Complex.digamma_apply_add_nat {s : } (hs : ∀ (m : ), s -m) (n : ) :
    (s + n).digamma = s.digamma + kFinset.range n, (s + k)⁻¹

    The iterated digamma recurrence ψ(s + n) = ψ(s) + ∑_{k < n} 1 / (s + k), for s ∉ {0, -1, -2, …}. Proved by induction from digamma_apply_add_one.

    The digamma function at a positive integer, in terms of harmonic numbers.

    theorem Complex.digamma_one_sub {s : } (hs : ∀ (n : ), s n) :
    (1 - s).digamma = s.digamma + Real.pi * (Real.pi * s).cot

    Euler's reflection formula for the digamma function: ψ (1 - s) = ψ s + π * cot (π * s) for s not an integer.

    theorem HasDerivAt.logDeriv_Gamma {g : } {a s : } (hg : HasDerivAt g a s) (h : ∀ (m : ), g s -m) :
    logDeriv (fun (z : ) => Complex.Gamma (g z)) s = a * (g s).digamma

    If g has derivative a at s, then the logarithmic derivative of Gamma ∘ g at s is a * digamma (g s).

    theorem Complex.digamma_two_mul {s : } (hs : ∀ (m : ), 2 * s -m) :
    (2 * s).digamma = 1 / 2 * (s.digamma + (s + 1 / 2).digamma) + log 2

    The digamma duplication formula ψ(2s) = ½(ψ(s) + ψ(s + ½)) + log 2, for 2s ∉ {0, -1, -2, …}, which is equivalent to s and s + ½ both avoiding the poles of ψ. Proved from Legendre's doubling Complex.Gamma_mul_Gamma_add_half by taking logarithmic derivatives.