11. Euler's Gamma
generalized binomial coefficients
Stirling's approximation to n!


1. The Euler's Γ function

The factorial n! of a natural number is recursively defined as

Eqn001.gif

L. Euler found that it is possible to define a function of a real (or complex) variable Γ(x) ('Gamma of x') with the same recursive property

Eqn002.gif

If we apply such function to an argument x+1 coincident with a natural number, we have

Eqn003.gif

So Γ, for natural arguments, produces values identical to those of the factorial

Euler was able to express the function Γ in this way:

Eqn004.gif

In fact the definition (4) gives

Eqn005.gif

and also

Eqn006.gif

In particular, if x coincides with the natural number n, we can write the following equalities

Eqn007.gif

Using the second one of the equalities (2), given Eqn106.gif, we can calculate the values Eqn107.gif for each natural number n ≥ 1.

fig100.gif

With t=z2, we have

fig101.gif

The last integral is a well known gaussian integral and has value Eqn108.gif. Therefore

fig102.gif

The values of Γ for subsequent increments by 1 of the argument can be obtained recursively

fig103.gif

fig104.gif

Eqn109.gif

Eqn110.gif

WolframAlpha

In general, for n ≥ 0,

Eqn105.gif

In the equality (8) the double question mark represents the double factorial of the natural number before it, that is, if the number is odd, the product of the number itself by all the preceding odd numbers, and, if the number is even, the product of the number itself by all the preceding even numbers. Moreover we assume -1!! = 0!! = 1

The equalities (7) e (8) allow to extend the definition of the factorial from the set of the natural numbers to the set Eqn111.gif in the following way

Eqn112.gif

In particular

Eqn113.gif

Eqn114.gif

Eqn115.gif

WolframAlpha

From the second one of the equalities (2) we have also

Eqn116.gif

therefore

Eqn117.gif

and recursively

Eqn118.gif

In general, for n ≥ 0,

Eqn119.gif

We can therefore define the values of the factorials also on the set Eqn120.gif in the following way

Eqn121.gif

In particular

Eqn122.gif

Eqn123.gif

Eqn124.gif

WolframAlpha

The following Javascript application allows you to approximate the values of Γ(x) for real or complex arguments. If your browser does not allow the iframe tag, you can directly open its page.
In the input field you can use the decimal digits, the constants P for π, E for the exponential notations and I for the imaginary unit.

 


2. Generalized double factorials

The definition of the double factorial of a natural number, in a similar way as for the factorial, implies the following recursive relation

Eqn150.gif

if we use these relations for numbers less than 1, we obtain

Eqn151.gif

In general, for n ≥ 1,

Eqn152.gif

Therefore it is possible to calculate the double factorial of a negative integer if it is odd. But this calculation is not possible for a negative integer if it is even because the calculation of (-2)!! implies the division by 0.

 


3. Generalized binomial coefficients

The equality (11) allows us to calculate binomial coefficient like Eqn125.gif.

In fact, if we express binomial coefficients in terms of factorials, we have

Eqn126.gif

If k=0, we have immediately

Eqn127.gif

and, for k≥1

Eqn128.gif

Eqn129.gif

In particular:

Eqn130.gif

Eqn131.gif

WolframAlpha

If we now compare this sequence with the sequence of the coefficients of the powers of the variable x in the Maclaurin series expansion of the square root of (1-x) (for x real and ≤1)

Eqn132.gif

we see that these series coincide. Therefore we can write

Eqn133.gif

This identity allows us to apply something like the binomial theorem also when the exponent of the binomial isn't a natural number.

But we can do the same if, instead of Eqn134.gif, the first term of the binomial coefficient is any real number r. In fact, given G = Γ(r), we have

Eqn135.gif

and also

Eqn136.gif

Eqn137.gif

In general, for n natural ≥ 1,

Eqn138.gif

Finally

Eqn139.gif

and, more synthetically,

Eqn140.gif

Examples.

The equation (13) allows us to obtain the series expansion of many functions avoiding the laborious derivations needed by the method of Maclaurin.

Examples

Eqn141.gif
WolframAlpha

Eqn142.gif
WolframAlpha

Eqn149.gif
WolframAlpha

The following Javascript application allows you to approximate the values of the binomial coefficients for real or complex arguments. If your browser does not allow the iframe tag, you can directly open its page.
In the input field you can use the decimal digits, the constants P for π, E for the exponential notations and I for the imaginary unit.

 


4. Stirling's approximation to big factorials

If in the integral in the identity (7) we let

Eqn008.gif

we obtain

Eqn009.gif

that is

Eqn010.gif

If we now multiply and divide the integrand function by en and extract from the integral the factors that does not depend on the integration variable y, we have

Eqn011.gif

The derivative of the integrand function Eqn012.gif with respect to y is

fig013.gif

therefore f(y) has an absolute maximum for y=1. In order to approximate the integral, we may express it as a function of w = y-1

Eqn014.gif

and then approximate the integrand function f(w) in the following way (see MathWorld):

Eqn024.gif

The formula (14) is the Stirling's approximation to n! and is very useful in several probabilistic and statistical calculations.

For example:
for 10! instead of the correct value 3628800 it gives 3598697; the error is 8 ‰;
for 100! the error is 0.8 ‰;
for 1000! the error is 0.08 ‰.

It is often useful to calculate the logarithm of the factorial. From (15) we have

Eqn029.gif

For large n the last term is negligible and we can simply write

Eqn030.gif

The following Javascript application allows you to compare the exact value of the factorial of a natural number with that obtained with the Stirling's approximation.
If your browser does not allow the iframe tag, you can directly open its page.