Skip to main content
Springer logoLink to Springer
. 2018 Mar 6;2018(1):56. doi: 10.1186/s13660-018-1646-6

An accurate approximation formula for gamma function

Zhen-Hang Yang 1,2, Jing-Feng Tian 1,
PMCID: PMC5840229  PMID: 29540975

Abstract

In this paper, we present a very accurate approximation for the gamma function:

Γ(x+1)2πx(xe)x(xsinh1x)x/2exp(73241x3(35x2+33))=W2(x)

as x, and we prove that the function xlnΓ(x+1)lnW2(x) is strictly decreasing and convex from (1,) onto (0,β), where

β=22,02522,032ln2πsinh10.00002407.

Keywords: Gamma function, Monotonicity, Convexity, Approximation

Introduction

The Stirling formula states that

n!2πnnnen 1.1

for nN. The gamma function Γ(x)=0tx1etdt for x>0 is a generalization of the factorial function n! and has important applications in various branches of mathematics; see, for example, [16] and the references cited therein.

There are many refinements for the Stirling formula; see, for example, Burnside’s [7], Gosper [8], Batir [9], Mortici [10]. Many authors pay attention to find various better approximations for the gamma function, for instance, Ramanujan [11, P. 339], Smith [12, Eq. (42)], [13], Mortici [14], Nemes [15, Corollary 4.1], Yang and Chu [16, Propositions 4 and 5], Chen [17].

More results involving the approximation formulas for the factorial or gamma function can be found in [16, 1827] and the references cited therein. Several nice inequalities between gamma function and the truncations of its asymptotic series can be found in [28, 29].

Now let us focus on the Windschitl approximation formula (see [12, Eq. (42)], [13]) defined by

Γ(x+1)2πx(xe)x(xsinh1x)x/2:=W0(x)as x. 1.2

As shown in [17], the rate of Windschitl’s approximation W0(x) converging to Γ(x+1) is like x5 as x, and it is faster on replacing W0(x) by

W1(x)=2πx(xe)x(xsinh1x+1810x6)x/2 1.3

(see [13]). These results show that W0(x) and W1(x) are excellent approximations for the gamma function.

In 2009, Alzer [30] proved that, for all x>0,

2πx(xe)x(xsinh1x)x/2(1+αx5)<Γ(x+1)=2πx(xe)x(xsinh1x)x/2(1+βx5) 1.4

with the best possible constants α=0 and β=1/1620. Lu, Song and Ma [31] extended Windschitl’s formula to

Γ(n+1)2πn(ne)n[nsinh(1n+a7n7+a9n9+a11n11+)]n/2

with a7=1/810,a9=67/42,525,a11=19/8505, . An explicit formula for determining the coefficients of nk (nN) was given in [32, Theorem 1] by Chen. Another asymptotic expansion

Γ(x+1)2πx(xe)x(xsinh1x)x/2+j=0rjxj,x 1.5

was presented in the same reference [32, Theorem 2].

Motivated by the above comments, the aim of this paper is to provide a more accurate Windschitl type approximation:

Γ(x+1)2πx(xe)x(xsinh1x)x/2exp(73241x3(35x2+33))=W2(x) 1.6

as x. Our main result is the following theorem.

Theorem 1

The function

f0(x)=lnΓ(x+1)ln2π(x+12)lnx+xx2ln(xsinh1x)73241x3(35x2+33)

is strictly decreasing and convex from (1,) onto (0,f0(1)), where

f0(1)=22,02522,032ln2πsinh10.00002407.

Lemmas

An important research subject in analyzing inequality is to convert an univariate into the monotonicity of functions [3335]. Since the function f0(x) contains gamma and hyperbolic functions, it is very hard to deal with its monotonicity and convexity by usual approaches. For this purpose, we need the following lemmas, which provide a new way to prove our result.

Lemma 1

The inequality

ψ(x+12)>xx4+22766x2+42372640x6+15544x4+329176x2+3754928

holds for x>0.

Proof

Let

g1(x)=ψ(x+12)xx4+22766x2+42372640x6+15544x4+329176x2+3754928.

Then by the recurrence formula [36, p. 260, (6.4.6)]

ψ(x+1)ψ(x)=1x2

we have

g1(x+1)g1(x)=ψ(x+32)(x+1)((x+1)4+22766(x+1)2+42372640)(x+1)6+15544(x+1)4+329176(x+1)2+3754928ψ(x+12)+x(x4+22766x2+42372640)x6+15544x4+329176x2+3754928=58,982,400(2x+1)2(4928x6+17,360x4+9212x2+375)1×(4928x6+29,568x5+91,280x4+168,000x3+187,292x2+117,432x+31,875)1<0.

It then follows that

g1(x)>g1(x+1)>>limng1(x+n)=0,

which proves the desired inequality, and the proof is done. □

Lemma 2

The inequalities

tsinht>116t2+7360t43115,120t6+127604,800t8733,421,440t10>0 2.1

hold for t(0,1].

Proof

It was proved in [29, Theorem 1] that, for integer n0, the double inequality

i=02n+12(22i11)B2i(2i)!t2i1<1sinht<i=02n2(22i11)B2i(2i)!t2i1 2.2

holds for x>0. Taking n=2 yields

1sinht>1t16t+7360t33115,120t5+127604,800t7733,421,440t9:=h(t)t,

which is equivalent to the first inequality of (2.1) for all t>0.

Since x(0,1], making a change of variable t2=1x(0,1] we obtain

h(t)=733,421,440x5+12,371119,750,400x4+85,24359,875,200x3+858,62359,875,200x2+15,950,191119,750,400x+14,556,79317,107,200>0,

which proves the second one, and the proof is complete. □

The following lemma offers a simple criterion to determine the sign of a class of special polynomial on given interval contained in (0,) without using Descartes’ rule of signs, which play an important role in studying certain special functions; see for example [37, 38]. A series version can be found in [39].

Lemma 3

([37, Lemma 7])

Let nN and mN{0} with n>m and let Pn(t) be a polynomial of degree n defined by

Pn(t)=i=m+1naitii=0maiti, 2.3

where an,am>0, ai0 for 0in1 with im. Then there is a unique number tm+1(0,) satisfying Pn(t)=0 such that Pn(t)<0 for t(0,tm+1) and Pn(t)>0 for t(tm+1,).

Consequently, for given t0>0, if Pn(t0)>0 then Pn(t)>0 for t(t0,) and if Pn(t0)<0 then Pn(t)<0 for t(0,t0).

Proof of Theorem 1

With the aid of the lemmas in Sect. 2, we can prove Theorem 1.

Proof of Theorem 1

Differentiation yields

f0(x)=ψ(x+1)12ln(xsinh1x)+12xcoth1xf0(x)=lnx12x12+7324175x2+99x4(35x2+33)2,f0′′(x)=ψ(x+1)+12x31sinh2(1/x)f0′′(x)=32x+12x27546125x4+6545x2+2178x5(35x2+33)3.

Since limxf0(x)=limxf0(x)=0, it suffices to prove f0′′(x)>0 for x1. Replacing x by (x+1/2) in Lemma 1 leads to

ψ(x+1)>730(2x+1)(165x4+330x3+815x2+650x+417)77x6+231x5+560x4+735x3+623x2+294x+60,

which indicates that

f0′′(x)>730(2x+1)(165x4+330x3+815x2+650x+417)77x6+231x5+560x4+735x3+623x2+294x+60+12x31sinh2(1/x)32x+12x27546125x4+6545x2+2178x5(35x2+33)3:=f01(1x).

Arranging gives

f01(t)=t2(tsinht)2+730t(t+2)(417t4+650t3+815t2+330t+165)60t6+294t5+623t4+735t3+560t2+231t+7732t+12t2754t72178t4+6545t2+6125(33t2+35)3,

where t=1/x(0,1). Applying the first inequality of (2.1) we have

f01(t)>t2(116t2+7360t43115,120t6+127604,800t8733,421,440t10)2+730t(t+2)(417t4+650t3+815t2+330t+165)60t6+294t5+623t4+735t3+560t2+231t+7732t+12t2754t72178t4+6545t2+6125(33t2+35)3=t11×p22(t)(33t2+35)3(60t6+294t5+623t4+735t3+560t2+231t+77),

where p22(t)=k=022aktk with a0=2,341,95527, a1=2,341,9559, a2=4,592,761,525,17741,057,280, a3=3,740,791,861,17713,685,760, a4=21,774,907,040,747615,859,200, a5=1,776,198,096,75751,321,600, a6=2,348,474,362,865,49159,122,483,200, a7=444,392,576,792,85119,707,494,400, a8=722,576,509,559,549344,881,152,000, a9=734,284,235,570,623229,920,768,000, a10=27,685,269,148,007,47774,494,328,832,000, a11=13,202,571,814,150,45724,831,442,944,000, a12=1,859,898,503,651,431585,312,583,680,000, a13=40,990,762,057,313,921682,864,680,960,000, a14=1,227,464,630,525,327573,606,332,006,400, a15=107,829,513,340,51719,510,419,456,000, a16=1,469,516,232,022,3394,780,052,766,720,000, a17=224,320,158,179492,687,360,000, a18=214,165,238,1376,437,781,504,000, a19=402,182,03911,943,936,000, a20=150,639,95350,164,531,200, a21=2,872,3311,194,393,600, a22=58,619119,439,360.

It remains to prove p22(t)=k=022aktk>0 for t(0,1]. Since ak>0 for k=0, 1, 2, 3, 8, 9, 12, 13, 14, 17, 18, 21, 22 and ak<0 for k=4, 6, 7, 10, 11, 15, 16, 19, 20, we have

p22(t)=k=022aktk=ak>0aktk+ak<0aktk>k=4,6,7,10,11,15,16,19,20aktk+k=03aktk:=p20(t).

Clearly, the coefficients of the polynomial p20(t) satisfy the conditions in Lemma 3, and

p20(1)=k=4,6,7,10,11,15,16,19,20(ak)k=03ak=1,135,768,202,621,781,774,9011,792,519,787,520,000<0.

It then follows that p20(t)>0 for t(0,1], and so is p22(t), which implies f01(t)>0 for t(0,1]. Consequently, f0′′(x)>0 for all x1. This completes the proof. □

As a direct consequence of Theorem 1, we immediately get the following.

Corollary 1

For nN, the double inequality

exp7324n3(35n2+33)<n!2πn(n/e)n(nsinhn1)n/2<λexp7324n3(35n2+33)

holds with the best constant

λ=expf0(1)=12πsinh1exp22,02522,0321.000024067.

Set

D0(y)=yln(1+y),y=7324x3(35x2+33).

Then it is easy to check that, for x>1,

dD0(y)dx=49324175x2+99x4(35x2+33)2(11,340x5+10,692x3+7)<0,d2D0(y)dx2=34354(18,191,250x9+37,110,150x7+24,992,550x5+6125x4+5,821,794x3+6545x2+2178)x5(35x2+33)3(11,340x5+10,692x3+7)2d2D0(y)dx2>0.

That is to say, xD0(y) is decreasing and convex on (1,), and so is the function f0(x):=f0(x)+D0(y) by Theorem 1.

Corollary 2

The function

f0(x)=lnΓ(x+1)ln2π(x+12)lnx+xx2ln(xsinh1x)ln(1+7324x3(35x2+33))

is strictly decreasing and convex from (1,) onto (0,f0(1)), where

f0(1)=1ln22,03922,032ln2πsinh10.00002412.

Remark 1

Corollary 2 offers another approximation formula

Γ(x+1)2πx(xe)x(xsinh1x)x/2(1+73241x3(35x2+33))=W2(x). 3.1

Also, for nN,

1+7324n3(35n2+33)<n!2πn(n/e)n(nsinhn1)n/2<λ(1+7324n3(35n2+33))

with the best constant

λ=expf0(1)=22,03222,039e2πsinh11.000024117.

Numerical comparisons

It is well known that an excellent approximation for the gamma function is fairly accurate but relatively simple. In this section, we list some known approximation formulas for the gamma function and compare them with W1(x) given by (1.3) and our new one W2(x) defined by (1.6).

It has been shown in [17] that, as x, Ramanujan’s [11, P. 339] approximation formula holds,

Γ(x+1)π(xe)x(8x3+4x2+x+130)1/6(1+O(1x4)):=R(x),

and Smith’s one [12, Eq. (42)],

Γ(x+12)2π(xe)x(2xtanh12x)x/2(1+O(1x5)):=S(x),

Nemes’ one [15, Corollary 4.1],

Γ(x+1)2πx(xe)x(1+112x21/10)x(1+O(1x5))=:N1(x),

and Chen’s one [17],

Γ(x+1)2πx(xe)x(1+112x3+24x/71/2)x2+53/210(1+O(1x7)):=C(x). 4.1

Moreover, it is easy to check that Nemes’ result [13] is another one,

Γ(x+1)2πx(xe)xexp(210x2+53360x(7x2+2))(1+O(1x7)):=N2(x), 4.2

and so are Yang and Chu’s [16, Propositions 4 and 5] ones,

Γ(x+12)=2π(xe)xexp(124xx2+7/120)(1+O(1x5)):=Y1(x),Γ(x+12)=2π(xe)xexp(124x+72880x1x2+31/98)(1+O(1x7)):=Y2(x),

and we have Windschitl one [13],

Γ(x+1)2πx(xe)x(xsinh1x+1810x6)x/2(1+O(1x7))=W1(x).

For our new ones W2(x) given in (1.6) and its counterpart W2(x) given in (3.1), we easily check that

limxlnΓ(x+1)lnW2(x)x9=limxlnΓ(x+1)lnW2(x)x9=8692,976,750,

which show that the rates of W2(x) and W2(x) converging to Γ(x+1) are both as x9.

From these, we see that our new Windschitl type approximation formulas W2(x) and W2(x) are best among those listed above, which can also be seen from Table 1.

Table 1.

Comparison among N2 (4.2), C (4.1), W1 (1.3) and W2 (1.6)

x |N2(x)Γ(x+1)Γ(x+1)| |C(x)Γ(x+1)Γ(x+1)| |W1(x)Γ(x+1)Γ(x+1)| |W2(x)Γ(x+1)Γ(x+1)|
1 1.114 × 10−4 1.398 × 10−4 1.832 × 10−4 2.407 × 10−5
2 1.900 × 10−6 2.222 × 10−6 2.668 × 10−6 2.308 × 10−7
5 4.353 × 10−9 4.956 × 10−9 5.743 × 10−9 1.249 × 10−10
10 3.609 × 10−11 4.088 × 10−11 4.710 × 10−11 2.785 × 10−13
20 2.864 × 10−13 3.240 × 10−13 3.727 × 10−13 5.634 × 10−16
50 4.713 × 10−16 5.330 × 10−16 6.129 × 10−16 1.492 × 10−19
100 3.684 × 10−18 4.166 × 10−18 4.791 × 10−18 2.918 × 10−22

Acknowledgements

The authors would like to express their sincere thanks to the editors and reviewers for their great efforts to improve this paper. This work was supported by the Fundamental Research Funds for the Central Universities (No. 2015ZD29) and the Higher School Science Research Funds of Hebei Province of China (No. Z2015137).

Authors’ contributions

All authors contributed equally to the writing of this paper. All authors read and approved the final manuscript.

Competing interests

The authors declare that they have no competing interests.

Footnotes

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Zhen-Hang Yang, Email: yzhkm@163.com.

Jing-Feng Tian, Email: tianjf@ncepu.edu.cn.

References

  • 1.Anderson G.D., Vamanamurthy M.K., Vuorinen M. Conformal Invariants, Inequalities, and Quasiconformal Maps. New York: Wiley; 1997. [Google Scholar]
  • 2.Anderson G.D., Vamanamurthy M.K., Vuorinen M. Topics in special functions II. Conform. Geom. Dyn. 2007;11:250–270. doi: 10.1090/S1088-4173-07-00168-3. [DOI] [Google Scholar]
  • 3.Wang M.K., Chu Y.M., Song Y.Q. Asymptotical formulas for Gaussian and generalized hypergeometric functions. Appl. Math. Comput. 2016;276:44–60. [Google Scholar]
  • 4. Wang, M.K., Li, Y.M., Chu, Y.M.: Inequalities and infinite product formula for Ramanujan generalized modular equation function. Ramanujan J. (2017). 10.1007/s11139-0176-9888-3
  • 5.Wang M.K., Chu Y.M., Jiang Y.P. Ramanujan’s cubic transformation inequalities for zero-balanced hypergeometric functions. Rocky Mt. J. Math. 2016;46(2):679–691. doi: 10.1216/RMJ-2016-46-2-679. [DOI] [Google Scholar]
  • 6.Wang M.K., Chu Y.M. Refinements of transformation inequalities for zero-balanced hypergeometric functions. Acta Math. Sci. Ser. B Engl. Ed. 2017;37(3):607–622. doi: 10.1016/S0252-9602(17)30026-7. [DOI] [Google Scholar]
  • 7.Burnside W. A rapidly convergent series for logN! Messenger Math. 1917;46:157–159. [Google Scholar]
  • 8.Gosper R.W. Decision procedure for indefinite hypergeometric summation. Proc. Natl. Acad. Sci. USA. 1978;75:40–42. doi: 10.1073/pnas.75.1.40. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Batir N. Sharp inequalities for factorial n. Proyecciones. 2008;27(1):97–102. doi: 10.4067/S0716-09172008000100006. [DOI] [Google Scholar]
  • 10.Mortici C. On the generalized Stirling formula. Creative Math. Inform. 2010;19(1):53–56. [Google Scholar]
  • 11.Ramanujan S. The Lost Notebook and Other Unpublished Papers. Berlin: Springer; 1988. [Google Scholar]
  • 12. Smith, W.D.: The gamma function revisited (2006). http://schule.bayernport.com/gamma/gamma05.pdf
  • 13.http://www.rskey.org/CMS/the-library/11
  • 14.Mortici C. A new fast asymptotic series for the gamma function. Ramanujan J. 2015;38(3):549–559. doi: 10.1007/s11139-014-9589-0. [DOI] [Google Scholar]
  • 15.Nemes G. New asymptotic expansion for the gamma function. Arch. Math. (Basel) 2010;95:161–169. doi: 10.1007/s00013-010-0146-9. [DOI] [Google Scholar]
  • 16.Yang Z.-H., Chu Y.-M. Asymptotic formulas for gamma function with applications. Appl. Math. Comput. 2015;270:665–680. [Google Scholar]
  • 17.Chen C.-P. A more accurate approximation for the gamma function. J. Number Theory. 2016;164:417–428. doi: 10.1016/j.jnt.2015.11.007. [DOI] [Google Scholar]
  • 18.Batir N. Inequalities for the gamma function. Arch. Math. 2008;91:554–563. doi: 10.1007/s00013-008-2856-9. [DOI] [Google Scholar]
  • 19.Mortici C. An ultimate extremely accurate formula for approximation of the factorial function. Arch. Math. 2009;93(1):37–45. doi: 10.1007/s00013-009-0008-5. [DOI] [Google Scholar]
  • 20.Mortici C. New sharp inequalities for approximating the factorial function and the digamma functions. Miskolc Math. Notes. 2010;11(1):79–86. [Google Scholar]
  • 21.Mortici C. Improved asymptotic formulas for the gamma function. Comput. Math. Appl. 2011;61:3364–3369. doi: 10.1016/j.camwa.2011.04.036. [DOI] [Google Scholar]
  • 22.Zhao J.-L., Guo B.-N., Qi F. A refinement of a double inequality for the gamma function. Publ. Math. (Debr.) 2012;80(3–4):333–342. doi: 10.5486/PMD.2012.5010. [DOI] [Google Scholar]
  • 23.Mortici C. Further improvements of some double inequalities for bounding the gamma function. Math. Comput. Model. 2013;57:1360–1363. doi: 10.1016/j.mcm.2012.11.020. [DOI] [Google Scholar]
  • 24.Qi F. Integral representations and complete monotonicity related to the remainder of Burnside’s formula for the gamma function. J. Comput. Appl. Math. 2014;268:155–167. doi: 10.1016/j.cam.2014.03.004. [DOI] [Google Scholar]
  • 25.Lu D. A new sharp approximation for the gamma function related to Burnside’s formula. Ramanujan J. 2014;35(1):121–129. doi: 10.1007/s11139-013-9534-7. [DOI] [Google Scholar]
  • 26.Lu D., Song L., Ma C. Some new asymptotic approximations of the gamma function based on Nemes’ formula, Ramanujan’s formula and Burnside’s formula. Appl. Math. Comput. 2015;253:1–7. [Google Scholar]
  • 27.Yang Z.-H., Tian J.F. Monotonicity and inequalities for the gamma function. J. Inequal. Appl. 2017;2017:317. doi: 10.1186/s13660-017-1591-9. [DOI] [Google Scholar]
  • 28.Alzer H. On some inequalities for the gamma and psi functions. Math. Comput. 1997;66(217):373–389. doi: 10.1090/S0025-5718-97-00807-7. [DOI] [Google Scholar]
  • 29.Yang Z.-H. Approximations for certain hyperbolic functions by partial sums of their Taylor series and completely monotonic functions related to gamma function. J. Math. Anal. Appl. 2016;441:549–564. doi: 10.1016/j.jmaa.2016.04.029. [DOI] [Google Scholar]
  • 30.Alzer H. Sharp upper and lower bounds for the gamma function. Proc. R. Soc. Edinb. 2009;139A:709–718. doi: 10.1017/S0308210508000644. [DOI] [Google Scholar]
  • 31.Lu D., Song L., Ma C. A generated approximation of the gamma function related to Windschitl’s formula. J. Number Theory. 2014;140:215–225. doi: 10.1016/j.jnt.2014.01.023. [DOI] [Google Scholar]
  • 32.Chen C.-P. Asymptotic expansions of the gamma function related to Windschitl’s formula. Appl. Math. Comput. 2014;245:174–180. [Google Scholar]
  • 33.Qi F., Cerone P., Dragomir S.S., Srivastava H.M. Alternative proofs for monotonic and logarithmically convex properties of one-parameter mean values. Appl. Math. Comput. 2009;208(1):129–133. [Google Scholar]
  • 34.Tian J.F., Ha M.H. Properties of generalized sharp Hölder’s inequalities. J. Math. Inequal. 2017;11(2):511–525. doi: 10.7153/jmi-11-42. [DOI] [Google Scholar]
  • 35.Tian J.F., Ha M.H. Properties and refinements of Aczél-type inequalities. J. Math. Inequal. 2018;12(1):175–189. [Google Scholar]
  • 36.Abramowttz M., Stegun I.A. Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables. New York: Dover; 1972. [Google Scholar]
  • 37.Yang Z.-H., Chu Y.-M., Tao X.-J. A double inequality for the trigamma function and its applications. Abstr. Appl. Anal. 2014;2014:702718. [Google Scholar]
  • 38.Yang Z.-H., Tian J. Monotonicity and sharp inequalities related to gamma function. J. Math. Inequal. 2018;12(1):1–22. [Google Scholar]
  • 39. Yang, Z.-H., Tian, J.: Convexity and monotonicity for the elliptic integrals of the first kind and applications. arXiv:1705.05703 [math.CA]

Articles from Journal of Inequalities and Applications are provided here courtesy of Springer

RESOURCES