# PolyGamma

PolyGamma[z]

gives the digamma function .

PolyGamma[n,z]

gives the n derivative of the digamma function .

# Details

• Mathematical function, suitable for both symbolic and numerical manipulation.
• PolyGamma[z] is the logarithmic derivative of the gamma function, given by .
• PolyGamma[n,z] is given for positive integer by .
• For arbitrary complex n, the polygamma function is defined by fractional calculus analytic continuation.
• PolyGamma[z] and PolyGamma[n,z] are meromorphic functions of z with no branch cut discontinuities.
• For certain special arguments, PolyGamma automatically evaluates to exact values.
• PolyGamma can be evaluated to arbitrary numerical precision.
• PolyGamma automatically threads over lists.
• PolyGamma can be used with Interval and CenteredInterval objects. »

# Examples

open allclose all

## Basic Examples(7)

Evaluate the digamma function:

Evaluate the pentagamma function:

Evaluate the second derivative of the gamma function:

Plot the digamma function over a subset of the reals:

Plot over a subset of the complexes:

Series expansion at the origin:

Series expansion at Infinity:

Series expansion at a singular point:

## Scope(47)

### Numerical Evaluation(7)

Evaluate numerically:

Evaluate for integer arguments of any size:

Evaluate for complex arguments and orders:

Evaluate to any precision:

The precision of the output tracks the precision of the input:

Evaluate PolyGamma efficiently at high precision:

Compute worst-case guaranteed intervals using Interval and CenteredInterval objects:

Compute average-case statistical intervals using Around:

Compute the elementwise values of an array:

Or compute the matrix PolyGamma function using MatrixFunction:

### Specific Values(6)

Some singular points of PolyGamma:

Values at infinity:

Find a zero of :

Use FunctionExpand to expand higher-order polygamma functions:

Special case:

Evaluate at exact arguments:

### Visualization(3)

Plot the digamma function:

Plot the real part of :

Plot the imaginary part of :

Plot PolyGamma for half-integer values of parameter :

### Function Properties(9)

Real domain of PolyGamma:

Approximate function ranges of PolyGamma for half-integer parameters:

PolyGamma is not an analytic function:

It has both singularities and discontinuities:

is a meromorphic function:

For fixed non-negative integer , is a meromorphic function of :

It is not meromorphic for other values of :

is neither nondecreasing nor nonincreasing:

is not injective:

is surjective:

is neither non-negative nor non-positive:

is neither convex nor concave:

### Differentiation(3)

First derivative of PolyGamma:

Higher derivatives of the digamma function:

Formula for the derivative:

### Integration(3)

Indefinite integral of PolyGamma:

Indefinite integral involving a power function:

Definite integral :

### Series Expansions(7)

Taylor expansion for the digamma function around :

Plot the first three approximations for the Euler gamma function around :

General term in the series expansion of the digamma function:

Series expansion at infinities:

Series expansion at poles:

Series expansion at a generic point:

Series expansion near a singularity:

PolyGamma can be applied to a power series:

### Function Identities and Simplifications(5)

Use FullSimplify to simplify polygamma functions:

PolyGamma identity :

PolyGamma of a double argument:

Other argument simplifications:

Recurrence relation:

### Function Representations(4)

Digamma function definition:

Integral representation:

PolyGamma can be represented as a DifferenceRoot:

## Applications(4)

Plot of the absolute value of PolyGamma over the complex plane:

The electric field energy of a charge at a fraction of the distance between parallel conducting plates:

Expand near the left wall:

Final speed of a rocket with discrete propulsion events:

Final velocity in the limit of constant continuous propulsion:

Effective confining potential in random matrix theory for a Gaussian density of states:

Expansion at infinity reveals logarithmic growth:

## Properties & Relations(7)

Use FullSimplify to simplify polygamma functions:

Express rational arguments through elementary functions:

Numerically find a root of a transcendental equation:

Sums and integrals:

Generate PolyGamma from integrals, sums, and limits:

Generating function:

Obtain as special cases of hypergeometric functions:

## Possible Issues(3)

The oneargument form evaluates to the two-argument form:

Large orders can give results too large to be computed explicitly:

Machinenumber inputs can give highprecision results:

Wolfram Research (1988), PolyGamma, Wolfram Language function, https://reference.wolfram.com/language/ref/PolyGamma.html (updated 2022).

#### Text

Wolfram Research (1988), PolyGamma, Wolfram Language function, https://reference.wolfram.com/language/ref/PolyGamma.html (updated 2022).

#### CMS

Wolfram Language. 1988. "PolyGamma." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/PolyGamma.html.

#### APA

Wolfram Language. (1988). PolyGamma. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolyGamma.html

#### BibTeX

@misc{reference.wolfram_2024_polygamma, author="Wolfram Research", title="{PolyGamma}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/PolyGamma.html}", note=[Accessed: 13-August-2024 ]}

#### BibLaTeX

@online{reference.wolfram_2024_polygamma, organization={Wolfram Research}, title={PolyGamma}, year={2022}, url={https://reference.wolfram.com/language/ref/PolyGamma.html}, note=[Accessed: 13-August-2024 ]}