Abstract
The aim of this paper is to introduce some simple and fast formulas for approximating the gamma function. Some involved functions are completely monotonic. The corresponding asymptotic series are constructed and some sharp inequalities are established.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction and motivation
The problem of approximating the factorial function n!, \(n=1,2,3,\ldots \) and its extension gamma function \(\Gamma \) to positive real numbers x, defined by
is widely studied by the researchers. Only in the recent past, many formulas were presented. We refer for example to Batir and Chen (2012), Batir (2010), Burnside (1917), Chen (2013), Chen and Lin (2012), Chen and Mortici (2012), Dubourdieu (1939), Gosper (1978), Kalmykov and Karp (2013), Laforgia and Natalini (2013), Lu (2014), Lu (2014), Lu and Wang (2013), Mortici (2009), Mortici (2010), Nemes (2012), where also estimates for polygamma and other related functions were stated. Starting from the Stirling’s formula
and Burnside’s formula (Burnside 1917)
Mortici (2009) considered the following approximations for every \(p\in \left[ 0,1\right] \):
and proved that the best results are obtained when
The following asymptotic series is associated to Stirling’s formula (1.1)
where \(B_{j}\) are the Bernoulli numbers defined by
For details, see Abramowitz and Stegun (1972, Rel. 6.1.40, p. 257).
Chen and Lin (2012) gave the entire asymptotic series associated to the Gosper’s formula Gosper (1978)
and Ramanujan’s formula (Ramanujan 1988)
We present in this paper the following formulas:
and
which are part of the general formula
This is an extension of Stirling’s formula, as the factor \(x^{x+\frac{1}{2}}\) is replaced by \(\left( x+a\right) ^{x+b+\frac{1}{2}}/x^{b}\). By imposing the natural condition
we can easily find \(k=\sqrt{2\pi }\mathrm{e}^{-a},\) so (1.6) becomes
Remark that the particular approximations \(\Gamma \left( x+1\right) \sim \mu \left( 0,0,x\right) ,\) \(\Gamma \left( x+1\right) \sim \mu (\frac{1}{2} ,0,x) \) and \(\Gamma \left( x+1\right) \sim \mu \left( p,0,x\right) \) are (1.1), (1.2) and (1.3), respectively.
Next we show that the most accurate approximations among all approximations (1.7) are
and
that are (1.4) and (1.5), respectively. Their geometric mean
is an approximation of the same order.
We associate to (1.7), the function
to establish the following sharp inequalities, for every real \(x\ge 1\):
and
with \(\alpha =1\) and
and
2 The best constants in a class of approximations
We concentrate in this section in the problem of finding the most accurate approximations among all approximations (1.7). Whenever an approximation formula \(f\left( n\right) \sim g\left( n\right) ,\) as \(n\rightarrow \infty ,\) is given, we define the sequence \(w_{n}\) by the relations
and we consider the approximation \(f\left( n\right) \sim g\left( n\right) \) to be better when the sequence \(w_{n}\) converges to zero faster.
The following result is a main tool for evaluating the convergence rate of the sequence \(w_{n}\):
Lemma 1
Let \(w_{n}\) be a sequence converging to zero, such that
for some \(k>1.\) Then
For details and several applications, see, e.g., Batir and Chen (2012), Batir (2010), Chen (2013), Chen and Lin (2012), Chen and Mortici (2012), Lu (2014), Lu and Wang (2013), or Mortici (2010).
For the sequence \(w_{n}=w_{n}\left( a,b\right) \) associated to (1.7):
we have:
where
By (2.1), if \(t_{2}\ne 0,\) then the speed of convergence of \( w_{n}-w_{n+1}\) is \(n^{-2}\) and by Lemma 1, the sequence \(w_{n}\) converges to zero as \(n^{-1}.\)
If \(t_{2}=0,\) then by (2.1), the speed of convergence of \(w_{n}-w_{n+1}\) is at least \(n^{-3},\) so the speed of convergence of \(w_{n}\) is at least \( n^{-2}.\)
As we are interested in finding the fastest sequence \(w_{n},\) we should have at least \(t_{2}=0.\)
Similarly, the sequence \(w_{n}\) has the highest speed of convergence when \( t_{2}=0\) and \(t_{3}=0,\) that is
The solutions of this system,
and
produce the following approximations:
respectively
In these cases,
and
so by Lemma 1, we conclude that
For every pair \(\left( a,b\right) \) with \(\left( a,b\right) \ne \left( a_{*},b_{*}\right) \) and \(\left( a,b\right) \ne \left( a_{\#},b_{\#}\right) ,\) the speed of convergence of the sequence \( w_{n}\left( a,b\right) \) is at most \(n^{-2}.\) Other approximations (1.7) are of order at most \(n^{-2},\) which is less than (2.2) and (2.3).
3 Asymptotics and truncations
In the first part of this section we construct the asymptotic series associated to (1.7). Recall that an asymptotic series is of great interest in approximation theory, since truncations of this series at any m -th term provide estimates of order \(n^{-\left( m+1\right) },\) for every integer \(m\ge 1.\)
Theorem 1
The following formula holds true, for every integer \(n\ge 1\):
where
Proof
Using (1.7), we get
As
and
we obtain
respectively
Now the conclusion follows by replacing in (3.2). \(\square \)
Precisely, the first terms in (3.1) are the following:
In particular,
As usually, truncations of an asymptotic series offer increasingly accurate approximations. Sometimes, it can be proved that these truncations are under- or over-approximations. We are in a position to present the following result.
Theorem 2
The following inequalities hold true, for every integer \(n\ge 1\):
Proof
By taking the logarithms, we define the sequences
and
We asserted \(a_{n}>0\) and \(b_{n}<0,\) but as \(a_{n}\) and \(b_{n}\) converge to zero, it suffices to prove that \(a_{n}\) is strictly decreasing and \(b_{n}\) is strictly increasing. In this sense, we have \(a_{n+1}-a_{n}=u\left( n\right) \) and \(b_{n+1}-b_{n}=v\left( n\right) ,\) where
and
We have
and
where
and
Now u is strictly concave, v is strictly convex on \([1,\infty ),\) with \( u\left( \infty \right) =v\left( \infty \right) =0,\) so \(u<0\) and \(v>0\) on \( [1,\infty ).\) As we explained, the proof is now completed. \(\square \)
Using a similar method, we also proved the following better inequalities for every integer \(n\ge 1\):
Moreover, our computations proved that by truncation the series (3.3) at the first few terms, under-approximations are obtained. As an example, the following inequality holds true for every integer \(n\ge 1\):
We can establish a similar result for an entire class of real numbers a, b.
Theorem 3
Let a, b be real numbers, \(a\ne 0,\) such that
Then there exists a real number m such that the following inequalities are valid, for every integer \(n\ge m\):
Proof
We use the same procedure as in the proof of Theorem 2. Let
and
If f, g are the functions defined by \(f\left( n\right) =x_{n+1}-x_{n}\) and \(g\left( n\right) =y_{n+1}-y_{n},\) then
and
where F and G are polynomials of fifth and sixth degrees, respectively:
The conditions from the hypotheses assure that the leading coefficients of F and G are positive. As a consequence, there is a real number \(m_{0}\) such that \(F>0\) and \(G>0\) on \([m_{0},\infty ).\) By (3.4)–(3.5), f is strictly concave, g is strictly convex on \([m_{0},\infty ),\) with \( f\left( \infty \right) =g\left( \infty \right) =0,\) so \(f<0\) and \(g>0\) on \( [m_{0},\infty ).\) Thus \(x_{n}\) decreases to zero, while \(y_{n}\) increases to zero, so \(x_{n}>0\) and \(y_{n}<0,\) for every \(n>m_{0}.\) \(\square \)
4 Complete monotonicity arguments
Recall that a function z is completely monotonic on \(\left( 0,\infty \right) \) if it has derivatives of all orders and the following inequalities are valid for every integer \(n\ge 0\) and \(x\in \left( 0,\infty \right) \):
The function z is completely monotonic on \(\left( 0,\infty \right) \) if and only if
where \(\mu \) is a non-negative measure on \((0,\infty )\) such that the integral converges for all \(x>0\). See widder (1981, p. 161).
The logarithmic derivative of the gamma function
is called the digamma function, while the derivatives \(\psi ^{\prime },\) \( \psi ^{\prime \prime },\) ... are known as trigamma, tetragamma functions, and in general, polygamma functions. In what follows, we use the following integral representations, for every real \(x>0\) and positive integer n,
and for every \(r>0,\)
See, e.g., Abramowitz and Stegun (1972)\(. \)
Related to (1.7), we use (4.2)–(4.3), to present the following
Lemma 2
Let
Then \(F_{a,b}^{\prime \prime }\) admits the following integral representation:
where
In terms of power series in t, the following formula is valid:
where
Proof
As
we have
then
(we used the recurrence formula \(\psi \left( x+1\right) =\psi \left( x\right) +1/x\)). With the help of (4.2)–(4.3), we deduce
After some standard computations, we get
which is the first assertion in this lemma. The expression in powers of t of \(\phi \) follows easily using the classical formula
\(\square \)
Now we can state the following result about the complete monotonicity of the function \(F_{a,b}\).
Theorem 4
Let a, b be real numbers such that \(\phi _{n}\left( a,b\right) \ge 0,\) for every integer \(n\ge 3.\) Then the function \(F_{a,b}\) is completely monotonic on \(\left( 0,\infty \right) .\)
Proof
As \(\phi _{n}\left( a,b\right) \ge 0,\) for every integer \(n\ge 3,\) we deduce that \(\phi _{a,b}\ge 0\). By (4.4), the function \( F_{a,b}^{\prime \prime }\) is completely monotonic. This means that \(\left( -1\right) ^{n}( F_{a,b}^{\prime \prime }\left( x\right) ) ^{\left( n\right) }\ge 0,\) for every \(x\in \left( 0,\infty \right) \) and integer \(n\ge 0.\) Equivalently,
for every \(x\in \left( 0,\infty \right) \) and integer \(n\ge 2.\)
The function \(F_{a,b}^{\prime }\) is increasing (as a result of \( F_{a,b}^{\prime \prime }\ge 0\)), with \(\lim _{x\rightarrow \infty }F_{a,b}^{\prime }\left( x\right) =0\) [see (4.6)], so \(F_{a,b}^{\prime }\le 0.\)
The function \(F_{a,b}\) is decreasing (as a result of \(F_{a,b}^{\prime }\le 0 \)), with \(\lim _{x\rightarrow \infty }F_{a,b}\left( x\right) =0\) [see (4.5)], so \(F_{a,b}\ge 0.\)
Now (4.7) holds also for \(n=0\) and \(n=1,\) so \(F_{a,b}\) is completely monotonic on \(\left( 0,\infty \right) .\) \(\square \)
Related to the above theorem, a natural question arises. Namely we wonder whether there exist indeed real numbers a, b satisfying \(\phi _{n}\left( a,b\right) \ge 0,\) for every integer \(n\ge 3.\) The answer is affirmative for an infinite class of pairs \(\left( a,b\right) ,\) as we can see from the following example.
Corollary 1
Assume that a, b are real numbers satisfying one of the following conditions:
-
(i)
\(-1<a<0\) and \(b>0.\)
-
(ii)
\(\frac{1}{6}\sqrt{15}-\frac{3}{2}<a<0\) and
Then the function \(F_{a,b}\) is completely monotonic on \(\left( 0,\infty \right) .\)
Proof
In order to provide the argument of the fact that \(\phi _{n}\left( a,b\right) >0,\) we need \(b+1>0.\) This is true in case (i), since \(b>0.\) In case (ii), we have
(\(\frac{1}{6}\sqrt{15}-\frac{3}{2}\) is the greatest root of the second degree polynomial \(6a^{2}+18a+11\)).For every integer \(n\ge 3,\) we have
If \(b>0\) (case (i)), then the last inequality in (4.9) becomes
or
This is true, since \(-a^{2}-a+\frac{1}{6}>0\) and \(-2a\left( a+1\right) b>0,\) for every \(-1<a<0\) and \(b>0.\)
In case (ii), we have \(b<0\), so the last inequality in (4.9) becomes
or
which is true (as \(a+1>0,\) the inequality (4.10) follows by multiplying the inequality (4.8) by \(a+1\)).
As the hypotheses of Theorem 4 are fulfilled, the function \(F_{a,b}\) is completely monotonic on \(\left( 0,\infty \right) .\) \(\square \)
Related to our main formulas (1.4)–(1.5), obtained for privileged values \(a_{*}=-\frac{1}{\sqrt{2}},\) \(b_{*}=-\frac{\sqrt{2}}{3}-\frac{ 1}{2},\) respectively \(a_{\#}=\frac{1}{\sqrt{2}},\quad b_{\#}=\frac{\sqrt{2}}{ 3}-\frac{1}{2},\) we can state the following result.
Lemma 3
The following inequalities hold true, for every integer \(n\ge 3\):
In consequence, the function \(F_{a_{*},b_{*}}\) is completely monotonic on \(\left( 0,\infty \right) .\)
Proof
We have
The required inequality follows by adding the next three inequalities:
and
Indeed, for every integer \(n\ge 3,\) we have:
Inequality (4.12) holds for every integer \(n\ge 9,\) so (4.11) is valid for every integer \(n\ge 9.\) It is also true for every integer \( n=3,4,\ldots ,8,\) which can be verified by direct (numerical) computation. \(\square \)
Lemma 4
The following inequalities hold true, for every integer \(n\ge 3\):
In consequence, the function \(F_{a_{\#},b_{\#}}\) is completely monotonic on \( \left( 0,\infty \right) .\)
Proof
We have
The following relations are valid for every integer \(n\ge 9\):
Inequality \(\phi _{n}\left( a_{\#},b_{\#}\right) >0\) is true for every integer \(n\ge 9,\) and cases \(n=3,4,\ldots ,8\) were directly verified by us. \(\square \)
Theorem 5
The function
associated to approximation formula (1.8) is completely monotonic on \( \left( 0,\infty \right) .\)
The proofs follow from the relation
Thus G is completely monotonic, as the sum of two completely monotonic functions.
We showed how the completely monotonic functions can help in the problem of discovering sharp inequalities related to gamma function.
The function \(F_{a_{*},b_{*}}\) is completely monotonic, in particular strictly decreasing. As a consequence, the following inequalities are valid for every real number \(x\ge 1\):
By exponentiating, we deduce (1.9). Similarly, the inequalities (1.10)–(1.11) follow from the monotonicity of the functions \( F_{a_{\#},b_{\#}}\) and G.
Furthermore, the monotonicity of the derivatives of higher order of the functions \(F_{a,b}\) can be used to establish sharp estimates for digamma, trigamma and polygamma functions in general.
References
Abramowitz M, Stegun IA (1972) Handbook of mathematical functions with formulas, graphs, and mathematical tables, national bureau of standards, applied mathematical series, 9th printing, vol 55. Dover, New York
Batir N, Chen C-P (2012) Improving some sequences convergent to Euler-Mascheroni constant. Proyecciones 31(1):29–38
Batir N (2010) Very accurate approximations for the factorial function. J Math Inequal 4(3):335–344
Burnside W (1917) A rapidly convergent series for \(\log N!\). Messenger Math 46:157–159
Chen C-P (2013) Continued fraction estimates for the psi function. Appl Math Comput 219(19):9865–9871
Chen C-P, Lin L (2012) Remarks on asymptotic expansions for the gamma function. Appl Math Lett 25:2322–2326
Chen C-P, Mortici C (2012) New sequence converging towards the Euler-Mascheroni constant. Comput Math Appl 64(4):391–398
Dubourdieu J (1939) Sur un théorème de M. S. Bernstein relatif á la transformation de Laplace-Stieltjes. Compositio Math 7:96–111
Gosper RW (1978) Decision procedure for indefinite hypergeometric summation. Proc Natl Acad Sci USA 75:40–42 (1978)
Kalmykov SI, Karp DB (2013) Log-convexity and log-concavity for series in gamma ratios and applications. J Math Anal Appl 406:400–418
Laforgia A, Natalini P (2013) Exponential, gamma and polygamma functions: simple proofs of classical and new inequalities. J Math Anal Appl 407:495–504
Lu D (2014) A new quicker sequence convergent to Euler’s constant. J Number Theory 136:320–329
Lu D (2014) A generated approximation related to Burnside’s formula. J Number Theory 136:414–422
Lu D, Wang X (2013) A generated approximation related to Gosper’s formula and Ramanujan’s formula. J Math Anal Appl 406(1):287–292
Mortici C (2009) An ultimate extremely accurate formula for approximation of the factorial function. Arch Math (Basel) 93(1):37–45
Mortici C (2010) Product approximations via asymptotic integration. Am Math Monthly 117(5):434–441
Nemes G (2012) Approximations for the higher order coefficients in an asymptotic expansion for the Gamma function. J Math Anal Appl 396:417–424
Ramanujan S (1988) The lost notebook and other unpublished papers, with an introduction by George E. Narosa Publishing House, Andrews, New Delhi
Widder DV (1981) The Laplace transform. Princeton University Press, Princeton
Acknowledgments
The authors would thank the reviewers for useful comments and corrections that improved much the initial form of this manuscript. The work of Cristinel Mortici was supported by a grant of the Romanian National Authority for Scientific Research, CNCS-UEFISCDI, project number PN-II-ID-PCE-2011-3-0087. Some computations in this paper were performed using Maple software. Cristinel Mortici finalized the work to this paper while he was visiting the National Technical University of Athens, in June 2015.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Jose Alberto Cuminato.
Rights and permissions
About this article
Cite this article
Mortici, C., Dumitrescu, S. Efficient approximations of the gamma function and further properties. Comp. Appl. Math. 36, 677–691 (2017). https://doi.org/10.1007/s40314-015-0252-1
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40314-015-0252-1
Keywords
- Gamma function
- Digamma function
- Approximations
- Error estimates
- Speed of convergence
- Asymptotic series
- Complete monotonicity
- Inequalities