In mathematics, the digamma function is defined as the logarithmic derivative of the gamma function:
\psi(z)=
d | |
dz |
ln\Gamma(z)=
\Gamma'(z) | |
\Gamma(z) |
.
It is the first of the polygamma functions. This function is strictly increasing and strictly concave on
(0,infty)
\psi(z)\simln{z}-
1 | |
2z |
,
for complex numbers with large modulus (
|z| → infty
|\argz|<\pi-\varepsilon
\varepsilon
The digamma function is often denoted as
\psi0(x),\psi(0)(x)
The gamma function obeys the equation
\Gamma(z+1)=z\Gamma(z).
Taking the logarithm on both sides and using the functional equation property of the log-gamma function gives:
log\Gamma(z+1)=log(z)+log\Gamma(z),
Differentiating both sides with respect to gives:
\psi(z+1)=\psi(z)+ | 1 |
z |
Since the harmonic numbers are defined for positive integers as
Hn=\sum
n | |
k=1 |
1 | |
k, |
the digamma function is related to them by
\psi(n)=Hn-1-\gamma,
where and is the Euler–Mascheroni constant. For half-integer arguments the digamma function takes the values
\psi\left(n+\tfrac12\right)=-\gamma-2ln2
n | |
+\sum | |
k=1 |
2 | |
2k-1 |
.
If the real part of is positive then the digamma function has the following integral representation due to Gauss:[4]
\psi(z)=
infty | ||
\int | \left( | |
0 |
e-t | |
t |
-
e-zt | |
1-e-t |
\right)dt.
\gamma
\psi(z+1)=-\gamma+
1 | ||
\int | \left( | |
0 |
1-tz | |
1-t |
\right)dt.
Hz
\psi(z+1)=\psi(1)+Hz.
\psi(w+1)-\psi(z+1)=Hw-Hz.
An integral representation due to Dirichlet is:[4]
\psi(z)=
infty | |
\int | |
0 |
\left(e-t-
1 | \right) | |
(1+t)z |
dt | |
t |
.
Gauss's integral representation can be manipulated to give the start of the asymptotic expansion of
\psi
\psi(z)=logz-
1 | |
2z |
-
infty | ||
\int | \left( | |
0 |
1 | |
2 |
-
1 | |
t |
+
1 | |
et-1 |
\right)e-tzdt.
Binet's second integral for the gamma function gives a different formula for
\psi
\psi(z)=logz-
1 | |
2z |
-
infty | |
2\int | |
0 |
tdt | |
(t2+z2)(e2\pi-1) |
.
From the definition of
\psi
\psi(z)=
1 | |
\Gamma(z) |
infty | |
\int | |
0 |
tz-1ln(t)e-tdt,
\Rez>0
The function
\psi(z)/\Gamma(z)
\psi(z) | |
\Gamma(z) |
=-e2\gamma
| ||||
\prod | ||||
k=0 |
| ||||
\right)e |
.
Here
xk
\psi
\gamma
Note: This is also equal to
- | d |
dz |
1 | |
\Gamma(z) |
\Gamma'(z) | |
\Gamma(z) |
=\psi(z)
Euler's product formula for the gamma function, combined with the functional equation and an identity for the Euler–Mascheroni constant, yields the following expression for the digamma function, valid in the complex plane outside the negative integers (Abramowitz and Stegun 6.3.16):
\begin{align} \psi(z+1) &=-\gamma+
infty | ||
\sum | \left( | |
n=1 |
1 | |
n |
-
1 | |
n+z |
\right), z ≠ -1,-2,-3,\ldots,\\ &=-\gamma+
infty | ||
\sum | \left( | |
n=1 |
z | |
n(n+z) |
\right), z ≠ -1,-2,-3,\ldots. \end{align}
\begin{align} \psi(z) &=-\gamma+
infty | ||
\sum | \left( | |
n=0 |
1 | |
n+1 |
-
1 | |
n+z |
\right), z ≠ 0,-1,-2,\ldots,\\ &=-\gamma+
infty | |
\sum | |
n=0 |
z-1 | |
(n+1)(n+z) |
, z ≠ 0,-1,-2,\ldots. \end{align}
The above identity can be used to evaluate sums of the form
infty | |
\sum | |
n=0 |
un=\sum
infty | |
n=0 |
p(n) | |
q(n) |
,
Performing partial fraction on in the complex field, in the case when all roots of are simple roots,
u | ||||
|
m | |
=\sum | |
k=1 |
ak | |
n+bk |
.
For the series to converge,
\limn\toinftynun=0,
otherwise the series will be greater than the harmonic series and thus diverge. Hence
m | |
\sum | |
k=1 |
ak=0,
and
infty | |
\begin{align} \sum | |
n=0 |
un&=
| ||||
\sum | ||||
k=1 |
m | |
\\ &=\sum | |
k=1 |
a | - | ||||
|
1 | |
n+1 |
\right)
m\left(a | |
\\ &=\sum | |
k\sum |
| |||||
- | |||||
n=0 |
1 | |
n+1 |
m | |
\right)\right)\\ &=-\sum | |
k=1 |
ak(\psi(bk)+\gamma)
m | |
\\ &=-\sum | |
k=1 |
ak\psi(bk). \end{align}
With the series expansion of higher rank polygamma function a generalized formula can be given as
infty | |
\sum | |
n=0 |
un=\sum
m | |
k=1 |
ak | ||||||
|
m | |
=\sum | |
k=1 |
| |||||
(rk-1)! |
(rk-1) | |
a | |
k\psi |
(bk),
provided the series on the left converges.
The digamma has a rational zeta series, given by the Taylor series at . This is
\psi(z+1)=-\gamma
infty | |
-\sum | |
k=1 |
(-1)k\zeta(k+1)zk,
which converges for . Here, is the Riemann zeta function. This series is easily derived from the corresponding Taylor's series for the Hurwitz zeta function.
The Newton series for the digamma, sometimes referred to as Stern series, derived by Moritz Abraham Stern in 1847,[8] [9] [10] reads
\begin{align} \psi(s) &=-\gamma+(s-1)-
(s-1)(s-2) | |
2 ⋅ 2! |
+
(s-1)(s-2)(s-3) | |
3 ⋅ 3! |
… , \Re(s)>0,\\ &=-\gamma-
infty | |
\sum | |
k=1 |
(-1)k | |
k |
\binom{s-1}{k} … , \Re(s)>0. \end{align}
where is the binomial coefficient. It may also be generalized to
\psi(s+1)=-\gamma-
1 | |
m |
m-1 | |
\sum | |
k=1 |
m-k | |
s+k |
-
1 | |
m |
| ||||
\sum | ||||
k=1 |
\left\{\binom{s+m}{k+1}-\binom{s}{k+1}\right\}, \Re(s)>-1,
There exist various series for the digamma containing rational coefficients only for the rational arguments. In particular, the series with Gregory's coefficients is
\psi(v)=lnv-
| ||||
\sum | ||||
n=1 |
, \Re(v)>0,
\psi(v)=2ln\Gamma(v)-2vlnv+2v+2lnv-ln2\pi-
| ||||
2\sum | ||||
n=1 |
(n-1)!, \Re(v)>0,
\psi(v)=3ln\Gamma(v)-6\zeta'(-1,v)+3v2ln{v}-
32 | |
v |
2-6vln(v)+3v+3ln{v}-
32ln2\pi | |
+ |
12 | |
- |
| ||||
3\sum | ||||
n=1 |
(n-1)!, \Re(v)>0,
\psi(v)=ln(v-1)+
| ||||
\sum | ||||
n=1 |
, \Re(v)>1,
\psi(v)=ln(v+a)+
| |||||||||||||
\sum | |||||||||||||
n=1 |
, \Re(v)>-a,
z(1+z)a | |
ln(1+z) |
=
infty | |
\sum | |
n=0 |
zn\psin(a), |z|<1,
\psi(v)=
1 | |
r |
r-1 | |
\sum | |
l=0 |
ln(v+a+l)+
1 | |
r |
| ||||
\sum | ||||
n=1 |
, \Re(v)>-a, r=1,2,3,\ldots
(1+z)a+m-(1+z)a | |
ln(1+z) |
infty | |
=\sum | |
n=0 |
Nn,m(a)zn, |z|<1,
\psi(v)=
1 | |
v+a-\tfrac12 |
\left\{ln\Gamma(v+a)+v-
12ln2\pi | |
- |
12 | |
+ |
| ||||
\sum | ||||
n=1 |
(n-1)!\right\}, \Re(v)>-a,
\psi(v)=
1 | |
\tfrac{1 |
{2}r+v+a-1}\left\{ln\Gamma(v+a)+v-
12ln2\pi | |
- |
12 | |
+ |
1 | |
r |
r-2 | |
\sum | |
n=0 |
(r-n-1)ln(v+a+n)+
1 | |
r |
| ||||
\sum | ||||
n=1 |
(n-1)!\right\},
\Re(v)>-a
r=2,3,4,\ldots
The digamma and polygamma functions satisfy reflection formulas similar to that of the gamma function:
\psi(1-x)-\psi(x)=\pi\cot\pix
\psi'(-x)+\psi'(x)=
\pi2 | + | |
\sin2(\pix) |
1 | |
x2 |
The digamma function satisfies the recurrence relation
\psi(x+1)=\psi(x)+ | 1 |
x |
.
Thus, it can be said to "telescope", for one has
\Delta[\psi](x)=
1 | |
x |
where is the forward difference operator. This satisfies the recurrence relation of a partial sum of the harmonic series, thus implying the formula
\psi(n)=Hn-1-\gamma
where is the Euler–Mascheroni constant.
Actually, is the only solution of the functional equation
F(x+1)=F(x)+ | 1 |
x |
that is monotonic on and satisfies . This fact follows immediately from the uniqueness of the function given its recurrence equation and convexity restriction. This implies the useful difference equation:
N-1 | |
\psi(x+N)-\psi(x)=\sum | |
k=0 |
1 | |
x+k |
There are numerous finite summation formulas for the digamma function. Basic summation formulas, such as
m | ||
\sum | \psi\left( | |
r=1 |
r | |
m |
\right)=-m(\gamma+lnm),
m | ||
\sum | \psi\left( | |
r=1 |
r | |
m |
\right) ⋅ \exp\dfrac{2\pirki}{m}=mln\left(1-\exp
2\piki | |
m |
\right), k\in\Z, m\in\N, k\nem
m-1 | ||
\sum | \psi\left( | |
r=1 |
r | |
m |
\right) ⋅ \cos\dfrac{2\pirk}{m}=mln\left(2\sin
k\pi | |
m |
\right)+\gamma, k=1,2,\ldots,m-1
m-1 | |
\sum | |
r=1 |
\psi\left(
r | |
m |
\right) ⋅ \sin
2\pirk | = | |
m |
\pi | |
2 |
(2k-m), k=1,2,\ldots,m-1
are due to Gauss.[12] [13] More complicated formulas, such as
m-1 | |
\sum | |
r=0 |
\psi\left(
2r+1 | \right) ⋅ \cos | |
2m |
(2r+1)k\pi | |
m |
=mln\left(\tan
\pik | |
2m |
\right), k=1,2,\ldots,m-1
m-1 | |
\sum | |
r=0 |
\psi\left(
2r+1 | |
2m |
\right) ⋅ \sin\dfrac{(2r+1)k\pi}{m}=-
\pim | |
2 |
, k=1,2,\ldots,m-1
m-1 | ||
\sum | \psi\left( | |
r=1 |
r | \right) ⋅ \cot | |
m |
\pir | |
m |
=-
\pi(m-1)(m-2) | |
6 |
m-1 | |
\sum | |
r=1 |
\psi\left(
r | |
m |
\right) ⋅
r | =- | |
m |
\gamma | (m-1)- | |
2 |
m | |
2 |
lnm-
\pi | |
2 |
m-1 | |
\sum | |
r=1 |
r | ⋅ \cot | |
m |
\pir | |
m |
m-1 | |
\sum | |
r=1 |
\psi\left(
r | |
m |
\right) ⋅ \cos\dfrac{(2\ell+1)\pir}{m}=-
\pi | |
m |
m-1 | |
\sum | |
r=1 |
r ⋅ \sin\dfrac{2\pir | |
m |
m-1 | |
\sum | |
r=1 |
\psi\left(
r | |
m |
\right) ⋅ \sin\dfrac{(2\ell+1)\pir}{m}=-(\gamma+ln2m)\cot
(2\ell+1)\pi | |
2m |
+\sin\dfrac{(2\ell+1)\pi
m-1 | |
}{m}\sum | |
r=1 |
ln\sin\dfrac{\pir | |
m |
m-1 | |
\sum | |
r=1 |
| ||||
\psi |
\right)=(m-1)\gamma2+m(2\gamma+ln4m)ln{m}-m(m-1)ln22+
\pi2(m2-3m+2) | |
12 |
m-1 | |
+m\sum | |
\ell=1 |
ln2\sin
\pi\ell | |
m |
are due to works of certain modern authors (see e.g. Appendix B in Blagouchine (2014)[14]).
We also have [15]
1+ | 1 | + |
2 |
1 | +...+ | |
3 |
1 | -\gamma= | |
k-1 |
1 | |
k |
k-1 | ||
\sum | \psi\left(1+ | |
n=0 |
n | |
k |
\right),k=2,3,...
For positive integers and, the digamma function may be expressed in terms of Euler's constant and a finite number of elementary functions[16]
\psi\left( | r |
m |
\right)=-\gamma-ln(2m)-
\pi | \cot\left( | |
2 |
r\pi | |
m |
\right)
| |||||||
+2\sum | \cos\left( | ||||||
n=1 |
2\pinr | |
m |
\right)ln\sin\left(
\pin | |
m |
\right)
which holds, because of its recurrence equation, for all rational arguments.
The multiplication theorem of the
\Gamma
\psi(nz)= | 1 |
n |
n-1 | ||
\sum | \psi(z+ | |
k=0 |
k | |
n |
)+lnn.
The digamma function has the asymptotic expansion
\psi(z)\simlnz+
infty | |
\sum | |
n=1 |
\zeta(1-n) | |
zn |
=lnz-
infty | |
\sum | |
n=1 |
Bn | |
nzn |
,
\psi(z)\simlnz-
1 | |
2z |
-
1 | |
12z2 |
+
1 | |
120z4 |
-
1 | |
252z6 |
+
1 | |
240z8 |
-
1 | |
132z10 |
+
691 | |
32760z12 |
-
1 | |
12z14 |
+ … .
The expansion can be found by applying the Euler–Maclaurin formula to the sum[18]
infty | ||
\sum | \left( | |
n=1 |
1 | |
n |
-
1 | |
z+n |
\right)
t/(t2+z2)
\psi(z)=lnz-
1 | |
2z |
-
N | |
\sum | |
n=1 |
B2n | |
2nz2n |
+(-1)N+1
2 | |
z2N |
infty | |
\int | |
0 |
t2N+1dt | |
(t2+z2)(e2\pi-1) |
.
When, the function
lnx-
1 | |
2x |
-\psi(x)
1+t\leet
e-tz/2
1 | |
x |
-lnx+\psi(x)
lnx-
1 | |
x |
\le\psi(x)\lelnx-
1 | |
2x |
.
1-s | |
x+s |
<\psi(x+1)-\psi(x+s),
Related bounds were obtained by Elezovic, Giordano, and Pecaric, who proved that, for,
ln(x+\tfrac{1}{2})-
1 | |
x |
<\psi(x)<ln(x+e-\gamma)-
1 | |
x |
,
\gamma=-\psi(1)
0.5
e-\gamma ≈ 0.56
The mean value theorem implies the following analog of Gautschi's inequality: If, where is the unique positive real root of the digamma function, and if, then
\exp\left((1-s)
\psi'(x+1) | |
\psi(x+1) |
\right)\le
\psi(x+1) | |
\psi(x+s) |
\le\exp\left((1-s)
\psi'(x+s) | |
\psi(x+s) |
\right).
Inspired by the harmonic mean value inequality for the classical gamma function, Horzt Alzer and Graham Jameson proved, among other things, a harmonic mean-value inequality for the digamma function:
-\gamma\leq
| ||||||
|
x>0
Equality holds if and only if
x=1
The asymptotic expansion gives an easy way to compute when the real part of is large. To compute for small, the recurrence relation
\psi(x+1)=
1 | |
x |
+\psi(x)
can be used to shift the value of to a higher value. Beal[24] suggests using the above recurrence to shift to a value greater than 6 and then applying the above expansion with terms above cut off, which yields "more than enough precision" (at least 12 digits except near the zeroes).
As goes to infinity, gets arbitrarily close to both and . Going down from to, decreases by, decreases by, which is more than, and decreases by, which is less than . From this we see that for any positive greater than,
\psi(x)\in\left(ln\left(x-\tfrac12\right),lnx\right)
or, for any positive,
\exp\psi(x)\in\left(x-\tfrac12,x\right).
The exponential is approximately for large, but gets closer to at small, approaching 0 at .
For, we can calculate limits based on the fact that between 1 and 2,, so
\psi(x)\in\left(- | 1 |
x |
-\gamma,1-
1 | |
x |
-\gamma\right), x\in(0,1)
\exp\psi(x)\in\left(\exp\left(-
1 | -\gamma\right),e\exp\left(- | |
x |
1 | |
x |
-\gamma\right)\right).
From the above asymptotic series for, one can derive an asymptotic series for . The series matches the overall behaviour well, that is, it behaves asymptotically as it should for large arguments, and has a zero of unbounded multiplicity at the origin too.
1 | |
\exp\psi(x) |
\sim
1 | + | |
x |
1 | + | |
2 ⋅ x2 |
5 | + | |
4 ⋅ 3! ⋅ x3 |
3 | + | |
2 ⋅ 4! ⋅ x4 |
47 | |
48 ⋅ 5! ⋅ x5 |
-
5 | |
16 ⋅ 6! ⋅ x6 |
+ …
This is similar to a Taylor expansion of at, but it does not converge.[25] (The function is not analytic at infinity.) A similar series exists for which starts with
\exp\psi(x)\simx-
12. | |
If one calculates the asymptotic series for it turns out that there are no odd powers of (there is no −1 term). This leads to the following asymptotic expansion, which saves computing terms of even order.
\exp\psi\left(x+\tfrac{1}{2}\right)\simx+
1 | |
4! ⋅ x |
-
37 | |
8 ⋅ 6! ⋅ x3 |
+
10313 | |
72 ⋅ 8! ⋅ x5 |
-
5509121 | |
384 ⋅ 10! ⋅ x7 |
+ …
Similar in spirit to the Lanczos approximation of the
\Gamma
Another alternative is to use the recurrence relation or the multiplication formula to shift the argument of
\psi(x)
1\lex\le3
The digamma function has values in closed form for rational numbers, as a result of Gauss's digamma theorem. Some are listed below:
\begin{align} \psi(1)&=-\gamma\ \psi\left(\tfrac{1}{2}\right)&=-2ln{2}-\gamma\\ \psi\left(\tfrac{1}{3}\right)&=-
\pi | |
2\sqrt{3 |
Moreover, by taking the logarithmic derivative of
|\Gamma(bi)|2
|\Gamma(\tfrac{1}{2}+bi)|2
b
\operatorname{Im}\psi(bi)=
1 | + | |
2b |
\pi | |
2 |
\coth(\pib),
\operatorname{Im}\psi(\tfrac{1}{2}+bi)=
\pi | |
2 |
\tanh(\pib).
Apart from Gauss's digamma theorem, no such closed formula is known for the real part in general. We have, for example, at the imaginary unit the numerical approximation
\operatorname{Re}\psi(i)=
| ||||
-\gamma-\sum | ||||
n=0 |
≈ 0.09465.
The roots of the digamma function are the saddle points of the complex-valued gamma function. Thus they lie all on the real axis. The only one on the positive real axis is the unique minimum of the real-valued gamma function on at . All others occur single between the poles on the negative axis:
\vdots
Already in 1881, Charles Hermite observed[28] that
xn=-n+
1 | |
lnn |
+O\left(
1 | |
(lnn)2 |
\right)
holds asymptotically. A better approximation of the location of the roots is given by
xn ≈ -n+
1 | \arctan\left( | |
\pi |
\pi | |
lnn |
\right) n\ge2
and using a further term it becomes still better
xn ≈ -n+
1 | \arctan\left( | |
\pi |
\pi | |||||
|
\right) n\ge1
which both spring off the reflection formula via
0=\psi(1-xn)=\psi(xn)+
\pi | |
\tan\pixn |
and substituting by its not convergent asymptotic expansion. The correct second term of this expansion is, where the given one works well to approximate roots with small .
Another improvement of Hermite's formula can be given:
| |||||||
x | |||||||
|
n)2}\right).
Regarding the zeros, the following infinite sum identities were recently proved by István Mező and Michael Hoffman[29] [30]
| ||||||||||
\begin{align} \sum | ||||||||||
n=0 |
| ||||
&=\gamma |
,
| ||||||||||
\ \sum | ||||||||||
n=0 |
| ||||
&=-4\zeta(3)-\gamma |
,
| ||||||||||
\ \sum | ||||||||||
n=0 |
| ||||
&=\gamma |
+
23 | |
\gamma |
2\pi2+4\gamma\zeta(3). \end{align}
In general, the function
| ||||||||||
Z(k)=\sum | ||||||||||
n=0 |
The following results[29]
| ||||||||||
\begin{align} \sum | ||||||||||
n=0 |
&=-2,
| |||||||||||
\\ \sum | &=\gamma+ | ||||||||||
n=0 |
\pi2 | |
6\gamma |
\end{align}
The digamma function appears in the regularization of divergent integrals
infty | |
\int | |
0 |
dx | |
x+a |
,
this integral can be approximated by a divergent general Harmonic series, but the following value can be attached to the series
infty | |
\sum | |
n=0 |
1 | |
n+a |
=-\psi(a).
psi(1/3), psi(2/3), psi(1/4), psi(3/4), to psi(1/5) to psi(4/5).