Stirling's approximation

Stirling's approximation   (Redirected from Stirling's theorem) Jump to navigation Jump to search Comparison of Stirling's approximation with the factorial In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a good approximation, leading to accurate results even for small values of {displaystyle n} . It is named after James Stirling, though a related but less precise result was first stated by Abraham de Moivre.[1][2][3] The version of the formula typically used in applications is {displaystyle ln(n!)=nln n-n+Theta (ln n)} (in Big Theta notation, as {displaystyle nto infty } ), or, by changing the base of the logarithm (for instance in the worst-case lower bound for comparison sorting), {displaystyle log _{2}(n!)=nlog _{2}n-nlog _{2}e+Theta (log _{2}n).} Specifying the constant in the O(ln n) error term gives 1 / 2 ln(2πn), yielding the more precise formula: {displaystyle n!sim {sqrt {2pi n}}left({frac {n}{e}}right)^{n},} where the sign ~ means that the two quantities are asymptotic: their ratio tends to 1 as {displaystyle n} tends to infinity. The following version of the bound holds for all {displaystyle ngeq 1} , rather than only asymptotically: {displaystyle {sqrt {2pi n}} left({frac {n}{e}}right)^{n}e^{frac {1}{12n+1}} 0, then {displaystyle ln Gamma (z)=zln z-z+{tfrac {1}{2}}ln {frac {2pi }{z}}+int _{0}^{infty }{frac {2arctan left({frac {t}{z}}right)}{e^{2pi t}-1}},{rm {d}}t.} Repeated integration by parts gives {displaystyle ln Gamma (z)sim zln z-z+{tfrac {1}{2}}ln {frac {2pi }{z}}+sum _{n=1}^{N-1}{frac {B_{2n}}{2n(2n-1)z^{2n-1}}},} where {displaystyle B_{n}} is the {displaystyle n} th Bernoulli number (note that the limit of the sum as {displaystyle Nto infty } is not convergent, so this formula is just an asymptotic expansion). The formula is valid for {displaystyle z} large enough in absolute value, when |arg(z)| < π − ε, where ε is positive, with an error term of O(z−2N+ 1). The corresponding approximation may now be written: {displaystyle Gamma (z)={sqrt {frac {2pi }{z}}},{left({frac {z}{e}}right)}^{z}left(1+Oleft({frac {1}{z}}right)right).} where the expansion is identical to that of Stirling's series above for {displaystyle n!} , except that {displaystyle n} is replaced with z − 1.[8] A further application of this asymptotic expansion is for complex argument z with constant Re(z). See for example the Stirling formula applied in Im(z) = t of the Riemann–Siegel theta function on the straight line 1 / 4 + it. Error bounds For any positive integer {displaystyle n} , the following notation is introduced: {displaystyle ln Gamma (z)=zln z-z+{tfrac {1}{2}}ln {frac {2pi }{z}}+sum limits _{n=1}^{N-1}{frac {B_{2n}}{2nleft({2n-1}right)z^{2n-1}}}+R_{N}(z)} and {displaystyle Gamma (z)={sqrt {frac {2pi }{z}}}left({frac {z}{e}}right)^{z}left({sum limits _{n=0}^{N-1}{frac {a_{n}}{z^{n}}}+{widetilde {R}}_{N}(z)}right).} Then[9][10] {displaystyle {begin{aligned}|R_{N}(z)|&leq {frac {|B_{2N}|}{2N(2N-1)|z|^{2N-1}}}{begin{cases}1&{text{ if }}|arg z|leq {frac {pi }{4}},\|csc(arg z)|&{text{ if }}{frac {pi }{4}}<|arg z|<{frac {pi }{2}},\sec ^{2N}left({tfrac {arg z}{2}}right)&{text{ if }}|arg z| 0.

Versions suitable for calculators The approximation {displaystyle Gamma (z)approx {sqrt {frac {2pi }{z}}}left({frac {z}{e}}{sqrt {zsinh {frac {1}{z}}+{frac {1}{810z^{6}}}}}right)^{z}} and its equivalent form {displaystyle 2ln Gamma (z)approx ln(2pi )-ln z+zleft(2ln z+ln left(zsinh {frac {1}{z}}+{frac {1}{810z^{6}}}right)-2right)} can be obtained by rearranging Stirling's extended formula and observing a coincidence between the resultant power series and the Taylor series expansion of the hyperbolic sine function. This approximation is good to more than 8 decimal digits for z 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.[12] Gergő Nemes proposed in 2007 an approximation which gives the same number of exact digits as the Windschitl approximation but is much simpler:[13] {displaystyle Gamma (z)approx {sqrt {frac {2pi }{z}}}left({frac {1}{e}}left(z+{frac {1}{12z-{frac {1}{10z}}}}right)right)^{z},} or equivalently, {displaystyle ln Gamma (z)approx {tfrac {1}{2}}left(ln(2pi )-ln zright)+zleft(ln left(z+{frac {1}{12z-{frac {1}{10z}}}}right)-1right).} An alternative approximation for the gamma function stated by Srinivasa Ramanujan (Ramanujan 1988[clarification needed]) is {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}}} for x ≥ 0. The equivalent approximation for ln n! has an asymptotic error of 1 / 1400n3 and is given by {displaystyle ln n!approx nln 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[14][15][16][17] {displaystyle {sqrt {pi }}left({frac {x}{e}}right)^{x}left(8x^{3}+4x^{2}+x+{frac {1}{100}}right)^{1/6}

Si quieres conocer otros artículos parecidos a Stirling's approximation puedes visitar la categoría Analytic number theory.

Deja una respuesta

Tu dirección de correo electrónico no será publicada.

Subir

Utilizamos cookies propias y de terceros para mejorar la experiencia de usuario Más información