The digamma function, denoted \psi(z), is a special function in complex analysis defined as the logarithmic derivative of the gamma function \Gamma(z), specifically \psi(z) = \frac{\Gamma'(z)}{\Gamma(z)} for z \in \mathbb{C} \setminus \{0, -1, -2, \dots \}.[1] This definition extends the concept of the derivative of the logarithm, making \psi(z) meromorphic across the complex plane with simple poles of residue -1 at the non-positive integers.[1] The digamma function serves as the basis for the polygamma functions of order n \geq 1, defined as the successive derivatives \psi^{(n)}(z) = \frac{d^n}{dz^n} \psi(z), where \psi^{(1)}(z) = \psi'(z) is the trigamma function. It captures essential behaviors of the gamma function's growth and oscillation.[2]Key properties of the digamma function include its reflection formula \psi(1 - z) - \psi(z) = \pi \cot(\pi z) and the recurrence relation \psi(z+1) = \psi(z) + \frac{1}{z}, which facilitate computation and analytic continuation. For positive integers n, it relates directly to the harmonic numbers H_n = \sum_{k=1}^n \frac{1}{k} via \psi(n+1) = H_n - \gamma, where \gamma \approx 0.57721 is the Euler-Mascheroni constant, and \psi(1) = -\gamma.[3] Series representations, such as \psi(z) = -\gamma + \sum_{k=0}^\infty \left( \frac{1}{k+1} - \frac{1}{k+z} \right) for \Re z > 0, and asymptotic expansions like \psi(z) \sim \ln z - \frac{1}{2z} - \sum_{k=1}^\infty \frac{B_{2k}}{2k z^{2k}} as |z| \to \infty in |\arg z| < \pi, highlight its utility in approximations and limits. These features underscore its foundational role in special functions theory.The digamma function finds broad applications across mathematics and related fields, including number theory through connections to the Riemann zeta function via \psi'(1) = \zeta(2) = \frac{\pi^2}{6}, and in statistics where it appears in the expected value of the logarithm of gamma-distributed variables, such as \mathbb{E}[\ln W] = \psi(\alpha) for W \sim \Gamma(\alpha, 1).[2] Its derivative, the trigamma function, computes variances like \mathrm{Var}(\ln W) = \psi'(\alpha), aiding inference in gamma and beta distributions.[4] In physics, it supports models in statistical mechanics and stellar evolution by providing exact expressions for partition functions and energy distributions derived from hypergeometric forms.[5] Additionally, generalizations such as the k-digamma function, defined via the k-gamma function, extend its applications to studies involving complete monotonicity and infinite series analysis.[6]
Definition and Basic Properties
Definition
The digamma function, commonly denoted by \psi(z), is defined as the logarithmic derivative of the gamma function \Gamma(z):\psi(z) = \frac{d}{dz} \ln \Gamma(z) = \frac{\Gamma'(z)}{\Gamma(z)},where z is a complex number not equal to a non-positive integer. This definition positions the digamma function as a key analytic tool for studying properties of the gamma function through differentiation.The digamma function was first studied by James Stirling in 1730 and later contributed to by Carl Friedrich Gauss in 1813 through his investigations into series expansions related to the gamma function, marking it as the first in the family of polygamma functions.[7]The digamma function naturally arises in the differentiation of expressions involving the gamma function, such as in the analysis of factorial generalizations and their applications in probability distributions and special function theory.[8]
Relation to Gamma function
The digamma function \psi(z) is defined as the logarithmic derivative of the gamma function \Gamma(z), given by\psi(z) = \frac{d}{dz} \ln \Gamma(z) = \frac{\Gamma'(z)}{\Gamma(z)}.This representation holds for \operatorname{Re} z > 0, with analytic continuation to the meromorphic function on the complex plane excluding the non-positive integers. The Weierstrass canonical product form of the gamma function implies that \Gamma(z) has simple poles at z = 0, -1, -2, \dots, and consequently \psi(z) inherits simple poles at these points, each with residue -1.From the functional equation of the gamma function, \Gamma(z+1) = z \Gamma(z), taking the logarithmic derivative on both sides yields the basic recurrence relation\psi(z+1) = \psi(z) + \frac{1}{z},valid for z \neq 0, -1, -2, \dots. This relation highlights the digamma function's role in extending properties of the gamma function to difference equations.The digamma function serves as the zeroth-order case in the family of polygamma functions, denoted \psi^{(0)}(z) = \psi(z). Higher-order polygamma functions are defined as the successive derivatives,\psi^{(m)}(z) = \frac{d^m}{dz^m} \psi(z), \quad m \geq 1,which are also meromorphic with poles of order m+1 at the non-positive integers.[2]The digamma function is uniquely characterized as the meromorphic solution to the recurrence \psi(z+1) = \psi(z) + 1/z that satisfies the asymptotic growth condition \psi(z) \sim \ln z - 1/(2z) as |z| \to \infty in |\arg z| \leq \pi - \delta for any fixed \delta > 0. This uniqueness parallels the Bohr–Mollerup characterization of the gamma function itself via its recurrence and log-convexity.
Connection to harmonic numbers
The digamma function provides a natural extension of the harmonic numbers to non-integer arguments. For positive integers n, the digamma function evaluates to \psi(n+1) = -\gamma + H_n, where H_n = \sum_{k=1}^n \frac{1}{k} is the nth harmonic number and \gamma is the Euler-Mascheroni constant.\] This relation follows from the recurrence property of the digamma function and the limiting definition of $\gamma = \lim_{m \to \infty} (H_m - \ln m)$.\[ Equivalently, \gamma = -\psi(1), a characterization that links the constant directly to the digamma function at the origin of the positive reals.\] Leonhard Euler introduced $\gamma$ in 1734 while studying the divergence of the harmonic series, recognizing its role in bridging discrete sums and continuous logarithms.\[This integer case generalizes to complex arguments z with \operatorname{Re}(z) > 0 through the series representation \psi(z+1) = -\gamma + \sum_{k=1}^\infty \left( \frac{1}{k} - \frac{1}{k+z} \right). This expression interpolates the harmonic numbers, as the partial sum up to N approximates H_N - \sum_{k=1}^N \frac{1}{k+z}, which converges to the full form as N \to \infty. The series embodies the conceptual shift from finite harmonic sums to an infinite difference that defines the digamma for non-integers, preserving the asymptotic behavior near integers.A useful consequence arises in differences of digamma values: for \operatorname{Re}(a) > 0 and \operatorname{Re}(b) > 0, \psi(a) - \psi(b) = \sum_{k=0}^\infty \left( \frac{1}{b+k} - \frac{1}{a+k} \right). This formula, derived from the series expansion of \psi, facilitates evaluations in applications such as summation identities and integral approximations where harmonic-like differences appear. It highlights the digamma's role in unifying discrete and continuous harmonic structures.
Mathematical Representations
Integral representations
One of the fundamental integral representations of the digamma function \psi(z) for \operatorname{Re}(z) > 0 is given by\psi(z) = \int_0^\infty \left( \frac{e^{-t}}{t} - \frac{e^{-zt}}{1 - e^{-t}} \right) \, dt.This form arises from regularizing the divergent integral \int_0^\infty e^{-t}/t \, dt against the geometric series expansion of $1/(1 - e^{-t}), providing a principal value interpretation that converges in the specified half-plane.An alternative representation, also valid for \operatorname{Re}(z) > 0, expresses the digamma function in terms of an integral over the unit interval:\psi(z) = -\gamma + \int_0^1 \frac{1 - t^{z-1}}{1 - t} \, dt,where \gamma is the Euler-Mascheroni constant.
This form is particularly useful for computational purposes when z is close to positive integers, as the integrand simplifies near those points.The digamma function can also be derived directly from the integral representation of the gamma function \Gamma(z) = \int_0^\infty t^{z-1} e^{-t} \, dt for \operatorname{Re}(z) > 0 by differentiating under the integral sign with respect to z, yielding\psi(z) = \frac{\Gamma'(z)}{\Gamma(z)} = \frac{1}{\Gamma(z)} \int_0^\infty t^{z-1} e^{-t} \ln t \, dt.This expression highlights the connection to the logarithmic derivative and is justified by the dominated convergence theorem applied to the parameter differentiation, ensuring validity in the right half-plane.For analytic continuation to the entire complex plane except non-positive integers, a contour integral representation using the Hankel contour H (which starts at +\infty, proceeds to the origin just above the positive real axis, encircles the origin counterclockwise, and returns to +\infty just below the positive real axis) is\psi(z) = \int_H \frac{\pi \cot(\pi \zeta)}{z + \zeta} \, d\zeta.[9]
This form captures the poles of \cot(\pi \zeta) at integers, reproducing the recurrence properties of \psi(z), and extends the function meromorphically.
Series representations
The digamma function admits a fundamental series representation\psi(z+1) = -\gamma + \sum_{k=1}^{\infty} \left( \frac{1}{k} - \frac{1}{k+z} \right),valid for \operatorname{Re}(z) > -1 and z \neq 0, -1, -2, \dots. This form arises from the Weierstrass product for the gamma function and is useful for numerical evaluation away from poles.An equivalent expression is\psi(z) = -\gamma - \frac{1}{z} + \sum_{k=1}^{\infty} \frac{z}{k(k+z)},also holding under the same conditions.The Taylor series expansion of the digamma function about z=1 is\psi(1+z) = -\gamma + \sum_{k=2}^{\infty} (-1)^{k} \zeta(k) z^{k-1},convergent for |z| < 1, where \zeta(k) denotes the Riemann zeta function at positive integers k \geq 2. This series reflects the analytic continuation and provides coefficients directly tied to zeta values, facilitating approximations near z=1.Equivalently, shifting the index yields\psi(1+z) = -\gamma + \sum_{n=1}^{\infty} (-1)^{n+1} \zeta(n+1) z^{n},with the same radius of convergence.The Newton series, also known as the Stern series, expresses the digamma function in the binomial basis as an interpolation form using forward differences:\psi(s+1) = -\gamma - \sum_{k=1}^{\infty} \frac{(-1)^{k}}{k} \binom{s}{k},valid for |s| < 1. This representation leverages the recurrence \psi(s+2) - \psi(s+1) = 1/(s+1) and converges to the Taylor expansion in the binomial transform.[10]Another series expansion involves the Bernoulli polynomials of the second kind b_{n}(x), defined via the generating function \frac{t}{\mathrm{e}^{t}-1} \mathrm{e}^{xt} = \sum_{n=0}^{\infty} b_{n}(x) \frac{t^{n}}{n!}:\psi(x) = -\gamma - \frac{1}{x} + \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k} b_{k-1}(x),for x > 0. The Bernoulli polynomials of the second kind connect to Gregory coefficients G_{n} = (-1)^{n} b_{n}(0) and Cauchy numbers of the first kind, providing a basis for expressing the digamma in terms of signed stirling-like structures.These series representations enable evaluation of certain rational sums; for example, the infinite sum \sum_{k=1}^{\infty} \frac{1}{k(k+m)} = \frac{\psi(m+1) + \gamma}{m} for positive integer m, derived by partial fractions and the general series form.
Infinite product representation
The infinite product representation of the digamma function \psi(z) is derived from the Weierstrass form of the gamma function \Gamma(z). The reciprocal of the gamma function is expressed as\frac{1}{\Gamma(z)} = z e^{\gamma z} \prod_{k=1}^\infty \left(1 + \frac{z}{k}\right) e^{-z/k},where \gamma is the Euler-Mascheroni constant.
Taking the natural logarithm yields\ln\left(\frac{1}{\Gamma(z)}\right) = \ln z + \gamma z + \sum_{k=1}^\infty \left[ \ln\left(1 + \frac{z}{k}\right) - \frac{z}{k} \right].Differentiating both sides with respect to z gives-\frac{\Gamma'(z)}{\Gamma(z)} = \frac{1}{z} + \gamma + \sum_{k=1}^\infty \left[ \frac{1}{k + z} - \frac{1}{k} \right],and since \psi(z) = \Gamma'(z)/\Gamma(z), it follows that\psi(z) = -\gamma - \frac{1}{z} + \sum_{k=1}^\infty \left[ \frac{1}{k} - \frac{1}{k + z} \right].This series converges for all complex z except the non-positive integers.An equivalent form is obtained by rewriting the terms in the sum:\sum_{k=1}^\infty \left[ \frac{1}{k} - \frac{1}{k + z} \right] = \sum_{k=1}^\infty \frac{z}{k(k + z)},so\psi(z) = -\gamma + \sum_{k=0}^\infty \left[ \frac{1}{k+1} - \frac{1}{k + z} \right] = -\gamma + \sum_{k=0}^\infty \frac{z}{(k+1)(k + z)}.This representation also holds for \operatorname{Re} z > 0, with analytic continuation to the rest of the complex plane.The Weierstrass product ensures the meromorphicity of \Gamma(z) on the complex plane, with simple poles at the non-positive integers and no zeros, implying that \psi(z) is meromorphic with simple poles at these points, each of residue -1.
Functional Equations
Recurrence relation
The digamma function satisfies the functional recurrence relation\psi(z+1) = \psi(z) + \frac{1}{z},which follows directly from differentiating the recurrence equation \Gamma(z+1) = z \Gamma(z) for the gamma function and using the definition \psi(z) = \frac{\Gamma'(z)}{\Gamma(z)}. This relation holds for all complex z not equal to a non-positive integer, where \psi(z) has simple poles.By iterated application of the recurrence, a generalization holds for any positive integer n:\psi(z + n) = \psi(z) + \sum_{k=0}^{n-1} \frac{1}{z + k}.This finite sum expresses the shift by n units in terms of the original value plus harmonic-like terms, facilitating computations for arguments with positive real part.[8]The digamma function is the unique meromorphic function on the complex plane satisfying the recurrence \psi(z+1) = \psi(z) + 1/z together with the asymptotic behavior\psi(z) \sim \ln z - \frac{1}{2z}as |z| \to \infty in the sector |\arg z| < \pi. This characterization, combining the iterative property with the leading asymptotic terms derived from Stirling's series for the gamma function, uniquely determines \psi(z) among meromorphic functions with simple poles at the non-positive integers.The recurrence is equivalently expressed in difference form as the first forward difference \psi(z+1) - \psi(z) = 1/z. Higher-order forward differences of \psi(z) connect to the polygamma functions of positive order, where the m-th polygamma function \psi^{(m)}(z) (for m \geq 1) satisfies \psi^{(m)}(z+1) - \psi^{(m)}(z) = (-1)^{m+1} m! \, z^{-(m+1)}.
Reflection formula
The reflection formula for the digamma function relates the values at z and $1 - z:\psi(1 - z) - \psi(z) = \pi \cot(\pi z)for complex z not equal to an integer.This formula is derived from the reflection formula for the gamma function,\Gamma(z) \Gamma(1 - z) = \frac{\pi}{\sin(\pi z)},by taking the natural logarithm of both sides and differentiating with respect to z:\frac{\Gamma'(z)}{\Gamma(z)} + \frac{\Gamma'(1 - z)}{\Gamma(1 - z)} \cdot (-1) = -\frac{\pi \cos(\pi z)}{\sin(\pi z)}.Substituting the definition \psi(w) = \Gamma'(w)/\Gamma(w) yields\psi(z) - \psi(1 - z) = -\pi \cot(\pi z),which rearranges to the desired result.The reflection formula enables analytic continuation of the digamma function across the complex plane, particularly to regions near negative non-integer values, by relating values across the unit interval. It also aids in evaluating the digamma function at half-integer points; for instance, combined with the recurrence relation \psi(z + 1) = \psi(z) + 1/z, it allows computation of \psi(3/2) = \psi(1/2) + 2 once \psi(1/2) = -\gamma - 2\ln 2 is known from other representations.Differentiating the reflection formula with respect to z gives the corresponding relation for the trigamma function \psi_1(z) = \frac{d}{dz} \psi(z):\psi_1(1 - z) + \psi_1(z) = \pi^2 \csc^2(\pi z).This extension follows directly from the chain rule applied to the left side and the derivative of \cot(\pi z) on the right.[11]
Multiplication theorem
The multiplication theorem for the digamma function provides a relation between the value of \psi(mz) and the average of shifted digamma values for positive integers m. Specifically, for mz \neq 0, -1, -2, \dots,\psi(mz) = \ln m + \frac{1}{m} \sum_{k=0}^{m-1} \psi\left(z + \frac{k}{m}\right).This formula generalizes the scaling properties of the digamma function and is valid for complex z in the appropriate domain where the terms are defined.The theorem is derived from Gauss's multiplication formula for the gamma function, which states that for positive integers m,\Gamma(mz) = (2\pi)^{(1-m)/2} m^{mz - 1/2} \prod_{k=0}^{m-1} \Gamma\left(z + \frac{k}{m}\right).Taking the natural logarithm of both sides and differentiating with respect to z yields \psi(mz) \cdot m \Gamma(mz) = \frac{d}{dz} \left[ \ln \left( (2\pi)^{(1-m)/2} m^{mz - 1/2} \right) \cdot \Gamma(mz) + \sum_{k=0}^{m-1} \ln \Gamma\left(z + \frac{k}{m}\right) \right], which simplifies via the definition \psi(w) = \frac{\Gamma'(w)}{\Gamma(w)} to the multiplication theorem after algebraic rearrangement.A special case occurs for m=2, known as the duplication formula:\psi(2z) = \frac{1}{2} \psi(z) + \frac{1}{2} \psi\left(z + \frac{1}{2}\right) + \ln 2.This relation is particularly useful for computing digamma values at even multiples and follows directly from substituting m=2 into the general formula.The multiplication theorem connects to higher-order generalizations, such as the multiple gamma functions introduced by Barnes, where the logarithmic derivative of the Barnes G-function or multiple gamma yields sums involving digamma functions at fractional shifts, extending the theorem to non-integer orders.
Gauss's digamma theorem
Gauss's digamma theorem provides an explicit closed-form expression for the value of the digamma function \psi(z) at rational arguments z = p/q, where p and q are positive integers with $1 \leq p < q and \gcd(p, q) = 1. The theorem states that\psi\left( \frac{p}{q} \right) = -\gamma - \log(2q) - \frac{\pi}{2} \cot\left( \frac{\pi p}{q} \right) + 2 \sum_{j=1}^{\lfloor q/2 \rfloor} \cos\left( \frac{2\pi p j}{q} \right) \log \sin\left( \frac{\pi j}{q} \right),where \gamma is the Euler-Mascheroni constant.[12] This formula expresses \psi(p/q) in terms of elementary functions, the Euler-Mascheroni constant, and logarithms of sines, which are algebraic numbers related to the cyclotomic field \mathbb{Q}(\zeta_q), where \zeta_q = e^{2\pi i / q}. The theorem holds for both odd and even q, though the sum simplifies naturally for odd q without a middle term contributing nontrivially.The formula originates from the work of Carl Friedrich Gauss, who derived it in his 1813 memoir on the hypergeometric series, where he analyzed the infinite product representations and limiting behaviors connected to the gamma function. Gauss's result was a significant advancement in understanding special values of the digamma function, building on Euler's earlier studies of the gamma function and harmonic numbers. Subsequent expositions, such as those by Jensen and Lehmer, refined and verified the expression using complex analysis and properties of the sine product.[12]A special case of the theorem arises when p = 1, giving an explicit form for \psi(1/q):\psi\left( \frac{1}{q} \right) = -\gamma - \log(2q) - \frac{\pi}{2} \cot\left( \frac{\pi}{q} \right) + 2 \sum_{j=1}^{\lfloor q/2 \rfloor} \cos\left( \frac{2\pi j}{q} \right) \log \sin\left( \frac{\pi j}{q} \right).This can alternatively be expressed using sums over quadratic residues modulo q, leveraging the real parts of logarithms of roots of unity, though the trigonometric form is more direct for computation.[12]The derivation of Gauss's theorem relies on the multiplication theorem for the digamma function and the reflection formula. The multiplication theorem states that for positive integer m,\psi(m z) = \log m + \frac{1}{m} \sum_{k=0}^{m-1} \psi\left( z + \frac{k}{m} \right).Setting z = 1/m yields \psi(1) = -\gamma = \log m + \frac{1}{m} \sum_{k=0}^{m-1} \psi\left( \frac{1 + k}{m} \right), or equivalently,\sum_{k=1}^{m-1} \psi\left( \frac{k}{m} \right) = -m \gamma - m \log m.The reflection formula \psi(1 - x) - \psi(x) = \pi \cot(\pi x) then pairs terms: for k = 1 to (m-1)/2 (assuming m odd for simplicity),\psi\left( \frac{k}{m} \right) + \psi\left( 1 - \frac{k}{m} \right) = \pi \cot\left( \frac{\pi k}{m} \right).Summing these pairs gives the cotangent contributions. To isolate individual \psi(p/m), one applies the Weierstrass infinite product for the gamma function, takes the logarithmic derivative, and uses Fourier expansion or limiting processes on the sine product \sin(\pi z) = \pi z \prod_{k=1}^\infty (1 - z^2/k^2), leading to the cosine-log-sine sum after separating real and imaginary parts in the complex logarithm.[13] This approach, originally due to Gauss, connects the rational evaluation to the periodicity and symmetry of the cotangent and sine functions.
Special Values and Sums
Special values
The digamma function admits closed-form expressions at positive integers, half-integers, and certain rational arguments, often involving the Euler-Mascheroni constant γ, natural logarithms, and trigonometric constants. These values arise from the functional equations and integral representations of the function.[14]At positive integers n ≥ 1, the digamma function is expressed using harmonic numbers as ψ(n) = -γ + H_{n-1}, where H_m = ∑_{k=1}^m 1/k is the mth harmonic number. Specific cases include ψ(1) = -γ, ψ(2) = -γ + 1, and ψ(3) = -γ + 3/2.[14]At half-integer arguments, the values are ψ(1/2) = -γ - 2 \ln 2 and ψ(3/2) = -γ + 2 - 2 \ln 2.[14]Closed-form expressions for the digamma function at other rational points follow from Gauss's digamma theorem, which provides a summation formula reducible to elementary terms for small denominators. For instance, at 1/3, ψ(1/3) = -γ - \frac{\pi}{2\sqrt{3}} - \frac{3}{2} \ln 3.[14]The digamma function has simple poles at non-positive integers z = 0, -1, -2, \dots, each with residue -1, so ψ(z) \to -\infty as z \to 0^+. Near a pole at z = -n for nonnegative integer n and small positive ε, the leading behavior is ψ(-n + ε) \approx -1/ε - γ + H_n.[14]Exact values at reciprocals of small integers 1/k (k = 1 to 6) are given in the following table, derived via the reflection formula or Gauss's digamma theorem:
The digamma function provides closed-form expressions for various finite sums related to harmonic numbers. Specifically, the (n-1)th harmonic number H_{n-1} = \sum_{k=1}^{n-1} \frac{1}{k} is given by H_{n-1} = \psi(n) + \gamma, where \gamma is the Euler-Mascheroni constant.[8] This relation follows from the definition \psi(n) = -\gamma + H_{n-1} for positive integers n \geq 1.[8]More generally, partial sums of the harmonic series can be expressed using differences of the digamma function. The sum \sum_{k=m}^{n} \frac{1}{k} = H_n - H_{m-1} = \psi(n+1) - \psi(m), for positive integers $1 \leq m \leq n.[8] This identity arises directly from the harmonic number representation and the recurrence property of the digamma function, \psi(z+1) = \psi(z) + \frac{1}{z}.[8]The sum of the first n digamma values at positive integers also admits a closed form: \sum_{k=1}^n \psi(k) = n \psi(n) - n + 1. This expression is derived from the relation \psi(k) = -\gamma + H_{k-1} and the known summation formula for harmonic numbers, \sum_{k=1}^{n-1} H_k = n H_{n-1} - (n-1), yielding an exact result without asymptotic terms.A notable multidimensional-like finite sum arises from the multiplication theorem of the digamma function: \sum_{k=0}^{m-1} \psi\left(1 + \frac{k}{m}\right) = m \psi(m) - m \ln m, for positive integer m \geq 2. Excluding the k=0 term, where \psi(1) = -\gamma, gives \sum_{k=1}^{m-1} \psi\left(1 + \frac{k}{m}\right) = m \psi(m) - m \ln m + \gamma. This sum evaluates rational-point arguments of the digamma function and connects to Gauss's digamma theorem for related rational evaluations.
Sums involving rational functions
The digamma function provides a closed-form expression for certain infinite sums arising from differences of harmonic-like terms, which often appear in the partial fraction decomposition of rational functions. Specifically, the sum \sum_{k=1}^{\infty} \left[ \frac{1}{k+a} - \frac{1}{k+b} \right] = \psi(b+1) - \psi(a+1) holds for \Re(a) > -1, \Re(b) > -1, and a \neq b, where the convergence follows from the asymptotic behavior of the digamma function. This identity derives directly from the infinite series representation of the digamma function, \psi(z) = -\gamma + \sum_{k=1}^{\infty} \left[ \frac{1}{k} - \frac{1}{k+z-1} \right] for \Re(z) > 0, by subtracting the series for \psi(a+1) and \psi(b+1).Rational functions of the form $1/(k(k+m)), where m is a positive integer, can be decomposed using partial fractions as \frac{1}{k(k+m)} = \frac{1}{m} \left( \frac{1}{k} - \frac{1}{k+m} \right). The infinite sum then becomes \sum_{k=1}^{\infty} \frac{1}{k(k+m)} = \frac{1}{m} \sum_{k=1}^{\infty} \left[ \frac{1}{k} - \frac{1}{k+m} \right] = \frac{\psi(m+1) + \gamma}{m}, since \psi(1) = -\gamma. This evaluation leverages the aforementioned difference formula with a = 0 and b = m, highlighting the digamma function's role in summing first-order rational terms. More generally, partial fraction expansions of rational functions with simple poles lead to linear combinations of such digamma differences, enabling closed-form results for a broad class of series.For finite sums, telescoping series provide an initial approach that connects to the digamma function in the limit. For instance, \sum_{k=1}^{n} \frac{1}{k(k+1)} = \sum_{k=1}^{n} \left( \frac{1}{k} - \frac{1}{k+1} \right) = 1 - \frac{1}{n+1}, which approaches 1 as n \to \infty and aligns with the infinite sum formula using the recurrence relation \psi(z+1) = \psi(z) + 1/z. Extending to higher-degree rationals, such as those decomposable into first-order differences, the partial sums can be expressed as \psi(n+a+1) - \psi(a+1) - [\psi(n+b+1) - \psi(b+1)], though the focus here remains on the infinite case where the digamma directly yields the exact value.While higher-order polygamma functions handle sums like \sum_{k=-\infty}^{\infty} \frac{1}{(k+z)^2} = \psi_1(z) + \psi_1(1 - z) (the trigamma function), the digamma specializes to first-order rational sums, emphasizing differences rather than derivatives. These representations are foundational in evaluating series in complex analysis and special functions, often appearing in integral transforms and residue computations.[15]
Asymptotic Behavior and Inequalities
Asymptotic expansion
The asymptotic expansion of the digamma function \psi(z) for large |z| is derived from the Stirling series for the logarithm of the gamma function, \operatorname{Ln} \Gamma(z), by term-by-term differentiation, since \psi(z) = \frac{d}{dz} \operatorname{Ln} \Gamma(z).[16]As z \to \infty in the sector |\arg z| < \pi, the leading terms of the expansion are given by\psi(z) \sim \ln z - \frac{1}{2z} - \sum_{k=1}^\infty \frac{B_{2k}}{2k z^{2k}},where B_{2k} denotes the $2k-th Bernoulli number. This series is divergent but provides a useful asymptotic approximation when truncated appropriately.The full Stirling series is\operatorname{Ln} \Gamma(z) \sim \left(z - \frac{1}{2}\right) \ln z - z + \frac{1}{2} \ln (2\pi) + \sum_{m=1}^\infty \frac{B_{2m}}{2m(2m-1) z^{2m-1}},valid under the same sector condition. Differentiating this yields the expansion for \psi(z), confirming the form above, with the sum arising from the derivatives of the higher-order terms in the Stirling approximation.[16]The remainder after truncating the series at the term involving B_{2N} is O(1/|z|^{2N+1}) as |z| \to \infty. For positive real z > 0, the remainder has the same sign as the first neglected term and is bounded by its absolute value; in the complex case, the bound involves a factor of \sec^{2N+1}(\frac{1}{2} \arg z) times the first neglected term.[16]
Inequalities
The digamma function \psi(x) is strictly increasing on (0, \infty), since its first derivative, the trigamma function \psi'(x), satisfies \psi'(x) > 0 for all x > 0. This monotonicity follows from the integral representation \psi'(x) = \int_0^\infty \frac{t e^{-x t}}{1 - e^{-t}} \, dt > 0.[17]Additionally, \psi(x) is strictly concave on (0, \infty), as its second derivative, the polygamma function of order 2, is negative there. This concavity implies Jensen-type inequalities: for weights \lambda_i \geq 0 with \sum \lambda_i = 1 and points x_i > 0, \psi\left( \sum \lambda_i x_i \right) \geq \sum \lambda_i \psi(x_i).[18]Several useful bounds exist for \psi(x). For x > 1, the inequality \ln(x - 1/2) < \psi(x) < \ln x holds, providing simple logarithmic enclosures. From the asymptotic expansion, truncating after the $1/x^2 term yields \psi(x) = \ln x - \frac{1}{2x} - \frac{1}{12 x^2} + \frac{\theta(x)}{x^2}, where |\theta(x)| \leq \frac{1}{120} for x > 0.[19]For differences, since the trigamma function satisfies \psi'(z) > 1/z^2 for z > 0, integration gives \psi(x) - \psi(y) > \int_y^x \frac{1}{z^2} \, dz = \frac{x - y}{x y} whenever $0 < y < x. This follows from the integral representation \psi'(z) = \int_0^\infty \frac{t e^{-z t}}{1 - e^{-t}} \, dt > \int_0^\infty t e^{-z t} \, dt = \frac{1}{z^2}.[20]
Computation and Approximation
Numerical computation methods
Numerical computation of the digamma function \psi(z) typically begins by using the recurrence relation \psi(z+1) = \psi(z) + 1/z to reduce the argument to the fundamental interval (0,1] or [1,2], where more efficient evaluation methods can be applied. For arguments in (0,1], the recurrence is applied forward to shift to [1,2], avoiding direct evaluation near the pole at z=0. Once reduced, values are computed using series expansions, such as the Taylor series around z=1, or integral representations like \psi(z) = \int_0^\infty \left( \frac{e^{-t}}{t} - \frac{e^{-zt}}{1-e^{-t}} \right) dt for \Re z > 0, evaluated via numerical quadrature along paths of steepest descent to ensure convergence.[21] These techniques are particularly effective for moderate precision and are detailed in comprehensive surveys on special function computation.[22]For higher precision and efficiency, especially in arbitrary-precision arithmetic, Spouge's approximation for the gamma function is adapted to the digamma via logarithmic differentiation or finite differences. The core approximation for \Gamma(z) is \Gamma(z+1) \approx \sqrt{2\pi} (z+a)^{z+1/2} e^{-(z+a)} \left[ c_0 + \sum_{k=1}^{a-1} c_k (z+a)^{-k} \right], where a controls the accuracy and c_k are precomputed coefficients, yielding relative errors bounded by a^{-1/2} (2\pi)^{-(a+1/2)} for \operatorname{Re}(z) \geq 0. For \psi(z), this leads to \psi(z+1) \approx \ln(z+a) - \frac{a-1/2}{z+a} - \frac{ \sum_{k=1}^{a-1} k c_k (z+a)^{-(k+1)} }{ \sum_{k=0}^{a-1} c_k (z+a)^{-k} }, with absolute errors under D (\ln 2a) a^{1/2} (2\pi)^{-(a+1/2)} / \operatorname{Re}(z+a), where D \approx 1.021. This method offers O(1) complexity per evaluation after O(a) precomputation, making it suitable for large-scale computations.[23]Software libraries implement these and related algorithms for practical evaluation. In Mathematica, the function PolyGamma[0, z] (equivalent to \psi(z)) employs a combination of series expansions for small |z|, asymptotic series for large |z| in the right half-plane, and reflection formulas \psi(1-z) - \psi(z) = \pi \cot(\pi z) for the left half-plane, with automatic handling of high precision.[24] Similarly, Python's SciPy library provides scipy.special.digamma(z), which uses the Cephes library's implementation relying on recurrences to the interval [1,2], followed by power series or continued fraction expansions for accuracy up to double precision, and asymptotic approximations for large |z|.[25] These implementations ensure robust performance across real and complex arguments.Computing \psi(z) presents challenges due to its simple poles at non-positive integers z = 0, -1, -2, \dots, where residues are -1, requiring careful avoidance or special handling in algorithms. For complex arguments, the principal branch is defined with a branch cut along the negative real axis, leading to discontinuities that must be navigated, particularly near the poles; implementations often use analytic continuation via reflection or recurrence to stay in regions of analyticity. Numerical stability is further ensured by backward recurrence from asymptotic expansions for large positive real parts.[22]
Argument Range
Primary Method
Key Features
Small z near (0,1]
Power series (e.g., around z=1)
Converges quickly; used after recurrence reduction; suitable for low to medium precision.
High accuracy for large arguments; combined with backward recurrence.
General complex
Continued fraction or Spouge adaptation
Efficient for arbitrary precision; handles wide ranges with bounded error; alternative to series for avoiding slow convergence.[23][26]
Approximation formulas
One common approximation for the digamma function arises from truncating the asymptotic expansion derived from Stirling's series for the logarithm of the gamma function. Specifically, for large positive x, the digamma function satisfies\psi(x+1) \approx \ln x - \frac{1}{2x} - \frac{1}{12x^2} + \frac{1}{120x^4} - \cdots,where the series terms involve Bernoulli numbers and converge asymptotically as x \to \infty.[23] This truncated form provides a practical approximation with error decreasing rapidly for x > 10, achieving relative errors below $10^{-6} in typical applications.[23]Rational approximations, particularly Padé-type approximants, offer improved accuracy for the digamma function near integer values or in regions where the asymptotic series converges slowly. A notable rational approximant for \psi(x) is constructed by accelerating the series using sequence transformations, yielding a form that matches the first few terms of the asymptotic expansion while bounding the transformation error explicitly.[27] For instance, such approximants achieve relative errors less than $10^{-10} for x in the interval [1, 10], making them suitable for numerical evaluations in that range.[28]A recent bounded-error approximation refines the Stirling-type formula by isolating the remainder term. For s > 0,\psi(s) = \ln s - \frac{1}{2s} - \frac{1}{12 s^2} + \frac{\theta(s)}{s^2},where the remainder satisfies \frac{1}{36} < \theta(s) < \frac{1}{5}.[19] This provides explicit error bounds without requiring further series truncation, with the maximum relative error bounded by approximately $0.028/s^2 for s > 1.[29]Integral-based quadrature approximations, such as those adapting Windschitl-type expansions for the gamma function to its logarithmic derivative, further extend these methods for moderate s. These yield relative errors under $10^{-8} for $1 < s < 100 by integrating the asymptotic form over finite intervals.
Advanced Topics
Roots of the digamma function
The zeros of the digamma function \psi(z) lie entirely on the real axis in the complex plane and are all simple. There are no non-real zeros, and the function has exactly one positive zero with all others negative. This property follows from the fact that the digamma function is real-valued on the real line (away from its poles) and its behavior in the complex plane, governed by the reflection formula \psi(1 - z) = \psi(z) + \pi \cot(\pi z), ensures no off-axis zeros exist.[30][31]The positive zero occurs at z \approx 1.461632. The negative zeros are located one in each open interval (-n-1, -n) for nonnegative integers n = 0, 1, 2, \dots, accumulating toward -\infty along the real axis. For large n, the nth negative zero \alpha_n satisfies the asymptotic \alpha_n \approx -n + \frac{1}{\pi} \arctan\left(\frac{\pi}{\log n}\right).[30][32]The first few zeros can be approximated numerically as follows:
Zero index
Approximate location
Positive
1.461632
n=0
-0.504083 (in (-1,0))
n=1
-1.573498 (in (-2,-1))
n=2
-2.610721 (in (-3,-2))
n=3
-3.635293 (in (-4,-3))
These values are computed via series expansions or numerical root-finding near the poles, with higher precision available through dedicated algorithms. The zeros are all irrational, with at most one possible rational exception (which does not occur).[34][35]The zeros of \psi(z) correspond to the points where the derivative of the gamma function vanishes, \Gamma'(z) = 0, since \psi(z) = \Gamma'(z)/\Gamma(z) and \Gamma(z) has no zeros. In terms of the Weierstrass infinite product representation of \Gamma(z), these occur where the logarithmic derivative of the product is zero, marking saddle points (critical points) of \Gamma(z) in the complex plane. Although the real zeros of \psi(z) exhibit spacing that accumulates asymptotically like the negative integers, their distribution has been analogized in some studies to the zeros of the Riemann zeta function due to similar accumulation patterns, but no direct connection to the Riemann hypothesis exists.[8][30]
Regularization
The digamma function provides the analytic continuation of the generalized harmonic numbers to complex arguments, defined for positive integer n as H_n = \sum_{k=1}^n \frac{1}{k} and extended via H_z = \psi(z+1) + \gamma, where \gamma is the Euler-Mascheroni constant.[36] This extension assigns finite values to formally divergent harmonic-like sums through the meromorphic properties of \psi(z), enabling the regularization of expressions that diverge logarithmically.[15]A key application in regularization arises from the series representation of the digamma function, which interprets it as the Hadamard finite part of a divergent sum:\psi(z) = -\gamma + \sum_{n=0}^\infty \left( \frac{1}{n+1} - \frac{1}{n+z} \right),valid for \Re(z) > 0. Here, the infinite sum \sum_{n=1}^\infty \left( \frac{1}{n} - \frac{1}{n+z-1} \right) diverges, but its finite part equals \psi(z) + \gamma, extracting the regularized value by discarding the divergent terms associated with the Euler constant. This approach is particularly useful for regularizing differences of harmonic series in analytic continuations.[8]The digamma function also connects to zeta regularization through its Taylor series expansion around z=0:\psi(1 + z) = -\gamma + \sum_{k=2}^\infty (-1)^k \zeta(k) z^{k-1}, \quad |z| < 1,where \zeta(k) is the Riemann zeta function evaluated at positive integers. This relation links the digamma's behavior near unity to the values of \zeta(s) for \Re(s) > 1, facilitating the regularization of products or series involving the gamma function in contexts where zeta functions handle divergences at s=1. For instance, in the analytic continuation of integrals like \int_0^\infty x^{z-1} \psi(x+1) \, dx = -\frac{\pi}{\sin(\pi z)} \zeta(1-z), the digamma regularizes the contribution from the zeta pole.[37]In quantum field theory, the digamma function appears in the regularization of spectral zeta functions used to compute Casimir energies. Spectral zeta functions \zeta(s) = \sum \lambda_n^{-s} over eigenvalues \lambda_n of operators encounter divergences that are tamed via analytic continuation, often involving the gamma function whose logarithmic derivative is the digamma; for example, expressions for the effective action include terms like \psi(s) in the Mellin transform representations.[38] This role underscores the digamma's utility in extracting finite vacuum energies from formally infinite sums in curved spacetimes or bounded geometries.[39]
Applications in applied mathematics
In statistics, the digamma function plays a key role in modeling uncertainty and entropy for distributions involving compositional data, such as the Dirichlet and multinomial distributions. For instance, the expected logarithm of probabilities under a Dirichlet prior, which is essential for computing expected log-likelihoods in Bayesian models of categorical data, is given by the difference of digamma functions: \mathbb{E}[\log \theta_i] = \psi(\alpha_i) - \psi(\sum_j \alpha_j), where \theta_i are the components and \alpha the concentration parameters.[40] This expression facilitates entropy calculations in topic models and sequential sampling, where the digamma function quantifies variations in information content, such as one-step entropy changes during species abundance estimation.[41] In Bayesian updating for multinomial parameters, ratios of digamma functions approximate posterior means of log-ratios, enabling efficient inference in hierarchical models without full integration.[42]In physics, particularly random matrix theory, the digamma function arises in the analysis of spectral densities and stability properties of ensembles. It contributes to the computation of Lyapunov exponents for products of random matrices, which describe the exponential growth rates of perturbations and underlie universal behaviors in local spectral statistics, such as level spacing distributions in non-Hermitian systems.[43] For black holeentropy, asymptotic approximations via Stirling's formula for large factorials in microstate counting often invoke the digamma function through its relation to the logarithmic derivative of the gamma function, providing corrections in high-dimensional partition sums that align with thermodynamic limits.[44]In signal processing, the digamma function supports estimation in time series models with compositional or positive-valued observations, such as Dirichlet autoregressive (AR) processes for multivariate signals. The expected values in these models, used for centering innovations in ARMA frameworks, are expressed in closed form using digamma functions, aiding phase and amplitude recovery in narrowband signals with gamma-modulated noise. This is particularly useful in autoregressive models where gamma-distributed variances model heteroscedasticity, with digamma terms appearing in the deviance for generalized linear AR structures.[45]Recent developments from 2020 to 2025 highlight the digamma function's role in machine learning, especially variational inference for approximate Bayesian computation. In optimizing the evidence lower bound (ELBO) for models with Beta or Dirichlet components, such as latent variable mixtures, digamma functions compute expectations of log-densities, enabling scalable inference in deep clustering and uncertainty quantification tasks.[46] For example, extended variational methods for Dirichlet process mixtures of Beta-Laplace distributions use digamma-based bounds to handle non-conjugate priors, improving posterior approximations in neural network evidential learning.[47] In hydrology, gamma distribution models for basin response and unit hydrograph derivation incorporate digamma functions to assess convergence rates in rainfall-runoff simulations, optimizing parameters for floodprediction via genetic algorithms on gamma-parameterized convergence.[48]Beyond these areas, the digamma function aids combinatorial analyses of partition functions by providing modular relations and asymptotic expansions for generalized forms, facilitating counts of integer partitions with constraints like distinct parts.[49] In numerical solutions to partial differential equations (PDEs), digamma functions serve as basis functions in mesh-free methods like the complex variable boundary element method (CVBEM), offering compact support and improved accuracy for boundary value problems without traditional meshing.[50]