Calculations With the Gamma Function

3D rendering of gamma function.

Fredrik alleged / Wikimedia Commons / Public Domain

The gamma function is defined by the following complicated looking formula:

Γ ( z ) = ∫0e - ttz-1dt

One question that people have when they first encounter this confusing equation is, “How do you use this formula to calculate values of the gamma function?” This is an important question as it is difficult to know what this function even means and what all of the symbols stand for.

One way to answer this question is by looking at several sample calculations with the gamma function. Before we do this, there are a few things from calculus that we must know, such as how to integrate a type I improper integral, and that e is a mathematical constant


Before doing any calculations, we examine the motivation behind these calculations. Many times the gamma functions show up behind the scenes. Several probability density functions are stated in terms of the gamma function. Examples of these include the gamma distribution and students t-distribution, The importance of the gamma function cannot be overstated. 

Γ ( 1 )

The first example calculation that we will study is finding the value of the gamma function for Γ ( 1 ). This is found by setting z = 1 in the above formula:

0e - tdt

We calculate the above integral in two steps:

  • The indefinite integral ∫e - tdt= -e - t + C
  • This is an improper integral, so we have ∫0e - tdt = limb → ∞ -e - b + e 0 = 1

Γ ( 2 )

The next example calculation that we will consider is similar to the last example, but we increase the value of z by 1. We now calculate the value of the gamma function for Γ ( 2 ) by setting z = 2 in the above formula. The steps are the same as above:

Γ ( 2 ) = ∫0e - tt dt

The indefinite integral ∫te - tdt=- te - t -e - t + C. Although we have only increased the value of z by 1, it takes more work to calculate this integral. In order to find this integral, we must use a technique from calculus known as integration by parts. We now use the limits of integration just as above and need to calculate:

limb → ∞ - be - b -e - b -0e 0 + e 0.

A result from calculus known as L’Hospital’s rule allows us to calculate the limit limb → ∞ - be - b = 0. This means that the value of our integral above is 1.

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

Another feature of the gamma function and one which connects it to the factorial is the formula Γ (z +1 ) =zΓ (z ) for z any complex number with a positive real part. The reason why this is true is a direct result of the formula for the gamma function. By using integration by parts we can establish this property of the gamma function.

mla apa chicago
Your Citation
Taylor, Courtney. "Calculations With the Gamma Function." ThoughtCo, Apr. 5, 2023, Taylor, Courtney. (2023, April 5). Calculations With the Gamma Function. Retrieved from Taylor, Courtney. "Calculations With the Gamma Function." ThoughtCo. (accessed June 7, 2023).