WOLFRAM

Gamma[z]

is the Euler gamma function TemplateBox[{z}, Gamma].

Gamma[a,z]

is the incomplete gamma function TemplateBox[{a, z}, Gamma2].

Gamma[a,z0,z1]

is the generalized incomplete gamma function TemplateBox[{a, {z, _, 0}}, Gamma2]-TemplateBox[{a, {z, _, 1}}, Gamma2].

Details

  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • The gamma function satisfies TemplateBox[{z}, Gamma]=int_0^inftyt^(z-1)e^(-t)dt.
  • The incomplete gamma function satisfies TemplateBox[{a, z}, Gamma2]=int_z^inftyt^(a-1)e^(-t)dt.
  • The generalized incomplete gamma function is given by the integral .
  • Note that the arguments in the incomplete form of Gamma are arranged differently from those in the incomplete form of Beta.
  • Gamma[z] has no branch cut discontinuities.
  • Gamma[a,z] has a branch cut discontinuity in the complex z plane running from to .
  • For certain special arguments, Gamma automatically evaluates to exact values.
  • Gamma can be evaluated to arbitrary numerical precision.
  • Gamma automatically threads over lists.
  • Gamma can be used with Interval and CenteredInterval objects. »

Examples

open allclose all

Basic Examples  (8)Summary of the most common use cases

Integer values:

Out[1]=1

Half-integer values:

Out[1]=1

Evaluate numerically for complex arguments:

Out[1]=1

Plot over a subset of the reals:

Out[1]=1

Plot over a subset of the complexes:

Out[1]=1

Series expansion at the origin:

Out[1]=1

Series expansion at Infinity:

Out[1]=1

Series expansion at a singular point:

Out[1]=1

Scope  (50)Survey of the scope of standard use cases

Numerical Evaluation  (5)

Evaluate numerically:

Out[1]=1

Evaluate to high precision:

Out[1]=1

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

Out[2]=2

Evaluate Gamma efficiently at high precision:

Out[1]=1
Out[2]=2

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

Out[1]=1
Out[2]=2
Out[3]=3

Compute average-case statistical intervals using Around:

Out[4]=4

Compute the elementwise values of an array:

Out[1]=1

Or compute the matrix Gamma function using MatrixFunction:

Out[2]=2

Specific Values  (5)

Singular points of Gamma:

Out[1]=1

Values at infinity:

Out[1]=1

Find a local minimum as a root of (dTemplateBox[{x}, Gamma])/(d x)=0:

Out[1]=1
Out[2]=2

Evaluate the incomplete gamma function symbolically at integer and halfinteger orders:

Out[1]=1
Out[2]=2

Evaluate the generalized incomplete gamma function symbolically at halfinteger orders:

Out[1]=1

Visualization  (3)

Plot the Euler gamma function:

Out[1]=1

Plot the real part of TemplateBox[{z}, Gamma]:

Out[1]=1

Plot the imaginary part of TemplateBox[{z}, Gamma]:

Out[2]=2

Plot the incomplete gamma function for integer and half-integer orders:

Out[1]=1

Function Properties  (10)

Real domain of the complete Euler gamma function:

Out[1]=1

Complex domain:

Out[2]=2

Domain of the incomplete gamma functions:

Out[5]=5
Out[3]=3
Out[4]=4

The gamma function TemplateBox[{x}, Gamma] achieves all nonzero values on the reals:

Out[1]=1

The incomplete gamma function TemplateBox[{1, x}, Gamma2] achieves all positive real values for real inputs:

Out[2]=2

On the complexes, however, it achieves all nonzero values:

Out[3]=3

The incomplete gamma function TemplateBox[{{1, /, 2}, x}, Gamma2] has the restricted range :

Out[4]=4

The Euler gamma function has the mirror property TemplateBox[{TemplateBox[{z}, Conjugate, SyntaxForm -> SuperscriptBox]}, Gamma]=TemplateBox[{TemplateBox[{z}, Gamma]}, Conjugate]:

Out[1]=1

The complete gamma function TemplateBox[{x}, Gamma] is a meromorphic, nonanalytic function:

Out[1]=1
Out[2]=2

TemplateBox[{a, x}, Gamma2] is analytic in for positive integer :

Out[3]=3

But in general, it is neither an analytic nor a meromorphic function:

Out[4]=4
Out[5]=5

TemplateBox[{x}, Gamma] has both singularities and discontinuities on the non-positive integers:

Out[1]=1
Out[2]=2

TemplateBox[{x}, Gamma] is neither non-increasing nor non-decreasing:

Out[1]=1

TemplateBox[{a, x}, Gamma2] is a non-increasing function of when is a positive, odd integer:

Out[2]=2

But in general, it is neither non-increasing nor non-decreasing:

Out[3]=3

TemplateBox[{x}, Gamma] is not injective:

Out[1]=1

TemplateBox[{a, x}, Gamma2] is an injective function of for noninteger :

Out[2]=2
Out[3]=3

For integer , it may or may not be injective in :

Out[4]=4
Out[5]=5
Out[6]=6

TemplateBox[{x}, Gamma] is not surjective:

Out[1]=1

TemplateBox[{a, x}, Gamma2] is also not surjective:

Out[2]=2
Out[3]=3

Visualize for :

Out[4]=4

TemplateBox[{x}, Gamma] is neither non-negative nor non-positive:

Out[1]=1

TemplateBox[{a, x}, Gamma2] is non-negative for positive odd :

Out[2]=2

In general, it is neither non-negative nor non-positive:

Out[3]=3

TemplateBox[{x}, Gamma] is neither convex nor concave:

Out[1]=1

TemplateBox[{a, x}, Gamma2] is convex on its real domain for :

Out[2]=2

It is in general neither convex nor concave for other values of :

Out[3]=3

Differentiation  (4)

First derivative of the Euler gamma function:

Out[1]=1

First derivative of the incomplete gamma function:

Out[1]=1

Higher derivatives of the Euler gamma function:

Out[1]=1
Out[2]=2

Higher derivatives of the incomplete gamma function for an order :

Out[1]=1
Out[2]=2

Integration  (3)

Indefinite integral of the incomplete gamma function:

Out[1]=1

Indefinite integrals of a product involving the incomplete gamma function:

Out[1]=1
Out[2]=2

Numerical approximation of a definite integral int_1^2TemplateBox[{x}, Gamma]dx:

Out[1]=1

Series Expansions  (6)

Taylor expansion for the Euler gamma function around :

Out[1]=1

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

Out[4]=4

Series expansion at infinity for the Euler gamma function (Stirling approximation):

Out[1]=1

Give the result for an arbitrary symbolic direction:

Out[2]=2

Series expansion for the incomplete gamma function at a generic point:

Out[1]=1
Out[2]=2

Series expansion for the incomplete gamma function at infinity:

Out[1]=1
Out[2]=2

Series expansion for the generalized incomplete gamma function at a generic point:

Out[1]=1

Gamma can be applied to a power series:

Out[1]=1

Integral Transforms  (4)

Compute the Laplace transform of the incomplete gamma function using LaplaceTransform:

Out[1]=1

InverseLaplaceTransform of the incomplete gamma function:

Out[1]=1

MellinTransform of the incomplete gamma function:

Out[1]=1

InverseMellinTransform of the Euler gamma function:

Out[1]=1

Function Identities and Simplifications  (5)

For positive integers (n-1)! = TemplateBox[{n}, Gamma]:

Out[1]=1

Use FullSimplify to simplify gamma functions:

Out[1]=1
Out[2]=2

The Euler gamma function basic relation, TemplateBox[{{z, +, 1}}, Gamma]=z TemplateBox[{z}, Gamma]:

Out[1]=1

The Euler gamma function of a double argument, TemplateBox[{{2,  , x}}, Gamma]=(2^(2 x-1))/(sqrt(pi)) TemplateBox[{x}, Gamma] TemplateBox[{{x, +, {1, /, 2}}}, Gamma]:

Out[1]=1

Relation to the incomplete gamma function:

Out[1]=1

Function Representations  (5)

Integral representation of the Euler gamma function:

Out[1]=1

Integral representation of the incomplete gamma function:

Out[1]=1

The incomplete gamma function can be represented in terms of MeijerG:

Out[1]=1
Out[2]=2

The incomplete gamma function can be represented as a DifferentialRoot:

Out[1]=1

TraditionalForm formatting:

Generalizations & Extensions  (6)Generalized and extended use cases

Euler Gamma Function  (3)

Gamma threads element-wise over lists:

Out[1]=1

Series expansion at poles:

Out[1]=1

Expansion at symbolically specified negative integers:

Out[2]=2

TraditionalForm formatting:

Incomplete Gamma Function  (1)

Evaluate symbolically at integer and halfinteger orders:

Out[2]=2
Out[3]=3

Generalized Incomplete Gamma Function  (2)

Evaluate symbolically at integer and halfinteger orders:

Out[1]=1

Series expansion at a generic point:

Out[1]=1

Applications  (9)Sample problems that can be solved with this function

Plot of the absolute value of Gamma in the complex plane:

Out[1]=1

Find the asymptotic expansion of ratios of gamma functions:

Out[1]=1

Volume of an dimensional unit hypersphere:

Lowdimensional cases:

Out[2]=2

Plot the volume of the unit hypersphere as a function of dimension:

Out[3]=3

Plot the real part of the incomplete gamma function over the parameter plane:

Out[1]=1

CDF of the distribution:

Out[1]=1

Calculate the PDF:

Out[2]=2

Plot the CDF for different numbers of degrees of freedom:

Out[3]=3

Compute derivatives of the Gamma function with the BellY polynomial:

Out[1]=1
Out[2]=2

Compute as a limit of Gamma functions at Infinity:

Out[1]=1

Expectation value of the square root of a quadratic form over a normal distribution:

Out[2]=2

Compare with the closed-form result in terms of Gamma and CarlsonRG:

Out[3]=3

Represent Zeta in terms of Integrate and the Gamma function:

Out[1]=1

Properties & Relations  (7)Properties of the function, and connections to other functions

Use FullSimplify to simplify gamma functions:

Out[1]=1

Numerically find a root of a transcendental equation:

Out[1]=1

Sum expressions involving Gamma:

Out[1]=1
Out[2]=2

Generate from integrals, products, and limits:

Out[1]=1
Out[2]=2
Out[3]=3

Obtain Gamma as the solution of a differential equation:

Out[1]=1

Integrals:

Out[1]=1

Gamma can be represented as a DifferenceRoot:

Out[1]=1

Possible Issues  (2)Common pitfalls and unexpected behavior

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

Out[9]=9

Machinenumber inputs can give highprecision results:

Out[1]=1
Out[2]=2

Neat Examples  (3)Surprising or curious use cases

Nest Gamma over the complex plane:

Out[1]=1

Fractal from iterating Gamma:

Out[1]=1

Plot the Riemann surface of TemplateBox[{{1, /, 3}, z}, Gamma2]:

Out[1]=1
Wolfram Research (1988), Gamma, Wolfram Language function, https://reference.wolfram.com/language/ref/Gamma.html (updated 2022).
Wolfram Research (1988), Gamma, Wolfram Language function, https://reference.wolfram.com/language/ref/Gamma.html (updated 2022).

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2025_gamma, author="Wolfram Research", title="{Gamma}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Gamma.html}", note=[Accessed: 06-May-2025 ]}

@misc{reference.wolfram_2025_gamma, author="Wolfram Research", title="{Gamma}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Gamma.html}", note=[Accessed: 06-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_gamma, organization={Wolfram Research}, title={Gamma}, year={2022}, url={https://reference.wolfram.com/language/ref/Gamma.html}, note=[Accessed: 06-May-2025 ]}

@online{reference.wolfram_2025_gamma, organization={Wolfram Research}, title={Gamma}, year={2022}, url={https://reference.wolfram.com/language/ref/Gamma.html}, note=[Accessed: 06-May-2025 ]}