Digamma function

From testwiki
Revision as of 12:50, 1 March 2025 by 109.81.162.86 (talk) (added a note for its relevance in statistics)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description Template:For

The digamma function ψ(z),
visualized using domain coloring
Plots of the digamma and the next three polygamma functions along the real line (they are real-valued on the real line)

In mathematics, the digamma function is defined as the logarithmic derivative of the gamma function:[1][2][3]

ψ(z)=ddzlnΓ(z)=Γ(z)Γ(z).

It is the first of the polygamma functions. This function is strictly increasing and strictly concave on (0,),[4] and it asymptotically behaves as[5]

ψ(z)lnz12z,

for complex numbers with large modulus (|z|) in the sector |argz|<πε with some infinitesimally small positive constant ε.

The digamma function is often denoted as ψ0(x),ψ(0)(x) or Template:Math[6] (the uppercase form of the archaic Greek consonant digamma meaning double-gamma).

Relation to harmonic numbers

The gamma function obeys the equation

Γ(z+1)=zΓ(z).

Taking the logarithm on both sides and using the functional equation property of the log-gamma function gives:

logΓ(z+1)=log(z)+logΓ(z),

Differentiating both sides with respect to Template:Mvar gives:

ψ(z+1)=ψ(z)+1z

Since the harmonic numbers are defined for positive integers Template:Mvar as

Hn=k=1n1k,

the digamma function is related to them by

ψ(n)=Hn1γ,

where Template:Math and Template:Mvar is the Euler–Mascheroni constant. For half-integer arguments the digamma function takes the values

ψ(n+12)=γ2ln2+k=1n22k1=γ2ln2+2H2nHn.

Integral representations

If the real part of Template:Mvar is positive then the digamma function has the following integral representation due to Gauss:[7]

ψ(z)=0(ettezt1et)dt.

Combining this expression with an integral identity for the Euler–Mascheroni constant γ gives:

ψ(z+1)=γ+01(1tz1t)dt.

The integral is Euler's harmonic number Hz, so the previous formula may also be written

ψ(z+1)=ψ(1)+Hz.

A consequence is the following generalization of the recurrence relation:

ψ(w+1)ψ(z+1)=HwHz.

An integral representation due to Dirichlet is:[7]

ψ(z)=0(et1(1+t)z)dtt.

Gauss's integral representation can be manipulated to give the start of the asymptotic expansion of ψ.[8]

ψ(z)=logz12z0(121t+1et1)etzdt.

This formula is also a consequence of Binet's first integral for the gamma function. The integral may be recognized as a Laplace transform.

Binet's second integral for the gamma function gives a different formula for ψ which also gives the first few terms of the asymptotic expansion:[9]

ψ(z)=logz12z20tdt(t2+z2)(e2πt1).

From the definition of ψ and the integral representation of the gamma function, one obtains

ψ(z)=1Γ(z)0tz1ln(t)etdt,

with z>0.[10]

Infinite product representation

The function ψ(z)/Γ(z) is an entire function,[11] and it can be represented by the infinite product

ψ(z)Γ(z)=e2γzk=0(1zxk)ezxk.

Here xk is the kth zero of ψ (see below), and γ is the Euler–Mascheroni constant.

Note: This is also equal to ddz1Γ(z) due to the definition of the digamma function: Γ(z)Γ(z)=ψ(z).

Series representation

Series formula

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):[1]

ψ(z+1)=γ+n=1(1n1n+z),z1,2,3,,=γ+n=1(zn(n+z)),z1,2,3,.

Equivalently,

ψ(z)=γ+n=0(1n+11n+z),z0,1,2,,=γ+n=0z1(n+1)(n+z),z0,1,2,.

Evaluation of sums of rational functions

The above identity can be used to evaluate sums of the form

n=0un=n=0p(n)q(n),

where Template:Math and Template:Math are polynomials of Template:Mvar.

Performing partial fraction on Template:Mvar in the complex field, in the case when all roots of Template:Math are simple roots,

un=p(n)q(n)=k=1makn+bk.

For the series to converge,

limnnun=0,

otherwise the series will be greater than the harmonic series and thus diverge. Hence

k=1mak=0,

and

n=0un=n=0k=1makn+bk=n=0k=1mak(1n+bk1n+1)=k=1m(akn=0(1n+bk1n+1))=k=1mak(ψ(bk)+γ)=k=1makψ(bk).

With the series expansion of higher rank polygamma function a generalized formula can be given as

n=0un=n=0k=1mak(n+bk)rk=k=1m(1)rk(rk1)!akψ(rk1)(bk),

provided the series on the left converges.

Taylor series

The digamma has a rational zeta series, given by the Taylor series at Template:Math. This is

ψ(z+1)=γk=1(1)kζ(k+1)zk,

which converges for Template:Math. Here, Template:Math is the Riemann zeta function. This series is easily derived from the corresponding Taylor's series for the Hurwitz zeta function.

Newton series

The Newton series for the digamma, sometimes referred to as Stern series, derived by Moritz Abraham Stern in 1847,[12][13][14] reads

ψ(s)=γ+(s1)(s1)(s2)22!+(s1)(s2)(s3)33!,(s)>0,=γk=1(1)kk(s1k),(s)>0.

where Template:Math is the binomial coefficient. It may also be generalized to

ψ(s+1)=γ1mk=1m1mks+k1mk=1(1)kk{(s+mk+1)(sk+1)},(s)>1,

where Template:Math[13]

Series with Gregory's coefficients, Cauchy numbers and Bernoulli polynomials of the second kind

There exist various series for the digamma containing rational coefficients only for the rational arguments. In particular, the series with Gregory's coefficients Template:Math is

ψ(v)=lnvn=1|Gn|(n1)!(v)n,(v)>0,
ψ(v)=2lnΓ(v)2vlnv+2v+2lnvln2π2n=1|Gn(2)|(v)n(n1)!,(v)>0,
ψ(v)=3lnΓ(v)6ζ(1,v)+3v2lnv32v26vln(v)+3v+3lnv32ln2π+123n=1|Gn(3)|(v)n(n1)!,(v)>0,

where Template:Math is the rising factorial Template:Math, Template:Math are the Gregory coefficients of higher order with Template:Math, Template:Math is the gamma function and Template:Math is the Hurwitz zeta function.[15][13] Similar series with the Cauchy numbers of the second kind Template:Math reads[15][13]

ψ(v)=ln(v1)+n=1Cn(n1)!(v)n,(v)>1,

A series with the Bernoulli polynomials of the second kind has the following form[13]

ψ(v)=ln(v+a)+n=1(1)nψn(a)(n1)!(v)n,(v)>a,

where Template:Math are the Bernoulli polynomials of the second kind defined by the generating equation

z(1+z)aln(1+z)=n=0znψn(a),|z|<1,

It may be generalized to

ψ(v)=1rl=0r1ln(v+a+l)+1rn=1(1)nNn,r(a)(n1)!(v)n,(v)>a,r=1,2,3,

where the polynomials Template:Math are given by the following generating equation

(1+z)a+m(1+z)aln(1+z)=n=0Nn,m(a)zn,|z|<1,

so that Template:Math.[13] Similar expressions with the logarithm of the gamma function involve these formulas[13]

ψ(v)=1v+a12{lnΓ(v+a)+v12ln2π12+n=1(1)nψn+1(a)(v)n(n1)!},(v)>a,

and

ψ(v)=112r+v+a1{lnΓ(v+a)+v12ln2π12+1rn=0r2(rn1)ln(v+a+n)+1rn=1(1)nNn+1,r(a)(v)n(n1)!},

where (v)>a and r=2,3,4,.

Reflection formula

The digamma and polygamma functions satisfy reflection formulas similar to that of the gamma function:

ψ(1x)ψ(x)=πcotπx.
ψ(x)+ψ(x)=π2sin2(πx)+1x2.

Recurrence formula and characterization

The digamma function satisfies the recurrence relation

ψ(x+1)=ψ(x)+1x.

Thus, it can be said to "telescope" Template:Math, for one has

Δ[ψ](x)=1x

where Template:Math is the forward difference operator. This satisfies the recurrence relation of a partial sum of the harmonic series, thus implying the formula

ψ(n)=Hn1γ

where Template:Mvar is the Euler–Mascheroni constant.

Actually, Template:Mvar is the only solution of the functional equation

F(x+1)=F(x)+1x

that is monotonic on Template:Math and satisfies Template:Math. This fact follows immediately from the uniqueness of the Template:Math function given its recurrence equation and convexity restriction. This implies the useful difference equation:

ψ(x+N)ψ(x)=k=0N11x+k

Some finite sums involving the digamma function

There are numerous finite summation formulas for the digamma function. Basic summation formulas, such as

r=1mψ(rm)=m(γ+lnm),
r=1mψ(rm)exp2πrkim=mln(1exp2πkim),k,m, km
r=1m1ψ(rm)cos2πrkm=mln(2sinkπm)+γ,k=1,2,,m1
r=1m1ψ(rm)sin2πrkm=π2(2km),k=1,2,,m1

are due to Gauss.[16][17] More complicated formulas, such as

r=0m1ψ(2r+12m)cos(2r+1)kπm=mln(tanπk2m),k=1,2,,m1
r=0m1ψ(2r+12m)sin(2r+1)kπm=πm2,k=1,2,,m1
r=1m1ψ(rm)cotπrm=π(m1)(m2)6
r=1m1ψ(rm)rm=γ2(m1)m2lnmπ2r=1m1rmcotπrm
r=1m1ψ(rm)cos(2+1)πrm=πmr=1m1rsin2πrmcos2πrmcos(2+1)πm,
r=1m1ψ(rm)sin(2+1)πrm=(γ+ln2m)cot(2+1)π2m+sin(2+1)πmr=1m1lnsinπrmcos2πrmcos(2+1)πm,
r=1m1ψ2(rm)=(m1)γ2+m(2γ+ln4m)lnmm(m1)ln22+π2(m23m+2)12+m=1m1ln2sinπm

are due to works of certain modern authors (see e.g. Appendix B in Blagouchine (2014)[18]).

We also have [19]

1+12+13+...+1k1γ=1kn=0k1ψ(1+nk),k=2,3,...

Gauss's digamma theorem

For positive integers Template:Mvar and Template:Mvar (Template:Math), the digamma function may be expressed in terms of Euler's constant and a finite number of elementary functions[20]

ψ(rm)=γln(2m)π2cot(rπm)+2n=1m12cos(2πnrm)lnsin(πnm)

which holds, because of its recurrence equation, for all rational arguments.

Multiplication theorem

The multiplication theorem of the Γ-function is equivalent to[21]

ψ(nz)=1nk=0n1ψ(z+kn)+lnn.

Asymptotic expansion

The digamma function has the asymptotic expansion

ψ(z)lnz+n=1ζ(1n)zn=lnzn=1Bnnzn,

where Template:Mvar is the Template:Mvarth Bernoulli number and Template:Mvar is the Riemann zeta function. The first few terms of this expansion are:

ψ(z)lnz12z112z2+1120z41252z6+1240z81132z10+69132760z12112z14+.

Although the infinite sum does not converge for any Template:Mvar, any finite partial sum becomes increasingly accurate as Template:Mvar increases.

The expansion can be found by applying the Euler–Maclaurin formula to the sum[22]

n=1(1n1z+n)

The expansion can also be derived from the integral representation coming from Binet's second integral formula for the gamma function. Expanding t/(t2+z2) as a geometric series and substituting an integral representation of the Bernoulli numbers leads to the same asymptotic series as above. Furthermore, expanding only finitely many terms of the series gives a formula with an explicit error term:

ψ(z)=lnz12zn=1NB2n2nz2n+(1)N+12z2N0t2N+1dt(t2+z2)(e2πt1).

Inequalities

When Template:Math, the function

lnx12xψ(x)

is completely monotonic and in particular positive. This is a consequence of Bernstein's theorem on monotone functions applied to the integral representation coming from Binet's first integral for the gamma function. Additionally, by the convexity inequality 1+tet, the integrand in this representation is bounded above by etz/2. Template:Not a typo

1xlnx+ψ(x)

is also completely monotonic. It follows that, for all Template:Math,

lnx1xψ(x)lnx12x.

This recovers a theorem of Horst Alzer.[23] Alzer also proved that, for Template:Math,

1sx+s<ψ(x+1)ψ(x+s),

Related bounds were obtained by Elezovic, Giordano, and Pecaric, who proved that, for Template:Math,

ln(x+12)1x<ψ(x)<ln(x+eγ)1x,

where γ=ψ(1) is the Euler–Mascheroni constant.[24] The constants (0.5 and eγ0.56) appearing in these bounds are the best possible.[25]

The mean value theorem implies the following analog of Gautschi's inequality: If Template:Math, where Template:Math is the unique positive real root of the digamma function, and if Template:Math, then

exp((1s)ψ(x+1)ψ(x+1))ψ(x+1)ψ(x+s)exp((1s)ψ(x+s)ψ(x+s)).

Moreover, equality holds if and only if Template:Math.[26]

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:

γ2ψ(x)ψ(1x)ψ(x)+ψ(1x) for x>0

Equality holds if and only if x=1.[27]

Computation and approximation

The asymptotic expansion gives an easy way to compute Template:Math when the real part of Template:Mvar is large. To compute Template:Math for small Template:Mvar, the recurrence relation

ψ(x+1)=1x+ψ(x)

can be used to shift the value of Template:Mvar to a higher value. Beal[28] suggests using the above recurrence to shift Template:Mvar to a value greater than 6 and then applying the above expansion with terms above Template:Math cut off, which yields "more than enough precision" (at least 12 digits except near the zeroes).

As Template:Mvar goes to infinity, Template:Math gets arbitrarily close to both Template:Math and Template:Math. Going down from Template:Math to Template:Mvar, Template:Mvar decreases by Template:Math, Template:Math decreases by Template:Math, which is more than Template:Math, and Template:Math decreases by Template:Math, which is less than Template:Math. From this we see that for any positive Template:Mvar greater than Template:Math,

ψ(x)(ln(x12),lnx)

or, for any positive Template:Mvar,

expψ(x)(x12,x).

The exponential Template:Math is approximately Template:Math for large Template:Mvar, but gets closer to Template:Mvar at small Template:Mvar, approaching 0 at Template:Math.

For Template:Math, we can calculate limits based on the fact that between 1 and 2, Template:Math, so

ψ(x)(1xγ,11xγ),x(0,1)

or

expψ(x)(exp(1xγ),eexp(1xγ)).

From the above asymptotic series for Template:Mvar, one can derive an asymptotic series for Template:Math. 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.

1expψ(x)1x+12x2+543!x3+324!x4+47485!x55166!x6+

This is similar to a Taylor expansion of Template:Math at Template:Math, but it does not converge.[29] (The function is not analytic at infinity.) A similar series exists for Template:Math which starts with expψ(x)x12.

If one calculates the asymptotic series for Template:Math it turns out that there are no odd powers of Template:Mvar (there is no Template:Mvar−1 term). This leads to the following asymptotic expansion, which saves computing terms of even order.

expψ(x+12)x+14!x3786!x3+10313728!x5550912138410!x7+

Similar in spirit to the Lanczos approximation of the Γ-function is Spouge's approximation.

Another alternative is to use the recurrence relation or the multiplication formula to shift the argument of ψ(x) into the range 1x3 and to evaluate the Chebyshev series there.[30][31]

Special values

The digamma function has values in closed form for rational numbers, as a result of Gauss's digamma theorem. Some are listed below:

ψ(1)=γψ(12)=2ln2γψ(13)=π233ln32γψ(14)=π23ln2γψ(16)=π322ln23ln32γψ(18)=π24ln2π+ln(2+1)ln(21)2γ.

Moreover, by taking the logarithmic derivative of |Γ(bi)|2 or |Γ(12+bi)|2 where b is real-valued, it can easily be deduced that

Imψ(bi)=12b+π2coth(πb),
Imψ(12+bi)=π2tanh(πb).

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

Reψ(i)=γn=0n1n3+n2+n+10.09465.

Roots of the digamma function

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 Template:Math at Template:Math. All others occur single between the poles on the negative axis:

Template:Math
Template:Math
Template:Math
Template:Math

Already in 1881, Charles Hermite observed[32] that

xn=n+1lnn+O(1(lnn)2)

holds asymptotically. A better approximation of the location of the roots is given by

xnn+1πarctan(πlnn)n2

and using a further term it becomes still better

xnn+1πarctan(πlnn+18n)n1

which both spring off the reflection formula via

0=ψ(1xn)=ψ(xn)+πtanπxn

and substituting Template:Math by its not convergent asymptotic expansion. The correct second term of this expansion is Template:Math, where the given one works well to approximate roots with small Template:Mvar.

Another improvement of Hermite's formula can be given:[11]

xn=n+1logn12n(logn)2+O(1n2(logn)2).

Regarding the zeros, the following infinite sum identities were recently proved by István Mező and Michael Hoffman[11][33]

n=01xn2=γ2+π22,n=01xn3=4ζ(3)γ3γπ22,n=01xn4=γ4+π49+23γ2π2+4γζ(3).

In general, the function

Z(k)=n=01xnk

can be determined and it is studied in detail by the cited authors.

The following results[11]

n=01xn2+xn=2,n=01xn2xn=γ+π26γ

also hold true.

Regularization

The digamma function appears in the regularization of divergent integrals

0dxx+a,

this integral can be approximated by a divergent general Harmonic series, but the following value can be attached to the series

n=01n+a=ψ(a).

In applied mathematics

Many notable probability distributions use the gamma function in the definition of their probability density or mass functions. Then in statistics when doing maximum likelihood estimation on models involving such distributions, the digamma function naturally appears when the derivative of the log-likelihood is taken for finding the maxima.

See also

References

  1. 1.0 1.1 Template:Cite book
  2. Template:Cite web
  3. Template:Mathworld
  4. Template:Cite journal
  5. Template:Cite web
  6. Template:Cite book
  7. 7.0 7.1 Whittaker and Watson, 12.3.
  8. Whittaker and Watson, 12.31.
  9. Whittaker and Watson, 12.32, example.
  10. Template:Cite web
  11. 11.0 11.1 11.2 11.3 Template:Cite journal
  12. Template:Cite book
  13. 13.0 13.1 13.2 13.3 13.4 13.5 13.6 Template:Cite journal
  14. Template:Cite web
  15. 15.0 15.1 Template:Cite journal
  16. R. Campbell. Les intégrales eulériennes et leurs applications, Dunod, Paris, 1966.
  17. H.M. Srivastava and J. Choi. Series Associated with the Zeta and Related Functions, Kluwer Academic Publishers, the Netherlands, 2001.
  18. Template:Cite journal
  19. Template:Cite book
  20. Template:Cite journal
  21. Template:Cite book
  22. Template:Cite journal
  23. Template:Cite journal
  24. Template:Cite journal
  25. Template:Cite journal
  26. Template:Cite journal
  27. Template:Cite journal
  28. Template:Cite thesis
  29. If it converged to a function Template:Math then Template:Math would have the same Maclaurin series as Template:Math. But this does not converge because the series given earlier for Template:Math does not converge.
  30. Template:Cite journal
  31. Template:Cite journal App. E
  32. Template:Cite journal
  33. Template:Cite arXiv
Template:OEIS2C psi(1/3), Template:OEIS2C psi(2/3), Template:OEIS2C psi(1/4), Template:OEIS2C psi(3/4), Template:OEIS2C to Template:OEIS2C psi(1/5) to psi(4/5).