# Gamma function

## Definitions

Symbol: Gamma $\Gamma(z)$ Gamma function
Symbol: LogGamma $\log \Gamma(z)$ Logarithmic gamma function

## Illustrations

Image: Plot of $\Gamma(x)$ on $x \in \left[-4, 4\right]$
Image: Plot of $\log \Gamma(x)$ on $x \in \left[-4, 4\right]$
Image: X-ray of $\Gamma(z)$ on $z \in \left[-5, 5\right] + \left[-5, 5\right] i$
Image: X-ray of $\log \Gamma(z)$ on $z \in \left[-5, 5\right] + \left[-5, 5\right] i$

## Particular values

$\Gamma(n) = \left(n - 1\right)!$
$\Gamma(1) = 1$
$\Gamma(2) = 1$
$\Gamma\!\left(\frac{1}{2}\right) = \sqrt{\pi}$
$\Gamma\!\left(\frac{3}{2}\right) = \frac{\sqrt{\pi}}{2}$

## Functional equations

$\Gamma\!\left(z + 1\right) = z \Gamma(z)$
$\Gamma(z) = \left(z - 1\right) \Gamma\!\left(z - 1\right)$
$\Gamma\!\left(z - 1\right) = \frac{\Gamma(z)}{z - 1}$
$\Gamma\!\left(z + n\right) = \left(z\right)_{n} \Gamma(z)$
$\Gamma(z) = \frac{\pi}{\sin\!\left(\pi z\right)} \frac{1}{\Gamma\!\left(1 - z\right)}$
$\Gamma(z) \Gamma\!\left(z + \frac{1}{2}\right) = {2}^{1 - 2 z} \sqrt{\pi} \Gamma\!\left(2 z\right)$
$\prod_{k=0}^{m - 1} \Gamma\!\left(z + \frac{k}{m}\right) = {\left(2 \pi\right)}^{\left( m - 1 \right) / 2} {m}^{1 / 2 - m z} \Gamma\!\left(m z\right)$
$\Gamma(z) = \exp\!\left(\log \Gamma(z)\right)$
$\log \Gamma\!\left(z + 1\right) = \log \Gamma(z) + \log(z)$

## Integral representations

$\Gamma(z) = \int_{0}^{\infty} {t}^{z - 1} {e}^{-t} \, dt$

## Series expansions

$\log \Gamma\!\left(1 + z\right) = -\gamma z + \sum_{k=2}^{\infty} \frac{\zeta\!\left(k\right)}{k} {\left(-z\right)}^{k}$
$\log \Gamma(z) = \left(z - \frac{1}{2}\right) \log(z) - z + \frac{\log\!\left(2 \pi\right)}{2} + \sum_{k=1}^{n - 1} \frac{B_{2 k}}{2 k \left(2 k - 1\right) {z}^{2 k - 1}} + R_{n}\!\left(z\right)$
Symbol: StirlingSeriesRemainder $R_{n}\!\left(z\right)$ Remainder term in the Stirling series for the logarithmic gamma function
$R_{n}\!\left(z\right) = \int_{0}^{\infty} \frac{B_{2 n} - B_{2 n}\!\left(t - \left\lfloor t \right\rfloor\right)}{2 n {\left(z + t\right)}^{2 n}} \, dt$
$\Gamma(z) = {\left(2 \pi\right)}^{1 / 2} {z}^{z - 1 / 2} {e}^{-z} \exp\!\left(\sum_{n=1}^{\infty} \left(z + n - \frac{1}{2}\right) \log\!\left(\frac{z + n}{z + n - 1}\right) - 1\right)$

## Analytic properties

$\Gamma(z) \text{ is holomorphic on } z \in \mathbb{C} \setminus \{0, -1, \ldots\}$
$\mathop{\operatorname{poles}\,}\limits_{z \in \mathbb{C} \cup \left\{{\tilde \infty}\right\}} \Gamma(z) = \{0, -1, \ldots\}$
$\operatorname{EssentialSingularities}\!\left(\Gamma(z), z, \mathbb{C} \cup \left\{{\tilde \infty}\right\}\right) = \left\{{\tilde \infty}\right\}$
$\operatorname{BranchPoints}\!\left(\Gamma(z), z, \mathbb{C} \cup \left\{{\tilde \infty}\right\}\right) = \left\{\right\}$
$\operatorname{BranchCuts}\!\left(\Gamma(z), z, \mathbb{C}\right) = \left\{\right\}$
$\mathop{\operatorname{zeros}\,}\limits_{z \in \mathbb{C}} \Gamma(z) = \left\{\right\}$

## Complex parts

$\Gamma\!\left(\overline{z}\right) = \overline{\Gamma(z)}$

## Bounds and inequalities

Related topics: Bounds and inequalities for the gamma function

$\Gamma(x) < {\left(2 \pi\right)}^{1 / 2} {x}^{x - 1 / 2} {e}^{-x} \exp\!\left(\frac{1}{12 x}\right)$
$\left|\Gamma(z)\right| \le {\left(2 \pi\right)}^{1 / 2} {\left|z\right|}^{x - 1 / 2} {e}^{-\pi \left|y\right| / 2} \exp\!\left(\frac{1}{6 \left|z\right|}\right)\; \text{ where } z = x + y i$

## Representation of other functions

### Factorials and binomial coefficients

$n ! = \Gamma\!\left(n + 1\right)$
${z \choose k} = \frac{\Gamma\!\left(z + 1\right)}{\Gamma\!\left(k + 1\right) \Gamma\!\left(z - k + 1\right)}$
$\left(z\right)_{k} = \frac{\Gamma\!\left(z + k\right)}{\Gamma(z)}$

### Beta function

$\mathrm{B}\!\left(a, b\right) = \frac{\Gamma(a) \Gamma(b)}{\Gamma\!\left(a + b\right)}$

### Elementary functions

$\sin\!\left(\pi z\right) = \frac{\pi}{\Gamma(z) \Gamma\!\left(1 - z\right)}$
$\cos\!\left(\pi z\right) = \frac{\pi}{\Gamma\!\left(\frac{1}{2} + z\right) \Gamma\!\left(\frac{1}{2} - z\right)}$
$\tan\!\left(\pi z\right) = \frac{\Gamma\!\left(\frac{1}{2} + z\right) \Gamma\!\left(\frac{1}{2} - z\right)}{\Gamma(z) \Gamma\!\left(1 - z\right)}$
$\operatorname{sinc}\!\left(\pi z\right) = \frac{1}{\Gamma\!\left(1 + z\right) \Gamma\!\left(1 - z\right)}$
${e}^{\pi z} = \pi \left(\frac{1}{\Gamma\!\left(\frac{1}{2} + i z\right) \Gamma\!\left(\frac{1}{2} - i z\right)} + \frac{z}{\Gamma\!\left(1 + i z\right) \Gamma\!\left(1 - i z\right)}\right)$

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2021-03-15 19:12:00.328586 UTC