The faculty and the Stirling formula
The Stirling formula is a mathematical formula that can be used to calculate approximate values for large faculties . It is named after the Scottish mathematician James Stirling .
Basics
Relative deviation of the simple Stirling formula from the faculty as a function of n
The Stirling formula in its simplest form is an asymptotic formula
![n! \ sim {\ sqrt {2 \ pi n}} \; \ left ({\ frac {n} {\ mathrm {e}}} \ right) ^ {n}, \ qquad n \ to \ infty.](https://wikimedia.org/api/rest_v1/media/math/render/svg/1352b3100147ab60e4a973988f20d5a0511ffb4f)
For the individual elements of this formula see factorial (!), Square root (√), circle number (π) and Euler's number (e).
A derivation can be found in the article Saddle Point Approximation .
More precisely applies to :
![n> 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/27a6a5d982d54202a14f111cb8a49210501b2c96)
![{\ displaystyle 1 <\ mathrm {e} ^ {1 / (12n + 1)} <{\ frac {n!} {{\ sqrt {2 \ pi n}} \ cdot ({\ frac {n} {\ mathrm {e}}}) ^ {n}}} <\ mathrm {e} ^ {1 / (12n)} <1 + {\ frac {1} {11n}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/46a7a9c32e823bf0e4b414b79326bde3cd313b22)
In particular, the limit of the fraction for equals 1.
![n \ to \ infty](https://wikimedia.org/api/rest_v1/media/math/render/svg/a0d55d9b32f6fa8fab6a84ea444a6b5a24bb45e1)
The Stirling series for according to the Euler-MacLaurin empirical formula is
![\ ln (n!) = \ sum _ {i = 1} ^ {n} \ ln (i)](https://wikimedia.org/api/rest_v1/media/math/render/svg/43652eaffcce0c558c4a1c926f83663f01f5393d)
![{\ displaystyle \ ln (n!) \ simeq n \ ln (n) -n + {\ tfrac {1} {2}} \ ln (2 \ pi n) + {\ frac {1} {12n}} - { \ frac {1} {360n ^ {3}}} + \ cdots + {\ frac {B_ {2k}} {(2k-1) 2k}} \ cdot {\ frac {1} {n ^ {2k-1 }}} + \ cdots, \ quad n \ to \ infty}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a45df6e6da9e92ef951ea872472bd7dac2cdf46d)
where the -th denotes Bernoulli number . As an approximation, one only considers a finite number of terms. The error is in the order of magnitude of the first neglected link. Example: if you break off after the third term, the absolute error is less than . The series itself does not converge for solid , it is an asymptotic series .
![B_ {k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6a6457760e36cf45e1471e33bcc1536cb4802fb9)
![k](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40)
![1 / (12n)](https://wikimedia.org/api/rest_v1/media/math/render/svg/410dfb1f2324d0e0c86d16dd20bfec419392fec8)
![n](https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b)
For satisfies a member for a relative error less than one percent:
![{\ displaystyle n> 7 {,} 31 \ cdot 10 ^ {43}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ec262b0172f3a19d2fb7ae0dafb42d16281522b8)
![\ ln (n!) \ approx n \ cdot \ ln (n)](https://wikimedia.org/api/rest_v1/media/math/render/svg/622c619c4db793bc08eccd79a52ee4bdc59af87a)
For satisfy two members for a relative error less than 0.1 per cent:
![n> 751](https://wikimedia.org/api/rest_v1/media/math/render/svg/d5500a165d8a4fad84aa0cfa3e870d4a06b1edee)
![\ ln (n!) \ approx n \ cdot \ ln (n) -n](https://wikimedia.org/api/rest_v1/media/math/render/svg/e3b5af5cd4d322d56ca6aa96a81ab2527d14ae74)
For small , a simple formula for can be derived from the formula for four terms . With
![n](https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b)
![n!](https://wikimedia.org/api/rest_v1/media/math/render/svg/bae971720be3cc9b8d82f4cdac89cb89877514a6)
![{\ mathrm {e}} ^ {1 / (12n)} \ approx 1 + {\ frac {1} {12n}} \ approx {\ sqrt {1 + {\ frac {1} {6n}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a185ab1f66a9e5e0b2e987fd07fe870a328b73f2)
the approximation results
![n! \ approx {\ sqrt {2 \ pi n}} \; \ left ({\ frac {n} {\ mathrm {e}}} \ right) ^ {n} \; {\ mathrm {e}} ^ {1 / (12n)} \ approx {\ sqrt {2 \ pi n}} \; \ left ({\ frac {n} {\ mathrm {e}}} \ right) ^ {n} {\ sqrt {1 + {\ frac {1} {6n}}}} = {\ sqrt {{\ pi \ over 3} (6n + 1)}} \; \ left ({\ frac {n} {\ mathrm {e}} } \ right) ^ {n}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8c4e93645b0be413d10121784772b77b583dff29)
The error is (with minimal additional computing effort to calculate the first two terms) smaller than 3% for , smaller than 1% for and smaller than 0.1% for .
![n = 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/26819344e55f5e671c76c07c18eb4291fcec85ae)
![n> 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/27a6a5d982d54202a14f111cb8a49210501b2c96)
![n> 2](https://wikimedia.org/api/rest_v1/media/math/render/svg/44e71ac55b9fbf1e9f341b946cda63d61d3ef2cd)
Inserting it into the exponential function results in the asymptotic expansion :
![n!](https://wikimedia.org/api/rest_v1/media/math/render/svg/bae971720be3cc9b8d82f4cdac89cb89877514a6)
![{\ displaystyle n! \ simeq n ^ {n} \ cdot {\ sqrt {2 \ pi n}} \ cdot \ mathrm {e} ^ {- n + {\ frac {1} {12n}} - {\ frac { 1} {360n ^ {3}}} + \ cdots + {\ frac {B_ {2k}} {(2k-1) 2k}} \ cdot {\ frac {1} {n ^ {2k-1}}} + \ cdots}, \ quad n \ to \ infty}](https://wikimedia.org/api/rest_v1/media/math/render/svg/29054b14cabee4be67ad318e10c1460c6b0ef3c3)
and by inserting the Stirling series into the series of the exponential function:
![{\ displaystyle n! \ simeq n ^ {n} \ cdot {\ sqrt {2 \ pi n}} \, \ cdot \, \ mathrm {e} ^ {- n} \, \ cdot \, \ left (1 + {\ frac {1} {12n}} + {\ frac {1} {288n ^ {2}}} - {\ frac {139} {51840n ^ {3}}} - {\ frac {571} {2488320n ^ {4}}} + \ cdots + {\ frac {C_ {k}} {n ^ {k}}} + \ cdots \ right), \ quad n \ to \ infty}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e8af015571f749c454fff25311851bf0465a4169)
whereby the coefficients do not satisfy any simple law of formation.
![C_ {k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1a0887b56787ba96e79de2b9f5c6ff30aabad1c6)
Derivation of the first two terms
The formula is often used in statistical physics for the limiting case of large numbers of particles, as they occur in thermodynamic systems ( particle size range). For thermodynamic considerations it is mostly sufficient to consider the first two terms . This formula can be easily obtained by using only the first term of the Euler-MacLaurin formula :
![10 ^ {{23}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/48d016cc8b369146c9bdca3ef8551b0c18acd6fc)
![\ ln (N!) \ approx N \ ln (N) -N](https://wikimedia.org/api/rest_v1/media/math/render/svg/275b8079ec5bd5e29bb9af9939192ac0c2d17685)
![\ ln (N!) = \ sum _ {n = 1} ^ {N} \ ln (n) \ approx \ int _ {1} ^ {N} \ ln (x) \, \ mathrm {d} x = \ left [x \ ln (x) -x \ right] _ {1} ^ {N} = N \ ln (N) -N + 1 \ approx N \ ln (N) -N](https://wikimedia.org/api/rest_v1/media/math/render/svg/1064b5b9750cb6416c2eb6fcd4594e683724f3eb)
and is then used in this form:
-
Generalization: Stirling formula for the gamma function
For all true
![x> 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/80d24be5f0eb4a9173da6038badc8659546021d0)
-
,
where is a function that fulfills for all .
![\ mu](https://wikimedia.org/api/rest_v1/media/math/render/svg/9fd47b2a39f7a7856952afec1f1db72c67af6161)
![0 <\ mu (x) <1 / (12x)](https://wikimedia.org/api/rest_v1/media/math/render/svg/2c10d88b8f9b9f5881d4245806e6f17b644e208f)
![x> 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/80d24be5f0eb4a9173da6038badc8659546021d0)
For the individual elements of this formula see gamma function ( ), square root (√), circle number (π) and Euler's number (e).
![\Gamma](https://wikimedia.org/api/rest_v1/media/math/render/svg/4cfde86a3f7ec967af9955d0988592f0693d2b19)
The value of an approximation of according to the above formula with is always a bit too small for all . The relative error is, however, for less than 1% and for less than 0.1%.
![x> 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/80d24be5f0eb4a9173da6038badc8659546021d0)
![\ Gamma (x)](https://wikimedia.org/api/rest_v1/media/math/render/svg/ec077ba0bdbf87c0d66173bc4d98598fe582ac37)
![\ mu = 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/3753282c0ad2ea1e7d63f39425efd13c37da3169)
![{\ displaystyle x \ geq 9}](https://wikimedia.org/api/rest_v1/media/math/render/svg/db72c4020427cfc6e204ea6af671821c86b4f7c7)
![{\ displaystyle x \ geq 84}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d1c4aece04d9ac6cdf50cb75b601ea31cfbf7951)
It applies to everyone
-
,
which results in the approximation formulas of the previous section as a special case.
Applications
The Stirling formula is used wherever the exact values of a faculty are not important. Particularly when calculating the information of a message and when calculating the entropy of a statistical ensemble of subsystems, the Stirling formula results in great simplifications.
Example: Given a system with different subsystems, each of which can assume different states. It is also known that the state can be assumed with the probability . Subsystems must be in the state and it applies . The number of possible distributions of a system described in this way is then
![N](https://wikimedia.org/api/rest_v1/media/math/render/svg/f5e3890c981ae85503089652feb48b191b57aae3)
![m](https://wikimedia.org/api/rest_v1/media/math/render/svg/0a07d98bb302f3856cbabc47b2b9016692e3f7bc)
![i](https://wikimedia.org/api/rest_v1/media/math/render/svg/add78d8608ad86e54951b8c8bd6c8d8416533d20)
![\ omega_i](https://wikimedia.org/api/rest_v1/media/math/render/svg/e174c191a5ba3889c66597461ef260811cce0481)
![N_ {i}](https://wikimedia.org/api/rest_v1/media/math/render/svg/fef58cebf23adff9199f17325aefb5515fdca99d)
![i](https://wikimedia.org/api/rest_v1/media/math/render/svg/add78d8608ad86e54951b8c8bd6c8d8416533d20)
![N_ {i} / N = \ omega _ {i}](https://wikimedia.org/api/rest_v1/media/math/render/svg/08e575025ced41e7a67303694a6e6b8352a187ac)
![N! / (N_ {1}! \, N_ {2}! \, \ Ldots \, N_ {m}!)](https://wikimedia.org/api/rest_v1/media/math/render/svg/5361f217a6064d34106a14265daea93bb274fa74)
and for its entropy applies
![\ sigma](https://wikimedia.org/api/rest_v1/media/math/render/svg/59f59b7c3e6fdb1d0365a494b81fb9a696138c36)
![\ sigma = \ ln (N!) - \ ln (N_ {1}!) - \ ldots - \ ln (N_ {m}!).](https://wikimedia.org/api/rest_v1/media/math/render/svg/7f9fc54fdc9278109cafcb8f7dc0d0c8defa7c7f)
By means of the Stirling formula one can now simplify this formula
except for errors in the order ![O (\ ln (N))](https://wikimedia.org/api/rest_v1/media/math/render/svg/5fc6b4084c22f33bd8884a3b7043764f13444d24)
|
|
|
|
|
|
|
|
|
|
This results in the well-known formula for the entropy of each of the subsystems
![N](https://wikimedia.org/api/rest_v1/media/math/render/svg/f5e3890c981ae85503089652feb48b191b57aae3)
![\ sigma = - \ sum _ {{i = 1}} ^ {m} \ omega _ {i} \ ln (\ omega _ {i})](https://wikimedia.org/api/rest_v1/media/math/render/svg/e5042e3dd6f0bd4e1ea7af5a1741569488647f19)
The formula for the information content of an equally defined system is obtained in a similar way (except for a constant prefactor)
![I = - \ sum _ {{i = 1}} ^ {m} \ omega _ {i} \ log _ {2} {(\ omega _ {i})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/25634357850269a25458c8a2a5f1dab685dddccd)
See also
literature
Web links
Remarks
-
↑ This is equated with 1, i.e. the limit value for at position 0.
![0 ^ 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/106f0c4e1cbccbfcbb61001a8c17b8427c65366d)
-
↑ In the OEIS there are series for numerators and denominators of , together with comments and references, on Mathworld also formulas for the education law (all in English!) .
-
↑ G. Joos: Textbook of theoretical physics , 1956, p. 516