You and Li Journal of Inequalities and Applications (2017) 2017:309 https://doi.org/10.1186/s13660-017-1585-7
RESEARCH
Open Access
Approximation for the gamma function via the tri-gamma function Xu You1 and Xiaocui Li2* *
Correspondence:
[email protected] School of Science, Beijing University of Chemical Technology, Beijing, 100029, P.R. China Full list of author information is available at the end of the article 2
Abstract In this paper, we present a new sharp approximation for the gamma function via the tri-gamma function. This approximation is fast in comparison with the recently discovered asymptotic series. We also establish the inequalities related to this approximation. Finally, some numerical computations are provided for demonstrating the superiority of our approximation. MSC: 33B15; 26D15; 41A25 Keywords: approximation; gamma function; inequalities; multiple-correction method
1 Introduction It is well known that we often need to deal with the problem of approximating the factorial function n! and its extension to real numbers called the gamma function, defined by
∞
(x) =
t x–1 e–t dt,
Re(x) > 0,
0
and the logarithmic derivatives of (x) are called the psi-gamma functions, denoted by
ψ(x) =
(x) d ln (x) = . dx (x)
For x > 0, the derivatives ψ (x) are called the tri-gamma functions, while the derivatives ψ (k) (x), k = 1, 2, 3, . . . , are called the poly-gamma functions. Mortici [1] proved that x √ x 1 (x + 1) = 2πx ψ (x + 1/2) exp h(x) exp e 12
(1.1)
and
h(x) =
∞
∞
B2m Bm–1 – , 2m–1 2m(2m – 1)x 12(x + 1/2)m m=1 m=1
(1.2)
© The Author(s) 2017. This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
You and Li Journal of Inequalities and Applications (2017) 2017:309
Page 2 of 7
where Bk , k ≥ 0, noting the Bernoulli numbers which are generated by ∞
zk z = Bk . ez – 1 k!
(1.3)
k=0
It is found that h(x) =
11 107 2911 1 1 – + – + O . 3 5 7 9 240x 6720x 80,640x 1,520,640x x11
(1.4)
However, those coefficients of the asymptotic formula (1.1) are not complete. The asymptotic expansion of (x + 1) via the tri-gamma function can be generalized to the general cases by the arguments in [2] as follows. Barnes (1899) and Rowe (1931) have shown that 1 1 ln z – z + ln 2π ln (z + a) = z + a – 2 2 +
n (–1)k+1 Bk+1 (a) k=1
k(k + 1)
z–k + O z–n–1 ,
(1.5)
where | arg z| ≤ π – ε, ε > 0 and Bk (x) is the Bernoulli polynomial. If a = 12 , Bk (a) vanishes if k is odd, note that n B2k ( 12 ) 1–2k 1 1 + O z–2n–1 = z(ln z – 1) + ln 2π + z ln z + 2 2 2k(2k – 1)
(1.6)
k=1
for | arg z| ≤ π – ε, ε > 0 listed in [2], p. 32, (5). We can get as x → ∞, ∞ B2k ( 12 ) 1 1 1 ln x + . = x ln x – x + ln 2π + 2k–1 2 2 2k(2k – 1) x
(1.7)
k=1
So we consider a function h(x) defined by (x + 1) =
√
2π x
1 1 ψ x+ exp h(x). e exp 12 2
x+1/2 –x
(1.8)
By (1.7), one can easily obtain that as x → ∞, 1 1 1 1 h(x) = ln (x + 1) – ln 2π – x + ln x + x – ψ x + 2 2 12 2 ∞ B2n 1 1 d2 1 = – ln x + 2n–1 2 2n(2n – 1) x 12 dx 2 n=1 =
∞ n=1
B2n+2 (1 – 21–2n )B2n 1 + . 2n+1 2(n + 1)(2n + 1) 12 x
Thus, together with (1.8) the asymptotic expansion can be explicitly expressed as (x + 1) =
√
∞ 1 cn 1 , ψ x+ –x+ exp 12 2 x2n+1 n=1
2π x
x+1/2
x → ∞,
(1.9)
You and Li Journal of Inequalities and Applications (2017) 2017:309
Page 3 of 7
where cn =
B2n+2 (1 – 21–2n )B2n + , 2(n + 1)(2n + 1) 12
(1.10)
here Bn denotes the Bernoulli number. In this paper we will apply the multiple-correction method [3–5] to construct a new asymptotic expansion for the factorial n! and the gamma function via the tri-gamma function. Theorem 1 For every integer n ≥ 1, we have (n + 1) ∼
√
n n 1 2πn exp ψ (n + 1/2) exp η1 (n) + η2 (n) , e 12
(1.11)
where η1 (n) =
1 240 , n3 + 11 n 28
η2 (n) =
n7 +
108,338 5 n 44,583
–
193 282,240 21,252,897,179 3 n 59,061,418,416
+
997,042,514,542,183 n 188,081,086,945,752
.
Using Theorem 1, we provide some inequalities for the gamma function. Theorem 2 For every integer n > 1, the following holds: exp η1 (n) < √
n! 1 2πn( ne )n exp( 12 ψ (n + 1/2))
< exp η1 (n) + η2 (n) .
(1.12)
To obtain Theorem 2, we need the following lemma which was used in [6–8] and is very useful for constructing asymptotic expansions. Lemma 1 If the sequence (xn )n∈N is convergent to zero and there exists the limit lim ns (xn – xn+1 ) = l ∈ [–∞, +∞]
(1.13)
n→+∞
with s > 1, then lim ns–1 xn =
n→+∞
l . s–1
(1.14)
Lemma 1 was proved by Mortici in [6]. From Lemma 1, we can see that the speed of convergence of the sequences (xn )n∈N increases together with the values s satisfying (1.13).
2 Proof of Theorem 1 (Step 0) The initial-correction. We can introduce a sequence (u0 (n))n≥1 by the relation n! =
√
2πn
n 1 n ψ (n + 1/2) exp u0 (n), exp e 12
and to say that an approximation n! ∼ of convergence of u0 (n) is higher.
√
(2.1)
1 ψ (n + 1/2)) is better if the speed 2πn( ne )n exp( 12
You and Li Journal of Inequalities and Applications (2017) 2017:309
Page 4 of 7
From (2.1), we have u0 (n) = ln n! –
1 n 1 ln 2πn – n ln – ψ (n + 1/2). 2 e 12
(2.2)
k! For any integer k, x > 0, we have ψ (k) (x + 1) = ψ (k) (x) + (–1)k xk+1 and when k = 1, x = n, it 1 yields ψ (n + 1) = ψ (n) – n2 . Thus,
1 1 n – ln 2πn – n ln n+1 2 e n+1 1 1 1 – . + ln 2π(n + 1) + (n + 1) ln 2 e 12 (n + 1/2)2
u0 (n) – u0 (n + 1) = ln
(2.3)
Developing (2.3) into power series expansion in 1/n, we have u0 (n) – u0 (n + 1) =
1 1 1 + O . 4 80 n n5
(2.4)
By Lemma 1, we know that the rate of convergence of the sequence (u0 (n))n≥1 is n–3 . (Step 1) The first-correction. We define the sequence (u1 (n))n≥1 by the relation n! ∼
√
n n 1 ψ (n + 1/2) exp η1 (n) exp u1 (n), 2πn exp e 12
(2.5)
where η1 (n) =
a1 . n3 + b2 n2 + b1 n + b0
From (2.5), we have 1 n 1 1 – ln 2πn – n ln + ln 2π(n + 1) n+1 2 e 2 1 n+1 1 – – η1 (n) + η1 (n + 1). + (n + 1) ln e 12 (n + 1/2)2
u1 (n) – u1 (n + 1) = ln
(2.6)
Developing (2.6) into power series expansion in 1/n, we have 1 1 1 1 – 3a1 4 + – + a1 (6 + 4b2 ) 5 80 n 40 n 1 15 + 5a1 –2 + b1 – 2b2 – b22 + 448 n6 1 17 + a1 15 + 6b0 + 20b2 + 15b22 + 6b32 – 3b1 (5 + 4b2 ) + – 448 n7 1 +O 8 . (2.7) n
u1 (n) – u1 (n + 1) =
By Lemma 1, the fastest possible sequence (u1 (n))n≥1 is obtained as the first four items on the right-hand side of (2.7) vanish. 1 (i) If a1 = 240 , then the rate of convergence of the sequence (u1 (n))n≥1 is n–3 .
You and Li Journal of Inequalities and Applications (2017) 2017:309
(ii) If a1 =
1 , 240
b2 = 0, b1 =
11 , 28
u1 (n) – u1 (n + 1) =
Page 5 of 7
b0 = 0, from (2.7) we have
193 1 1 + O , 8 40,320 n n9
and the rate of convergence of the sequence (u1 (n))n≥1 is at least n–7 . (Step 2) The second-correction. So we define the sequence (u2 (n))n≥1 by the relation n! ∼
√
n n 1 2πn exp ψ (n + 1/2) exp η1 (n) + η2 (n) exp u2 (n), e 12
(2.8)
where η2 (n) =
a2 . n7 + b6 n6 + b5 n5 + b4 n4 + b3 n3 + b2 n2 + b1 n + b0
Using the same method as above, we obtain that the sequence (u2 (n))n≥1 converges 193 fastest only if a2 = 282,240 , b6 = 0, b5 = 108,338 , b4 = 0, b3 = – 21,252,897,179 , b2 = 0, b1 = 44,583 59,061,418,416 997,042,514,542,183 , b = 0, and the rate of convergence of the sequence (u (n)) 0 2 n≥1 is at least 188,081,086,945,752 –15 n . We can get 168,288,414,443,284,544,502,901 1 1 + O 17 . u2 (n) – u2 (n + 1) = 516,188,874,145,329,388,523,520 n16 n The new asymptotic (1.11) is obtained.
3 Proof of Theorem 2 The double-side inequality (1.12) may be written as follows: f (n) = ln (n + 1) –
1 n 1 ln 2πn – n ln – ψ (n + 1/2) – η1 (n) – η2 (n) < 0 2 e 12
g(n) = ln (n + 1) –
n 1 1 ln 2πn – n ln – ψ (n + 1/2) – η1 (n) > 0. 2 e 12
and
Suppose F(n) = f (n + 1) – f (n) and G(n) = g(n + 1) – g(n). For every x > 1, we can get F (x) =
A2 (x – 1) 3 3 4 70x (1 + x) (1 + 2x) (11 + 28x2 )3 (39 + 56x + 28x2 )3 13 (x; 6)23 (x; 6)
> 0 (3.1)
and G (x) =
B(x – 1) 10x3 (1 + x)3 (1 + 2x)4 (11 + 28x2 )3 (39 + 56x + 28x2 )3
< 0,
where 1 (x; 6) = 1,994,085,029,084,366 – 135,359,702,133,051x2 + 914, 085, 135, 478, 944x4 + 376,162,173,891,504x6 ,
(3.2)
You and Li Journal of Inequalities and Applications (2017) 2017:309
Page 6 of 7
2 (x; 6) = 3,148,972,636,321,763 + 5,642,594,180,998,698x + · · · + 376,162,173,891,504x6 . A(x) = 471,110,623,493,199,298,560x20 + · · · is a polynomial of 20th degree with all positive coefficients and B(x) = –26,572,808,192x12 – · · · is a polynomial of 12th degree with all negative coefficients. This shows that F(x) is strictly convex and G(x) is strictly concave on (0, ∞). According to Theorem 1, when n → ∞, it holds that limn→∞ f (n) = limn→∞ g(n) = 0; thus limn→∞ F(n) = limn→∞ G(n) = 0. As a result, we can make sure that F(x) > 0 and G(x) < 0 on (0, ∞). Consequently, the sequence f (n) is strictly increasing and g(n) is strictly decreasing while they both converge to 0. As a result, we conclude that f (n) < 0 and g(n) > 0 for every integer n > 1. The proof of Theorem 2 is complete.
4 Numerical computations In this section, we give Table 1 to demonstrate the superiority of our new series respectively. From what has been discussed above, we found out the new asymptotic function as follows: n! ∼
√
n n 1 ψ (n + 1/2) exp η1 (n) + η2 (n) = β(n), 2πn exp e 12
(4.1)
where η1 (n) =
1 240 , n3 + 11 n 28
η2 (n) =
n7 +
108,338 5 n 44,583
–
193 282,240 21,252,897,179 3 n 59,061,418,416
+
997,042,514,542,183 n 188,081,086,945,752
.
Mortici and Qi [1] gave the formula n! ∼
√
2πn
n 1 1 11 107 n ψ (n + 1/2) exp exp – + e 12 240n3 6720n5 80,640n7
= α1 (n).
(4.2)
We can get the approximation by truncation of the asymptotic formula (1.9) n! ∼
n n 1 ψ (n + 1/2) exp e 12 11 107 2911 808,733 1 – + – + × exp 240n3 6720n5 80,640n7 1,520,640n9 184,504,320n11 √
2πn
= α2 (n).
(4.3)
Table 1 Simulations for α1 (n), α2 (n) and β (n) n
α1 (n)–n! n!
α2 (n)–n! n!
β(n)–n! n!
50 500 1000 2000
9.7924 × 10–19 9.8013 × 10–28 1.9143 × 10–30 3.7389 × 10–33
1.1997 × 10–24 1.2019 × 10–37 1.4672 × 10–41 1.7910 × 10–45
–7.0866 × 10–28 –7.1217 × 10–43 –2.1734 × 10–47 –6.63 × 10–52
You and Li Journal of Inequalities and Applications (2017) 2017:309
The great advantage of our approximation β(n) consists in its simple form and its accuracy. From Table 1, we can see that the formula β(n) converges faster than the approximation of the formula α1 (n) and α2 (n). Acknowledgements This work was supported by the National Natural Science Foundation of China (Grant No. 61403034) and Beijing Municipal Commission of Education Science and Technology Program KM201810017009. Computations made in this paper were performed using Mathematica 9.0. Competing interests The authors declare that they have no competing interests. Authors’ contributions The authors read and approved the final manuscript. Author details 1 Department of Mathematics and Physics, Beijing Institute of Petrochemical Technology, Beijing, 102617, P.R. China. 2 School of Science, Beijing University of Chemical Technology, Beijing, 100029, P.R. China.
Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Received: 17 October 2017 Accepted: 8 December 2017 References 1. Mortici, C, Qi, F: Asymptotic formulas and inequalities for the gamma function in terms of the tri-gamma function. Results Math. 67, 395-402 (2015) 2. Luke, YL: The Special Functions and Their Applications, Vol. I, pp. 8-37. Academic Press, New York (1969) 3. Cao, XD, Xu, HM, You, X: Multiple-correction and faster approximation. J. Number Theory 149, 327-350 (2015) 4. Cao, XD: Multiple-correction and continued fraction approximation. J. Math. Anal. Appl. 424, 1425-1446 (2015) 5. Cao, XD, You, X: Multiple-correction and continued fraction approximation (II). Appl. Math. Comput. 261, 192-205 (2015) 6. Mortici, C: Product approximations via asymptotic integration. Am. Math. Mon. 117(5), 434-441 (2010) 7. Mortici, C: New improvements of the Stirling formula. Appl. Math. Comput. 217(2), 699-704 (2010) 8. Mortici, C: A continued fraction approximation of the gamma function. J. Math. Anal. Appl. 402, 405-410 (2013)
Page 7 of 7