PolyGamma¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
PolyGamma[z]
gives the digamma function psi(z) (rewritten as PolyGamma[0, z]).
PolyGamma[n, z]
gives the n-th derivative of the digamma function, psi^(n)(z).
Positive-integer arguments reduce to exact values: psi(m) to a rational
minus EulerGamma, and psi^(n)(m) for odd n to a rational plus a rational
multiple of Pi^(n+1); even orders stay symbolic. Non-positive integer
arguments give ComplexInfinity. Inexact real and complex arguments evaluate
numerically at machine or arbitrary (MPFR) precision. PolyGamma[-1, z] gives
LogGamma[z]. Listable.
Examples¶
No verified examples yet for this function.
Implementation notes¶
Attributes: Listable, NumericFunction, Protected.
Implementation status¶
Stable — documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
References¶
- Source:
src/info.c - Specification:
docs/spec/builtins/special-functions.md
Notes & additional examples¶
Worked examples¶
The digamma function at positive integers reduces to an exact rational minus Euler's constant:
Higher derivatives psi^(n) at integer points give exact closed forms. The
trigamma at 1 is the Basel constant, and the odd-order values are rational
multiples of even powers of Pi:
The numeric paths cover arbitrary precision and complex arguments — here the
tetragamma value psi^(2)(1+i) to 30 digits:
In[1]:= N[PolyGamma[0, 3/2], 40]
Out[1]= 0.036489973978576520559023667001244432806843
In[2]:= N[PolyGamma[2, 1 + I], 30]
Out[2]= 0.3685529315879351717366345429807 + 0.7666528503450662124026953776316*I
The order -1 is the special "integral of psi" case, the log-gamma function:
Notes¶
PolyGamma[z] is the digamma function ψ(z), stored internally as
PolyGamma[0, z]; PolyGamma[n, z] is its n-th derivative ψ⁽ⁿ⁾(z). Positive
integer arguments reduce exactly: ψ(m) to a rational minus EulerGamma, and
ψ⁽ⁿ⁾(m) for odd n to a rational plus a rational multiple of Pi^(n+1) (even
orders are left symbolic). Non-positive integer arguments give ComplexInfinity
(the poles). Inexact real and complex arguments evaluate numerically at machine
or MPFR precision, and PolyGamma[-1, z] returns LogGamma[z]. Listable.