|
In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a very powerful approximation, leading to accurate results even for small values of ''n''. It is named after James Stirling, though it was first stated by Abraham de Moivre.〔 〕〔.〕 The formula as typically used in applications is : (in big O notation). The next term in the ''O''(ln(''n'')) is (1/2)ln(2π''n''); a more precise variant of the formula is therefore : It is also possible to give a version of Stirling's formula with bounds valid for all positive integers ''n'', rather than asymptotics: one has : for all positive integers ''n''. Thus the ratio is always between and . As an asymptotic formula, Stirling's approximation has the property that the ratio : approaches 1 as ''n'' grows to infinity. == Derivation == The formula, together with precise estimates of its error, can be derived as follows. Instead of approximating ''n''!, one considers its natural logarithm as this is a slowly varying function: : The right-hand side of this equation minus : is the approximation by the trapezoid rule of the integral : and the error in this approximation is given by the Euler–Maclaurin formula: : where ''B''''k'' is a Bernoulli number and ''R''''m'',''n'' is the remainder term in the Euler–Maclaurin formula. Take limits to find that : Denote this limit by ''y''. Because the remainder ''R''''m'',''n'' in the Euler–Maclaurin formula satisfies : where we use Big-O notation, combining the equations above yields the approximation formula in its logarithmic form: : Taking the exponential of both sides, and choosing any positive integer ''m'', we get a formula involving an unknown quantity ''e''''y''. For ''m'' = 1, the formula is : The quantity ''e''''y'' can be found by taking the limit on both sides as ''n'' tends to infinity and using Wallis' product, which shows that . Therefore, we get Stirling's formula: : The formula may also be obtained by repeated integration by parts, and the leading term can be found through Laplace's method. Stirling's formula, without the factor that is often irrelevant in applications, can be quickly obtained by approximating the sum : with an integral: : 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Stirling's approximation」の詳細全文を読む スポンサード リンク
|