The **gamma function** is an analytic continuation of the factorial function in the entire complex plane. It is commonly denoted as $ \Gamma(x) $ . The Gamma function is meromorphic and it satisfies the functional equation $ \Gamma(x+1)=x\Gamma(x) $ . There exists another function that was proposed by Gauss, the Pi function, which would satisfy the functional equation $ \Pi(x)=x\Pi(x-1) $ in the fashion of the factorial function, however the Gamma function is still the most widely used factorial continuation.

## Motivation

The Gamma function was discovered in an attempt to write an equation for the resulting curve when one interpolates the factorial points on the Cartesian plane. There are several other continuations (for instance, Euler's factorial), but none of them are used as widely as the Gamma function in analysis. The notation of the Gamma function is due to Legendre, even though some mathematicians define the factorial function as $ z!=\Gamma(z+1) $ and use the classic notation for the factorial.

## Equation

The Gamma function is defined as

$ \Gamma(z)=\int\limits_0^\infty e^{-t}t^{z-1}dt $

for a complex number z. Using integration by parts, we obtain

$ \Gamma(z)=\lim_{t\to\infty}t^{z-1}e^{-t}+(z-1)\int\limits_0^\infty e^{-t}t^{z-2}=(z-1)\int\limits_0^\infty e^{-t}t^{z-2}=(z-1)\Gamma(z-1) $

So the Gamma function indeed satisfies the functional equation we stated it does. A value of the Gamma function can be computed easily for z=1:

$ \Gamma(1)=\int\limits_0^\infty e^{-t}dt=-\Big[e^{-t}\Big]_0^\infty=-(0-1)=1 $

From here, we see that $ \Gamma(1)=0! $ , so, via the functional equation, we obtain that $ \Gamma(z+1)=z! $ .

The Gamma function has simple poles at negative integers and zero. To see this, we rearrange the functional equation to the form $ \Gamma(z+1)/z=\Gamma(z) $. We first put z=0, and we obtain that $ \Gamma(1)/0=1/0=\Gamma(0) $ . This implies that the Gamma function has a simple pole at zero. Now, we can do the same for any negative integer, for example -1: $ -\Gamma(0)/1=-\Gamma(0)=\Gamma(-1) $, so the Gamma function must have a simple pole at -1 as well. Hence, the gamma function is asymptotic to negative integers.

We can also see that the Gamma function is nonzero along everywhere on the real number line, because the integrand of the Gamma function is never completely zero, even though it gets arbitrarily close.

## Relation to the Gaussian integral

The Gaussian integral is closely related with half integer values of the Gamma function. The Gaussian integral is defined as the integral of the Gaussian function over the entire real number line, namely

$ \int\limits_{-\infty}^\infty e^{-x^2}=\sqrt{\pi} $

The evaluation of this integral has many methods in analysis: Even though there is no elementary antiderivative for the integrand, the definite improper integral can be expressed in elementary terms. Note that the Gaussian function is even, so it is symmetric about the y-axis; so this holds:

$ \int\limits_{-\infty}^\infty e^{-x^2}=2\int\limits_0^\infty e^{-x^2} $

The relation of the Gaussian integral to the Gamma function comes from a simple integral substitution:

$ t=x^2\ (\sqrt t=x,\frac{1}{2\sqrt t}\,dt=dx) $

Substituting, we get

$ \sqrt{\pi}=\int\limits_{-\infty}^\infty e^{-x^2}=2\int\limits_0^\infty e^{-x^2}=2\int\limits_0^\infty\dfrac{e^{-t}}{2\sqrt t}\,dt=\int\limits_0^\infty t^{-\tfrac12}e^{-t}dt=\Gamma(\tfrac12) $

After this step, the values of the Gamma function evaluated at half integers can easily be computed using the functional equation, also known as the Gamma difference equation. For example: $ \begin{align} &\Gamma\left(-\tfrac12\right)=\frac{\Gamma\left(\tfrac12\right)}{-\tfrac12}=-2\Gamma\left(\tfrac12\right)=-2\sqrt{\pi}\\ &\Gamma\left(\tfrac32\right)=\tfrac12\cdot\Gamma\left(\tfrac12\right)=\frac{\sqrt{\pi}}{2}\\ &\Gamma\left(\tfrac52\right)=\tfrac32\cdot\Gamma\left(\tfrac32\right)=\frac{3\sqrt{\pi}}{4} \end{align} $

## Other formulae

Other related formulae for the Gamma function include:

### Euler's reflection formula

The Gamma function satisfies the reflection formula

- $ \Gamma(x)\Gamma(1-x)=\frac{\pi}{\sin(x\pi)} $

due to Euler. This reflection formula can verify the values of the Gamma function we obtained above using the Gaussian integral.

### Euler's product representation

The Gamma function can be expressed as an infinite product as follows:

- $ \Gamma(x)=\dfrac{1}{x}\prod_{n=1}^\infty\left(1+\frac{1}{n}\right)^x\left(1+\frac{x}{n}\right)^{-1} $

due to Euler.

### Weierstrass's product representation

The Gamma function can be expressed as another infinte product as follows:

- $ \Gamma(x)=\frac{\exp(-\gamma x)}{x}\prod_{n=1}^\infty\left(1+\frac{x}{n}\right)^{-1}\exp\left(\frac{z}{n}\right) $

where $ \gamma $ denotes the Euler-Mascheroni constant, namely

- $ \gamma=\lim_{n\to\infty}\sum_{k=1}^n\dfrac{1}{k}-\log(n) $

This definition implies the reflection formula along with the Weierstrass product of sine and is equivalent with Euler's representation when the definition of the Euler-Mascheroni constant is substituted and rearranged.

### Riemann's reflection formula

The Gamma function plays a key role in the analytic continuation of the Riemann zeta function to the complex plane:

- $ \zeta(s)=2^s\pi^{s-1}\sin\left(\frac{\pi s}{2}\right)\Gamma(1-s)\zeta(1-s) $

This example shows how closely related the Gamma function is to other functions. Another similar relation with the zeta function is

- $ \zeta(z)\Gamma(z)=\int\limits_0^\infty\dfrac{t^{z-1}}{e^t-1}dt $

### Other

- $ \int\limits_0^\frac{\pi}{2}\cos^{2n-1}(\theta)\sin^{2m-1}(\theta)d\theta=\dfrac{\Gamma(n)\Gamma(m)}{2\Gamma(n+m)} $

- $ \Gamma(n)=(n-1)! $ , with $ n $ being any whole number.

- $ \Gamma\left(\tfrac{n}{2}\right)=\sqrt{\pi}\frac{(n-2)!!}{2^{\frac{n-1}{2}}} $ , with $ n $ being any positive odd number and $ !! $ being a double factorial.