Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Stirling's approximation

From Wikipedia, the free encyclopedia
Approximation for factorials

Comparison of Stirling's approximation (pink) with the factorial (blue)

Inmathematics,Stirling's approximation (orStirling's formula) is anasymptotic approximation forfactorials. It is a good approximation, leading to accurate results even for small values ofn{\displaystyle n}. It is named afterJames Stirling, though a related but less precise result was first stated byAbraham de Moivre.[1][2][3]

One way of stating the approximation involves thelogarithm of the factorial:lnn!=nlnnn+O(lnn),{\displaystyle \ln n!=n\ln n-n+O(\ln n),}where thebigO notation means that, for all sufficiently large values ofn{\displaystyle n}, the difference betweenlnn!{\displaystyle \ln n!} andnlnnn{\displaystyle n\ln n-n} will be at most proportional to the logarithm ofn{\displaystyle n}. In computer science applications such as theworst-case lower bound for comparison sorting, it is convenient to instead use thebinary logarithm, giving the equivalent formlog2n!=nlog2nnlog2e+O(log2n).{\displaystyle \log _{2}n!=n\log _{2}n-n\log _{2}e+O(\log _{2}n).} The error term in either base can be expressed more precisely as12log(2πn)+O(1n){\displaystyle {\tfrac {1}{2}}\log(2\pi n)+O({\tfrac {1}{n}})}, corresponding to an approximate formula for the factorial itself,n!2πn(ne)n.{\displaystyle n!\sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}.}Here the sign{\displaystyle \sim } means that the two quantities are asymptotic, that is, their ratio tends to 1 asn{\displaystyle n} tends to infinity.

History

[edit]

The formula was first discovered byAbraham de Moivre[2] in 1721 in the formn![constant]nn+12en.{\displaystyle n!\sim [{\rm {constant}}]\cdot n^{n+{\frac {1}{2}}}e^{-n}.}

De Moivre gave an approximate rational-number expression for the natural logarithm of the constant. Stirling's contribution in 1730 consisted of showing that the constant is precisely2π{\displaystyle {\sqrt {2\pi }}}.[3][4]

Derivation

[edit]

The simplest version of Stirling's formula isn!=2πn(ne)n(1+O(1n)).{\displaystyle n!={\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}\left(1+O\!\left({\frac {1}{n}}\right)\right).}It can be quickly obtained by approximating the sumlnn!=j=1nlnj{\displaystyle \ln n!=\sum _{j=1}^{n}\ln j}with anintegral:j=1nlnj1nlnxdx=nlnnn+1.{\displaystyle \sum _{j=1}^{n}\ln j\approx \int _{1}^{n}\ln x\,{\rm {d}}x=n\ln n-n+1.}

The full formula, together with precise estimates of its error, can be derived as follows. Instead of approximatingn!{\displaystyle n!}, one considers itsnatural logarithm, as this is aslowly varying function:lnn!=ln1+ln2++lnn.{\displaystyle \ln n!=\ln 1+\ln 2+\cdots +\ln n.}

The right-hand side of this equation minus12(ln1+lnn)=12lnn{\displaystyle {\tfrac {1}{2}}(\ln 1+\ln n)={\tfrac {1}{2}}\ln n}is the approximation by thetrapezoid rule of the integrallnn!12lnn1nlnxdx=nlnnn+1,{\displaystyle \ln n!-{\tfrac {1}{2}}\ln n\approx \int _{1}^{n}\ln x\,{\rm {d}}x=n\ln n-n+1,}

and the error in this approximation is given by theEuler–Maclaurin formula:lnn!12lnn=ln1+ln2+ln3++ln(n1)+12lnn=nlnnn+1+k=2m(1)kBkk(k1)(1nk11)+Rm,n,{\displaystyle {\begin{aligned}\ln n!-{\tfrac {1}{2}}\ln n&=\ln 1+\ln 2+\ln 3+\cdots +\ln(n-1)+{\tfrac {1}{2}}\ln n\\&=n\ln n-n+1+\sum _{k=2}^{m}{\frac {(-1)^{k}B_{k}}{k(k-1)}}\left({\frac {1}{n^{k-1}}}-1\right)+R_{m,n},\end{aligned}}}

whereBk{\displaystyle B_{k}} is aBernoulli number, andRm,n is the remainder term in the Euler–Maclaurin formula. Take limits to find thatlimn(lnn!nlnn+n12lnn)=1k=2m(1)kBkk(k1)+limnRm,n.{\displaystyle \lim _{n\to \infty }\left(\ln n!-n\ln n+n-{\tfrac {1}{2}}\ln n\right)=1-\sum _{k=2}^{m}{\frac {(-1)^{k}B_{k}}{k(k-1)}}+\lim _{n\to \infty }R_{m,n}.}

Denote this limit asy{\displaystyle y}. Because the remainderRm,n in the Euler–Maclaurin formula satisfiesRm,n=limnRm,n+O(1nm),{\displaystyle R_{m,n}=\lim _{n\to \infty }R_{m,n}+O\!\left({\frac {1}{n^{m}}}\right),}

wherebig-O notation is used, combining the equations above yields the approximation formula in its logarithmic form:lnn!=nln(ne)+12lnn+y+k=2m(1)kBkk(k1)nk1+O(1nm).{\displaystyle \ln n!=n\ln \left({\frac {n}{e}}\right)+{\tfrac {1}{2}}\ln n+y+\sum _{k=2}^{m}{\frac {(-1)^{k}B_{k}}{k(k-1)n^{k-1}}}+O\!\left({\frac {1}{n^{m}}}\right).}

Taking the exponential of both sides and choosing any positive integerm{\displaystyle m}, one obtains a formula involving an unknown quantityey{\displaystyle e^{y}}. Form = 1, the formula isn!=eyn(ne)n(1+O(1n)).{\displaystyle n!=e^{y}{\sqrt {n}}\left({\frac {n}{e}}\right)^{n}\left(1+O\!\left({\frac {1}{n}}\right)\right).}

The quantityey{\displaystyle e^{y}} can be found by taking the limit on both sides asn{\displaystyle n} tends to infinity and usingWallis' product, which shows thatey=2π{\displaystyle e^{y}={\sqrt {2\pi }}}. Therefore, one obtains Stirling's formula.

Alternative derivations

[edit]

An alternative formula forn!{\displaystyle n!} using thegamma function isn!=0xnexdx.{\displaystyle n!=\int _{0}^{\infty }x^{n}e^{-x}\,{\rm {d}}x.}(as can be seen by repeated integration by parts). Rewriting and changing variablesx =ny, one obtainsn!=0enlnxxdx=enlnnn0en(lnyy)dy.{\displaystyle n!=\int _{0}^{\infty }e^{n\ln x-x}\,{\rm {d}}x=e^{n\ln n}n\int _{0}^{\infty }e^{n(\ln y-y)}\,{\rm {d}}y.}ApplyingLaplace's method one has0en(lnyy)dy2πnen,{\displaystyle \int _{0}^{\infty }e^{n(\ln y-y)}\,{\rm {d}}y\sim {\sqrt {\frac {2\pi }{n}}}e^{-n},}which recovers Stirling's formula:n!enlnnn2πnen=2πn(ne)n.{\displaystyle n!\sim e^{n\ln n}n{\sqrt {\frac {2\pi }{n}}}e^{-n}={\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}.}

Higher orders

[edit]

Further corrections can also be obtained using Laplace's method. Stirling's formula to two orders isn!=2πn(ne)n(1+112n+O(1n2)).{\displaystyle n!={\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}\left(1+{\frac {1}{12n}}+O\!\left({\frac {1}{n^{2}}}\right)\right).}

From previous result, we know thatΓ(x)xxex{\displaystyle \Gamma (x)\sim x^{x}e^{-x}}, so we "peel off" this dominant term, then perform two changes of variables, to obtain:xxexΓ(x)=Rex(1+tet)dt{\displaystyle x^{-x}e^{x}\Gamma (x)=\int _{\mathbb {R} }e^{x(1+t-e^{t})}dt}To verify this:Rex(1+tet)dt=tlntex0tx1extdt=tt/xxxex0ettx1dt=xxexΓ(x){\displaystyle \int _{\mathbb {R} }e^{x(1+t-e^{t})}dt{\overset {t\mapsto \ln t}{=}}e^{x}\int _{0}^{\infty }t^{x-1}e^{-xt}dt{\overset {t\mapsto t/x}{=}}x^{-x}e^{x}\int _{0}^{\infty }e^{-t}t^{x-1}dt=x^{-x}e^{x}\Gamma (x)}.

Now the functiont1+tet{\displaystyle t\mapsto 1+t-e^{t}} is unimodal, with maximum value zero. Locally around zero, it looks liket2/2{\displaystyle -t^{2}/2}, which is why we are able to perform Laplace's method. In order to extend Laplace's method to higher orders, we perform another change of variables by1+tet=τ2/2{\displaystyle 1+t-e^{t}=-\tau ^{2}/2}. This equation cannot be solved in closed form, but it can be solved by serial expansion, which gives ust=ττ2/6+τ3/36+a4τ4+O(τ5){\displaystyle t=\tau -\tau ^{2}/6+\tau ^{3}/36+a_{4}\tau ^{4}+O(\tau ^{5})}. Now plug back to the equation to obtainxxexΓ(x)=Rexτ2/2(1τ/3+τ2/12+4a4τ3+O(τ4))dτ=2π(x1/2+x3/2/12)+O(x5/2){\displaystyle x^{-x}e^{x}\Gamma (x)=\int _{\mathbb {R} }e^{-x\tau ^{2}/2}(1-\tau /3+\tau ^{2}/12+4a_{4}\tau ^{3}+O(\tau ^{4}))d\tau ={\sqrt {2\pi }}(x^{-1/2}+x^{-3/2}/12)+O(x^{-5/2})}notice how we don't need to actually finda4{\displaystyle a_{4}}, since it is cancelled out by the integral. Higher orders can be achieved by computing more terms int=τ+{\displaystyle t=\tau +\cdots }, which can be obtained programmatically.[note 1]

Complex-analytic version

[edit]

A complex-analysis version of this method[5] is to consider1n!{\displaystyle {\frac {1}{n!}}} as aTaylor coefficient of the exponential functionez=n=0znn!{\displaystyle e^{z}=\sum _{n=0}^{\infty }{\frac {z^{n}}{n!}}}, computed byCauchy's integral formula as1n!=12πi|z|=rezzn+1dz.{\displaystyle {\frac {1}{n!}}={\frac {1}{2\pi i}}\oint \limits _{|z|=r}{\frac {e^{z}}{z^{n+1}}}\,\mathrm {d} z.}

This line integral can then be approximated using thesaddle-point method with an appropriate choice of contour radiusr=rn{\displaystyle r=r_{n}}. The dominant portion of the integral near the saddle point is then approximated by a real integral and Laplace's method, while the remaining portion of the integral can be bounded above to give an error term.

Using the Central Limit Theorem and the Poisson distribution

[edit]

An alternative version uses the fact that thePoisson distribution converges to anormal distribution by theCentral Limit Theorem.[6]

Since the Poisson distribution with parameterμ{\displaystyle \mu } converges to a normal distribution with meanμ{\displaystyle \mu } and varianceμ{\displaystyle \mu }, theirdensity functions will be approximately the same:

exp(μ)μxx!12πμexp(12(xμμ)2){\displaystyle {\frac {\exp(-\mu )\mu ^{x}}{x!}}\approx {\frac {1}{\sqrt {2\pi \mu }}}\exp \left(-{\frac {1}{2}}\left({\frac {x-\mu }{\sqrt {\mu }}}\right)^{2}\right)}

Evaluating this expression at the mean, at which the approximation is particularly accurate, simplifies this expression to:

exp(μ)μμμ!12πμ{\displaystyle {\frac {\exp(-\mu )\mu ^{\mu }}{\mu !}}\approx {\frac {1}{\sqrt {2\pi \mu }}}}

Taking logs then results in

μ+μlnμlnμ!12ln(2πμ){\displaystyle -\mu +\mu \ln \mu -\ln \mu !\approx -{\frac {1}{2}}\ln(2\pi \mu )}

which can easily be rearranged to give:

lnμ!μlnμμ+12ln(2πμ){\displaystyle \ln \mu !\approx \mu \ln \mu -\mu +{\frac {1}{2}}\ln(2\pi \mu )}

Evaluating atμ=n{\displaystyle \mu =n} gives the usual, more precise form of Stirling's approximation.

Speed of convergence and error estimates

[edit]
The relative error in a truncated Stirling series vs.n{\displaystyle n}, for 0 to 5 terms. The kinks in the curves represent points where the truncated series coincides withΓ(n + 1).

Stirling's formula is in fact the first approximation to the following series (now called theStirling series):[7]n!2πn(ne)n(1+112n+1288n213951840n35712488320n4+163879209018880n5).{\displaystyle n!\sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}\left(1+{\frac {1}{12n}}+{\frac {1}{288n^{2}}}-{\frac {139}{51840n^{3}}}-{\frac {571}{2488320n^{4}}}+{\frac {163879}{209018880n^{5}}}-\cdots \right).}

An explicit formula for the coefficients in this series was given by G. Nemes.[8] Further terms are listed in theOn-Line Encyclopedia of Integer Sequences asA001163 andA001164. The first graph in this section shows therelative error vs.n{\displaystyle n}, for 1 through all 5 terms listed above. (Bender and Orszag[9] p. 218) gives the asymptotic formula for the coefficients:A2j+1(1)j2(2j)!(2π)2(j+1){\displaystyle A_{2j+1}\sim {\frac {(-1)^{j}2(2j)!}{(2\pi )^{2(j+1)}}}}which shows that it grows superexponentially, and that by theratio test theradius of convergence is zero.

However, the representation obtained directly from the Euler–Maclaurin approximation, in which the correction term itself is the argument of the exponential function, converges much faster (needs half the number of correction terms for the same accuracy):n!2πn(ne)nexp(112n1360n3+11260n511680n7+11188n9).{\displaystyle n!\sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}\exp {\bigg (}{\frac {1}{12n}}-{\frac {1}{360n^{3}}}+{\frac {1}{1260n^{5}}}-{\frac {1}{1680n^{7}}}+{\frac {1}{1188n^{9}}}-\cdots {\bigg )}.}Thek{\displaystyle k}th coefficient (for the reciprocal of the(2k1){\displaystyle \left(2k-1\right)}th power ofn{\displaystyle n}) is directly calculated using Bernoulli numbers andck=B2k2k(2k1).{\displaystyle c_{k}={\tfrac {B_{2k}}{2k(2k-1)}}.}

The relative error in a truncated Stirling series vs. the number of terms used

Asn → ∞, the error in the truncated series is asymptotically equal to the first omitted term. This is an example of anasymptotic expansion. It is not aconvergent series; for anyparticular value ofn{\displaystyle n} there are only so many terms of the series that improve accuracy, after which accuracy worsens. This is shown in the next graph, which shows the relative error versus the number of terms in the series, for larger numbers of terms. More precisely, letSt (n) be the Stirling series tot{\displaystyle t} terms evaluated at n{\displaystyle n}. The graphs show|lnSt(n)n!|,{\displaystyle \left|\ln {\frac {S_{t}(n)}{n!}}\right|,}which, when small, is essentially the relative error.

Writing Stirling's series in the formlnn!nlnnn+12ln(2πn)+112n1360n3+11260n511680n7+,{\displaystyle \ln n!\sim n\ln n-n+{\tfrac {1}{2}}\ln(2\pi n)+{\frac {1}{12n}}-{\frac {1}{360n^{3}}}+{\frac {1}{1260n^{5}}}-{\frac {1}{1680n^{7}}}+\cdots ,}it is known that the error in truncating the series is always of the opposite sign and at most the same magnitude as the first omitted term.[citation needed]

Other bounds, due to Robbins,[10] valid for all positive integersn{\displaystyle n} are2πn(ne)ne112n+1<n!<2πn(ne)ne112n.{\displaystyle {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}e^{\frac {1}{12n+1}}<n!<{\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}e^{\frac {1}{12n}}.}This upper bound corresponds to stopping the above series forlnn!{\displaystyle \ln n!} after the1n{\displaystyle {\tfrac {1}{n}}} term.The lower bound is weaker than that obtained by stopping the series after the1n3{\displaystyle {\tfrac {1}{n^{3}}}} term. A looser version of this bound is thatn!ennn+12(2π,e]{\displaystyle {\frac {n!e^{n}}{n^{n+{\tfrac {1}{2}}}}}\in ({\sqrt {2\pi }},e]} for alln1{\displaystyle n\geq 1}.

Stirling's formula for the gamma function

[edit]

For all positive integers,n!=Γ(n+1),{\displaystyle n!=\Gamma (n+1),}whereΓ denotes thegamma function.

However, the gamma function, unlike the factorial, is more broadly defined for all complex numbers other than non-positive integers; nevertheless, Stirling's formula may still be applied. IfRe(z) > 0, thenlnΓ(z)=zlnzz+12ln2πz+02arctan(tz)e2πt1dt.{\displaystyle \ln \Gamma (z)=z\ln z-z+{\tfrac {1}{2}}\ln {\frac {2\pi }{z}}+\int _{0}^{\infty }{\frac {2\arctan \left({\frac {t}{z}}\right)}{e^{2\pi t}-1}}\,{\rm {d}}t.}

Repeated integration by parts giveslnΓ(z)zlnzz+12ln2πz+n=1N1B2n2n(2n1)z2n1=zlnzz+12ln2πz+112z1360z3+11260z5+,{\displaystyle {\begin{aligned}\ln \Gamma (z)\sim z\ln z-z+{\tfrac {1}{2}}\ln {\frac {2\pi }{z}}+\sum _{n=1}^{N-1}{\frac {B_{2n}}{2n(2n-1)z^{2n-1}}}\\=z\ln z-z+{\tfrac {1}{2}}\ln {\frac {2\pi }{z}}+{\frac {1}{12z}}-{\frac {1}{360z^{3}}}+{\frac {1}{1260z^{5}}}+\dots ,\end{aligned}}}

whereBn{\displaystyle B_{n}} is then{\displaystyle n}thBernoulli number (note that the limit of the sum asN{\displaystyle N\to \infty } is not convergent, so this formula is just anasymptotic expansion). The formula is valid forz{\displaystyle z} large enough in absolute value, when|arg(z)| < π −ε, whereε is positive, with an error term ofO(z−2N+ 1). The corresponding approximation may now be written:Γ(z)=2πz(ze)z(1+O(1z)).{\displaystyle \Gamma (z)={\sqrt {\frac {2\pi }{z}}}{\left({\frac {z}{e}}\right)}^{z}\left(1+O\left({\frac {1}{z}}\right)\right).}

where the expansion is identical to that of Stirling's series above forn!{\displaystyle n!}, except thatn{\displaystyle n} is replaced withz − 1.[11]

A further application of this asymptotic expansion is for complex argumentz with constantRe(z). See for example the Stirling formula applied inIm(z) =t of theRiemann–Siegel theta function on the straight line1/4 +it.

A convergent version of Stirling's formula

[edit]

Thomas Bayes showed, in a letter toJohn Canton published by theRoyal Society in 1763, that Stirling's formula did not give aconvergent series.[12] Obtaining a convergent version of Stirling's formula entails evaluatingBinet's formula:02arctan(tx)e2πt1dt=lnΓ(x)xlnx+x12ln2πx.{\displaystyle \int _{0}^{\infty }{\frac {2\arctan \left({\frac {t}{x}}\right)}{e^{2\pi t}-1}}\,{\rm {d}}t=\ln \Gamma (x)-x\ln x+x-{\tfrac {1}{2}}\ln {\frac {2\pi }{x}}.}

One way to do this is by means of a convergent series of invertedrising factorials. Ifzn¯=z(z+1)(z+n1),{\displaystyle z^{\bar {n}}=z(z+1)\cdots (z+n-1),}then02arctan(tx)e2πt1dt=n=1cn(x+1)n¯,{\displaystyle \int _{0}^{\infty }{\frac {2\arctan \left({\frac {t}{x}}\right)}{e^{2\pi t}-1}}\,{\rm {d}}t=\sum _{n=1}^{\infty }{\frac {c_{n}}{(x+1)^{\bar {n}}}},}wherecn=1n01xn¯(x12)dx=12nk=1nk|s(n,k)|(k+1)(k+2),{\displaystyle c_{n}={\frac {1}{n}}\int _{0}^{1}x^{\bar {n}}\left(x-{\tfrac {1}{2}}\right)\,{\rm {d}}x={\frac {1}{2n}}\sum _{k=1}^{n}{\frac {k|s(n,k)|}{(k+1)(k+2)}},}wheres(nk) denotes theStirling numbers of the first kind. From this one obtains a version of Stirling's serieslnΓ(x)=xlnxx+12ln2πx+112(x+1)+112(x+1)(x+2)+59360(x+1)(x+2)(x+3)+2960(x+1)(x+2)(x+3)(x+4)+,{\displaystyle {\begin{aligned}\ln \Gamma (x)&=x\ln x-x+{\tfrac {1}{2}}\ln {\frac {2\pi }{x}}+{\frac {1}{12(x+1)}}+{\frac {1}{12(x+1)(x+2)}}\\&\quad +{\frac {59}{360(x+1)(x+2)(x+3)}}+{\frac {29}{60(x+1)(x+2)(x+3)(x+4)}}+\cdots ,\end{aligned}}}which converges whenRe(x) > 0. Stirling's formula may also be given in convergent form as[13]Γ(x)=2πxx12ex+μ(x){\displaystyle \Gamma (x)={\sqrt {2\pi }}x^{x-{\frac {1}{2}}}e^{-x+\mu (x)}}whereμ(x)=n=0((x+n+12)ln(1+1x+n)1).{\displaystyle \mu \left(x\right)=\sum _{n=0}^{\infty }\left(\left(x+n+{\frac {1}{2}}\right)\ln \left(1+{\frac {1}{x+n}}\right)-1\right).}

Versions suitable for calculators

[edit]

The approximationΓ(z)2πz(zezsinh1z+1810z6)z{\displaystyle \Gamma (z)\approx {\sqrt {\frac {2\pi }{z}}}\left({\frac {z}{e}}{\sqrt {z\sinh {\frac {1}{z}}+{\frac {1}{810z^{6}}}}}\right)^{z}}and its equivalent form2lnΓ(z)ln(2π)lnz+z(2lnz+ln(zsinh1z+1810z6)2){\displaystyle 2\ln \Gamma (z)\approx \ln(2\pi )-\ln z+z\left(2\ln z+\ln \left(z\sinh {\frac {1}{z}}+{\frac {1}{810z^{6}}}\right)-2\right)}can be obtained by rearranging Stirling's extended formula and observing a coincidence between the resultantpower series and theTaylor series expansion of thehyperbolic sine function. This approximation is good to more than 8 decimal digits forz with a real part greater than 8. Robert H. Windschitl suggested it in 2002 for computing the gamma function with fair accuracy on calculators with limited program or register memory.[14]

Gergő Nemes proposed in 2007 an approximation which gives the same number of exact digits as the Windschitl approximation but is much simpler:[15]Γ(z)2πz(1e(z+112z110z))z,{\displaystyle \Gamma (z)\approx {\sqrt {\frac {2\pi }{z}}}\left({\frac {1}{e}}\left(z+{\frac {1}{12z-{\frac {1}{10z}}}}\right)\right)^{z},}or equivalently,lnΓ(z)12(ln(2π)lnz)+z(ln(z+112z110z)1).{\displaystyle \ln \Gamma (z)\approx {\tfrac {1}{2}}\left(\ln(2\pi )-\ln z\right)+z\left(\ln \left(z+{\frac {1}{12z-{\frac {1}{10z}}}}\right)-1\right).}

An alternative approximation for the gamma function stated bySrinivasa Ramanujan inRamanujan's lost notebook[16] isΓ(1+x)π(xe)x(8x3+4x2+x+130)16{\displaystyle \Gamma (1+x)\approx {\sqrt {\pi }}\left({\frac {x}{e}}\right)^{x}\left(8x^{3}+4x^{2}+x+{\frac {1}{30}}\right)^{\frac {1}{6}}}forx ≥ 0. The equivalent approximation forlnn! has an asymptotic error of1/1400n3 and is given bylnn!nlnnn+16ln(8n3+4n2+n+130)+12lnπ.{\displaystyle \ln n!\approx n\ln n-n+{\tfrac {1}{6}}\ln(8n^{3}+4n^{2}+n+{\tfrac {1}{30}})+{\tfrac {1}{2}}\ln \pi .}

The approximation may be made precise by giving paired upper and lower bounds; one such inequality is[17][18][19][20]π(xe)x(8x3+4x2+x+1100)1/6<Γ(1+x)<π(xe)x(8x3+4x2+x+130)1/6.{\displaystyle {\sqrt {\pi }}\left({\frac {x}{e}}\right)^{x}\left(8x^{3}+4x^{2}+x+{\frac {1}{100}}\right)^{1/6}<\Gamma (1+x)<{\sqrt {\pi }}\left({\frac {x}{e}}\right)^{x}\left(8x^{3}+4x^{2}+x+{\frac {1}{30}}\right)^{1/6}.}

See also

[edit]

References

[edit]
  1. ^Dutka, Jacques (1991), "The early history of the factorial function",Archive for History of Exact Sciences,43 (3):225–249,doi:10.1007/BF00389433,S2CID 122237769
  2. ^abLe Cam, L. (1986), "The central limit theorem around 1935",Statistical Science,1 (1):78–96,doi:10.1214/ss/1177013818,JSTOR 2245503,MR 0833276; see p. 81, "The result, obtained using a formula originally proved by de Moivre but now called Stirling's formula, occurs in his 'Doctrine of Chances' of 1733."
  3. ^abPearson, Karl (1924), "Historical note on the origin of the normal curve of errors",Biometrika,16 (3/4): 402–404 [p. 403],doi:10.2307/2331714,JSTOR 2331714,I consider that the fact that Stirling showed that De Moivre's arithmetical constant was2π{\displaystyle {\sqrt {2\pi }}} does not entitle him to claim the theorem, [...]
  4. ^Methodus Differentialis: Sive Tractatus de Summatione et Interpolatione Serierum Infinitarum, Jacob Stirling, London, 1730
  5. ^Flajolet, Philippe; Sedgewick, Robert (2009),Analytic Combinatorics, Cambridge, UK: Cambridge University Press, p. 555,doi:10.1017/CBO9780511801655,ISBN 978-0-521-89806-5,MR 2483235,S2CID 27509971
  6. ^MacKay, David J. C. (2019),Information theory, inference, and learning algorithms (22nd printing ed.), Cambridge: Cambridge University Press,ISBN 978-0-521-64298-9
  7. ^Olver, F. W. J.; Olde Daalhuis, A. B.; Lozier, D. W.; Schneider, B. I.; Boisvert, R. F.; Clark, C. W.; Miller, B. R. & Saunders, B. V.,"5.11 Gamma function properties: Asymptotic Expansions",NIST Digital Library of Mathematical Functions, Release 1.0.13 of 2016-09-16
  8. ^Nemes, Gergő (2010), "On the coefficients of the asymptotic expansion ofn!{\displaystyle n!}",Journal of Integer Sequences,13 (6): 5
  9. ^Bender, Carl M.; Orszag, Steven A. (2009),Advanced mathematical methods for scientists and engineers. 1: Asymptotic methods and perturbation theory (Nachdr. ed.), New York, NY: Springer,ISBN 978-0-387-98931-0
  10. ^Robbins, Herbert (1955), "A Remark on Stirling's Formula",The American Mathematical Monthly,62 (1):26–29,doi:10.2307/2308012,JSTOR 2308012
  11. ^Spiegel, M. R. (1999),Mathematical handbook of formulas and tables, McGraw-Hill, p. 148
  12. ^Bayes, Thomas (24 November 1763),"A letter from the late Reverend Mr. Thomas Bayes, F. R. S. to John Canton, M. A. and F. R. S."(PDF),Philosophical Transactions,53: 269,Bibcode:1763RSPT...53..269B,archived(PDF) from the original on 2012-01-28, retrieved2012-03-01
  13. ^Artin, Emil (2015),The Gamma Function, Dover, p. 24
  14. ^Toth, V. T.Programmable Calculators: Calculators and the Gamma Function (2006)Archived 2005-12-31 at theWayback Machine.
  15. ^Nemes, Gergő (2010), "New asymptotic expansion for the Gamma function",Archiv der Mathematik,95 (2):161–169,doi:10.1007/s00013-010-0146-9,S2CID 121820640
  16. ^Ramanujan, Srinivasa (14 August 1920),Lost Notebook and Other Unpublished Papers, p. 339 – via Internet Archive
  17. ^Karatsuba, Ekatherina A. (2001), "On the asymptotic representation of the Euler gamma function by Ramanujan",Journal of Computational and Applied Mathematics,135 (2):225–240,Bibcode:2001JCoAM.135..225K,doi:10.1016/S0377-0427(00)00586-0,MR 1850542
  18. ^Mortici, Cristinel (2011), "Ramanujan's estimate for the gamma function via monotonicity arguments",Ramanujan J.,25 (2):149–154,doi:10.1007/s11139-010-9265-y,S2CID 119530041
  19. ^Mortici, Cristinel (2011), "Improved asymptotic formulas for the gamma function",Comput. Math. Appl.,61 (11):3364–3369,doi:10.1016/j.camwa.2011.04.036.
  20. ^Mortici, Cristinel (2011), "On Ramanujan's large argument formula for the gamma function",Ramanujan J.,26 (2):185–192,doi:10.1007/s11139-010-9281-y,S2CID 120371952.

Further reading

[edit]
  1. ^For example, a program in Mathematica:
    series=tau-tau^2/6+tau^3/36+tau^4*a+tau^5*b;(*pick the right a,b to make the series equal 0 at higher orders*)Series[tau^2/2+1+t-Exp[t]/.t->series,{tau,0,8}](*now do the integral*)integral=Integrate[Exp[-x*tau^2/2]*D[series/.a->0/.b->0,tau],{tau,-Infinity,Infinity}];Simplify[integral/Sqrt[2*Pi]*Sqrt[x]]

External links

[edit]
Wikimedia Commons has media related toStirling's approximation.
Precalculus
Limits
Differential calculus
Integral calculus
Vector calculus
Multivariable calculus
Sequences and series
Special functions
and numbers
History of calculus
Lists
Integrals
Miscellaneous topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Stirling%27s_approximation&oldid=1337447650"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp