# Approximation to Stirling's Formula for Gamma Function

## Theorem

Let:

$D_\epsilon = \set {z \in \C : \cmod {\Arg z} < \pi - \epsilon,\ \cmod z > 1}$

where:

$\cmod {\Arg z}$ denotes the absolute value of the principal argument of $z$
$\cmod z$ denotes the modulus of $z$
$\epsilon \in \R_{>0}$.

Then for all $z \in D_\epsilon$, the gamma function of $z$ satisfies:

$\map \Gamma z = \sqrt {\dfrac {2 \pi} z} \paren {\dfrac z e}^z \paren {1 + \map \OO {z^{-1} } }$

where $\map \OO {z^{-1} }$ denotes big-O of $z^{-1}$.

## Proof

 $\text {(1)}: \quad$ $\ds \paren {y + n}^y n!$ $=$ $\ds \paren {y + n}^y \map \Gamma {n + 1}$ Gamma Function Extends Factorial $\ds$ $\le$ $\ds \map \Gamma {y + n + 1}$ $\ds$ $\le$ $\ds \paren {n + 1}^y \map \Gamma {n + 1}$ $\ds$ $=$ $\ds \paren {n + 1}^y n!$

for $0 < y \le 1$ and $n \in \N$.

Let $x$ be given.

Let $n + 1$ be the largest natural number such that $n + 1 \le x$.

Let $x = y + n + 1$, and thus $0 < y \le 1$.

Then:

 $\ds \frac {\map \Gamma x} {\sqrt {2 \pi} x^x x^{-1/2} e^{-x} }$ $\le$ $\ds \frac {\paren {n + 1}^y n!} {\sqrt {2 \pi} x^x x^{-1/2} e^{-x} }$ from $(1)$ $\ds$ $\sim$ $\ds \frac {\paren {n + 1}^y n! \sqrt {2 \pi} n^n n^{1/2} e^{-n} } {\sqrt {2 \pi} x^x x^{-1/2} e^{-x} }$ Stirling's Formula $\ds$ $=$ $\ds \frac {\paren {n + 1}^y n! n^n n^{1/2} e^{-n} } {\paren {y + n + 1}^{y + n} \paren {y + n + 1}^{1/2} e^{-y - n - 1} }$ $\ds$ $=$ $\ds \paren {\frac {n + 1} {y + n + 1} }^y \paren {\frac n {y + n + 1} }^{1/2} \paren {1 + \frac {y + 1} n}^{-n} e^{y + 1}$ $\ds$ $\to$ $\ds 1 \cdot 1 \cdot \frac 1 {e^{y + 1} } e^{y + 1} \text { as } n \to \infty$ $\ds$ $=$ $\ds 1$

Similarly for the right hand side.

The result follows from Gamma Function Extends Factorial.

$\blacksquare$