Bounds for the Gamma function

1. Bounds for \(\Gamma(x)\) for real \(x\)

The classical bounds (Stirling formula) that results from the Euler-Maclaurin formula for positive integers \(n\) and \(m \geq 0\) are

$$ \displaystyle \sum\limits_{j =1}^{2m} \frac{B_{2j}}{2j(2j-1)x^{2j-1}} \ \leq \ \log n! - \left(n+\frac{1}{2}\right)\log(n) + n - \log(\sqrt{2\pi}) \ \leq \ \sum\limits_{j =1}^{2m+1} \frac{B_{2j}}{2j(2j-1)x^{2j-1}}. $$

These inequalities were described in words in more general form in [Bendersky, 1933] and subsequently rediscovered several times [Choi, 2012], [Camargo, 2024].

[Alzer, 1997] presents an extension of the inequalities above for real arguments in lighlty different form (see also remark 2.1 of [Chen, 2016]).

Theorem (1997)

For real \(x > 0\) and \(m \geq 0\), we have \(\displaystyle \sum\limits_{j =1}^{2m} \frac{B_{2j}}{2j(2j-1)x^{2j-1}} \ \leq \ \log \Gamma(x) - \left(x-\frac{1}{2}\right)\log(x) + x - \log(\sqrt{2\pi}) \ \leq \ \sum\limits_{j =1}^{2m+1} \frac{B_{2j}}{2j(2j-1)x^{2j-1}}\).

There are also several bounds for \(\Gamma(x)\) with a fixed number of terms available in the literature. For instance, in p. 118 of Ramanujan’s lost notebook [Andrews and Berndt, 2013], one finds

$$ \displaystyle \sqrt[6]{8x^3+4x^2+x+\frac{1}{100}} \ \leq \ \frac{\Gamma(x+1)}{\sqrt{\pi}\left(\frac{x}{e}\right)^x} \ \leq \ \sqrt[6]{8x^3+4x^2+x+\frac{1}{30}}. $$

Bounds of similar shape was obtaineb by [Mortici, 2011].

Theorem (2011)

For \(\alpha = \frac{128}{1215} \approx 0.105349\), \(\beta = \frac{218 336}{135} − \frac{256e^{24}}{43 046 721 \pi^4} \approx 0.087944\) and \(x \geq 3\), we have \(\displaystyle \sqrt[8]{16x^4 + \frac{32}{3}x^3+\frac{32}{9}x^2 - \frac{176}{405}x - \alpha} \ \leq \ \frac{\Gamma(x+1)}{\sqrt{\pi}\left(\frac{x}{e}\right)^x} \ \leq \ \sqrt[8]{16x^4 + \frac{32}{3}x^3+\frac{32}{9}x^2 - \frac{176}{405}x - \beta}\).

Improving on Ramanujan’s and some other estimates, [Chen, 2016] obtained the following result.

Theorem (2016)

For \(x \geq 2\), we have \(\displaystyle 1 - \frac{2117}{5080320x^7}\leq \ \frac{\Gamma(x+1)}{\sqrt{2\pi x}\left(\frac{x}{e}\right)^x \left( 1 + \frac{1}{12x^3+\frac{24}{7}x - \frac{1}{2}} \right)^{x^2+\frac{53}{210}}} \ \leq \ 1 - \frac{2117}{5080320x^7} + \frac{1892069}{2347107840 x^9}\).

Meanwhile, [Batir, 2008] presented some estimates for \(\Gamma(x)\) of certain shapes with optimal constants.

Theorem (2008)

For \(x > 0\), \(a = \sqrt{2e} = 2.33164\), and \(b = \sqrt{2\pi} = 2.50662...\) we have \(\displaystyle a\left( \frac{x+1/2}{e}\right)^{x+1/2} \leq \Gamma(x+1) < b\left( \frac{x+1/2}{e}\right)^{x+1/2}\). The constants \(a\) and \(b\) are the best possible.

Theorem (2008)

For \(x \geq 1\), \(a = 1/6\), and \(b = \frac{e^2}{2\pi} - 1 = 0.176005...\) we have \(\displaystyle x^xe^{-x} \sqrt{2\pi(x+a)} < \Gamma(x+1) < x^xe^{-x} \sqrt{2\pi(x+b)}\). The constants \(a\) and \(b\) are the best possible.

2. Bounds for the Digamma function \(\psi(x) = \Gamma'(x)/\Gamma(x)\) for real \(x\)

Let

$$ \displaystyle F_N(\lambda,x) \ = \ \log(x-\lambda) - \sum\limits_{n = 1}^{N} (-1)^{n} \frac{B_n(\lambda)}{n} (x-\lambda)^{-n}. $$

In [Diamond and Straub, 2016], the authors prove the following result.

Theorem (2016)

Let \(N\ge 1\) and let \(\lambda_0\) be the unique root of \(B_N(\lambda)\) in \([0,1/2]\) for \(N\) even or the unique root of \(B_{N+1}(\lambda)\) for \(N\) odd. For \(x > \lambda\), we have \(\left\{ \begin{array}{cl} \psi(x) > F_N(\lambda,x), & N \equiv 1 \mod 4, \ \lambda \ \in \ [\lambda_0, 1/2]; \\ \psi(x) < F_N(\lambda,x), & N \equiv 3 \mod 4, \ \lambda \ \in \ [\lambda_0, 1/2]; \\ \psi(x) > F_N(\lambda,x), & N \equiv 2 \mod 4, \ \lambda \ \in \ [0, \lambda_0]; \\ \psi(x) < F_N(\lambda,x), & N \equiv 0 \mod 4, \ \lambda \ \in \ [0, \lambda_0]. \end{array}\right.\)

The first two cases of the theorem above for \(\lambda = 0\) yields the following result which was previously published in [Gordon, 1994].

$$ \displaystyle \log(x) - \frac{1}{2x} - \frac{1}{12x^2} < \psi(x) < \log(x) - \frac{1}{2x} - \frac{1}{12x^2} + \frac{1}{120x^4}. $$

Some variants of these inequalities for \(\psi(x)\) can be found in the literature. An example is the following.

Theorem ([Mortici, 2011])

For \(x \geq 1\), we have \(\displaystyle -\frac{1}{24x^2} + \frac{1}{12x^3} - \frac{337}{2280x^4} < \psi(x+1) + \log\left( e^{1/(x+1)} - 1 \right) < -\frac{1}{24x^2} + \frac{1}{12x^3} - \frac{337}{2280x^4} + \frac{97}{720x^5}\).

3. Bounds for the Polygamma functions \(\psi(x)', \psi(x)'', \psi(x)''' ...\) for real \(x\)

Let

$$ \displaystyle S_k(n,x) \ = \ \frac{(k-1)!}{x^k} + \frac{(k)!}{2x^{k+1}} + \sum\limits_{i = 1}^{n} B_{2i} \left( \prod\limits_{j = 1}^{k-1} (2i+j) \right) \frac{1}{x^{2i+k}}. $$

[], proves the following result.

Theorem (1997)

For \(x > 0, k \geq 1\) and \(n \geq 0\), we have \(S_k(2n,x) < (-1)^{k+1} \psi^{(k)}(x) < S_k(2n+1,x)\).

The first two cases of the theorem above are

$$ \displaystyle \frac{1}{x} - \frac{1}{2x^2} < \psi'(x) < \frac{1}{x} - \frac{1}{2x^2} + \frac{1}{6 x^3}. $$

Similar inequalities were previously obtained by [Gordon, 1994]. For \(x > 0\),

$$ \displaystyle \left. \begin{array}{l} \frac{1}{x} + \frac{1}{2x^2} + \frac{1}{6(x+1/14)^3} \\ \frac{1}{x} + \frac{1}{2x^2} + \frac{1}{6x^3} -\frac{1}{30x^5} \end{array} \right\} < \psi'(x) <\left\{ \begin{array}{l} \frac{1}{x} + \frac{1}{2x^2} + \frac{1}{6x^3} \\ \frac{1}{x} + \frac{1}{2x^2} + \frac{1}{6x^3} -\frac{1}{30(x+1/8)^5} \end{array} \right.. $$

Similar inequalities to those of [] were obtained in equation (3.4) of []

Theorem (2002)

For \(x \geq 1/2\), we have \(\displaystyle \frac{(n-1)!}{(x-\frac{1}{2})^n} + \sum\limits_{k = 1}^{2N+1} \frac{B_{2k}(1/2)}{(2k)!}\frac{(n+2k+1)!}{(x-\frac{1}{2})^{n+2k}} < (-1)^{(n+1)}\psi^{(n)}(x) < \sum\limits_{k = 1}^{2N} \frac{B_{2k}(1/2)}{(2k)!}\frac{(n+2k+1)!}{(x-\frac{1}{2})^{n+2k}}\).

The values \(B_{2k}(1/2)\) in the theorem above are known in explicit form ([Allasia et al., 2002])

$$ \displaystyle B_{2k}(1/2) \ = \ \left(\frac{1}{2^{2k-1}} - 1 \right) B_{2k}, \ \ k \geq 0. $$

Several other inequalities for \(\psi^{(k)}(x)\) can be obtained exploring the relations between \(\psi^{(k)}(x)\) and \(\psi(x)\). For instance, in [Guo and Qi, 2013], one finds (among other things)

$$ \displaystyle e^{-\psi(x+1)} \ < \ \sqrt[n]{\frac{|\psi^{(n)}(x)|}{(n-1)!}} \ < \ e^{-\psi(x)}, \ k \geq 0, x > 0. $$

4. Complex Stirling formula

The complex version of the Euler-maclaurin formula for the Gamma function (see, e.g., [Lang, 1999], p. 422) is

$$ \displaystyle \log(\Gamma(s)) \ = \ \left( s - \frac{1}{2} \right)\log(s) - s + \log(\sqrt{2\pi}) - \int\limits_{0}^{\infty} \frac{B_1(t-\lfloor t \rfloor)}{z+t} dt, $$

which holds for all nonzero complex numbers \(s\) which does not have negative real part. In the relation above, \(\log\) means the principal branch of the logarithm and \(B_1(x) = x - \frac{1}{2}\) is the Bernoulli polynomial of degree one. Using similar expressions with more terms of the Euler-Maclaurin formula, one might be able to deduce the complex version of Stirling’s formula (see [Gradshteyn and Ryzhik, n.d.], 8.344):

$$ \displaystyle \log \Gamma(s) \ = \ \left(s-\frac{1}{2}\right)\log(s) - s - \log(\sqrt{2\pi}) + \sum\limits_{j =1}^{n-1} \frac{B_{2j}}{2j(2j-1)x^{2j-1}} + R_n(z), n \geq 1, $$

with

$$ \displaystyle |R_n(z)| \ \leq \ \frac{|B_{2n}|}{2n(2n-1)|s|^{2j-1}\cos^{2n-1}\left(\frac{1}{2}\arg(s)\right)}. $$

A few other estimates can be found in Section 20.2 of [Ramaré, 2021]. For \(0 < \delta < \pi\) and \(s = |s|e^{i\phi}\) with \(|\phi| \leq \pi - \delta\), the following holds

$$ \displaystyle \Gamma(s) \ = \ \sqrt{2\pi} e^{\log(s)(s-1/2)-s} e^{\xi_s}, \quad \mbox{with} \quad |\xi_s| \leq \frac{1}{12\sin^2(\delta/2) |s|}. $$

For \(s = \sigma + it\) with \(\sigma > 0\), we also have

$$ \displaystyle |\Gamma(s)| \ \leq \ \sqrt{2\pi} |s|^{\sigma - 1/2} e^{-\pi |t|/2} e^{1/(6|s|)} $$

and

$$ \displaystyle |\Gamma(s)| \ \geq \ \sqrt{2\pi} |s|^{\sigma - 1/2} e^{-\pi |t|/2} e^{-\sigma^3/t^2}. $$

4. Complex Stirling formula

The complex version of the Euler-maclaurin formula for the Gamma function (see, e.g., [Lang, 1999], p. 422) is

$$ \displaystyle \log(\Gamma(s)) \ = \ \left( s - \frac{1}{2} \right)\log(s) - s + \log(\sqrt{2\pi}) - \int\limits_{0}^{\infty} \frac{B_1(t-\lfloor t \rfloor)}{z+t} dt, $$

which holds for all nonzero complex numbers \(s\) which does not have negative real part. In the relation above, \(\log\) means the principal branch of the logarithm and \(B_1(x) = x - \frac{1}{2}\) is the Bernoulli polynomial of degree one. Using similar expressions with more terms of the Euler-Maclaurin formula, one might be able to deduce the complex version of Stirling’s formula (see [Gradshteyn and Ryzhik, n.d.], 8.344):

$$ \displaystyle \log \Gamma(s) \ = \ \left(s-\frac{1}{2}\right)\log(s) - s - \log(\sqrt{2\pi}) + \sum\limits_{j =1}^{n-1} \frac{B_{2j}}{2j(2j-1)x^{2j-1}} + R_n(z), n \geq 1, $$

with

$$ \displaystyle |R_n(z)| \ \leq \ \frac{|B_{2n}|}{2n(2n-1)|s|^{2j-1}\cos^{2n-1}\left(\frac{1}{2}\arg(s)\right)}. $$

A few other estimates can be found in Section 20.2 of [Ramaré, 2021]. For \(0 < \delta < \pi\) and \(s = |s|e^{i\phi}\) with \(|\phi| \leq \pi - \delta\), the following holds

$$ \displaystyle \Gamma(s) \ = \ \sqrt{2\pi} e^{\log(s)(s-1/2)-s} e^{\xi_s}, \quad \mbox{with} \quad |\xi_s| \leq \frac{1}{12\sin^2(\delta/2) |s|}. $$

For \(s = \sigma + it\) with \(\sigma > 0\), we also have

$$ \displaystyle |\Gamma(s)| \ \leq \ \sqrt{2\pi} |s|^{\sigma - 1/2} e^{-\pi |t|/2} e^{1/(6|s|)} $$

and

$$ \displaystyle |\Gamma(s)| \ \geq \ \sqrt{2\pi} |s|^{\sigma - 1/2} e^{-\pi |t|/2} e^{-\sigma^3/t^2}. $$