STIRLING’S FORMULA
11. STIRLING’S FORMULA
Formulas involving n! or Γ(p) are not convenient to simplify algebraically or to differentiate. Here is an approximate formula for the factorial or Γ function known as Stirling’s formula which can be used to simplify formulas involving factorials:
(11.1) n! ∼ n p e −n √ 2πn
or Γ(p + 1) ∼ p e −p 2πp.
Stirling’s formula
The sign ∼ (read “is asymptotic to”) means that the ratio of the two sides
n! n −n n √ e 2πn
tends to 1 as n → ∞. Thus we get better approximations to n! as n becomes large. Actually the absolute error (difference between the Stirling approximation and the correct value) increases, but the relative error (ratio of the error to the value of n!) tends to zero as n increases. To get some idea of how this formula arises, we outline what could, with a little more detail, be a derivation of it. (For more detail, consult advanced calculus books.) Start with
(11.2) Γ(p + 1) = p ! =
x p e −x dx =
e p ln x−x dx.
Substitute a new variable y such that
x=p+y √ p.
Section 11 Stirling’s Formula 553
Then
√ dx = p dy,
√ x = 0 corresponds to y = − p,
and (11.2) becomes
p!=
√ e p ln(p+y√p )−p−y p − p dy. p
For large p, the logarithm can be expanded in the following power series:
y y 2 (11.4)
ln(p + y p ) = ln p + ln 1+ √
= ln p +
√ +···. p
2p Substituting (11.4) into (11.3), we get
p!∼ 2 e p ln p+y√p−(y /2)−p−y √ p √
The first integral is easily shown to be 2π (Problem 9.4). The second integral tends to zero as p → ∞, and we have
p! ∼ p p e −p 2πp
which is (11.1). With more work, it is possible to find an asymptotic expansion for Γ(p + 1):
288p 2 +··· . This is another example of an asymptotic series which is divergent as an infinite
series; however, the first term alone (Stirling’s formula) is a good approximation when p is large, and the second term can be used to estimate the relative error (Problem 1).
PROBLEMS, SECTION 11
1. Use the term 1/(12p) in (11.5) to show that the error in Stirling’s formula (11.1) is < 10% for p > 1; < 1% for p > 10; < 0.1% for p > 100; < 0.01% for p > 1000.
2. (a) To see the results in Problem 1 graphically, computer plot the percentage error in Stirling’s formula as a function of p for values of p from 1 to 1000. Make separate plots, say for p = 1 to 10, 10 to 100, 100 to 1000, to make it easier to read values from your plots.
(b) Repeat part (a) for the percentage error in (11.5) using two terms of the asymp- totic series, that is, Stirling’s formula times [1 + 1/(12p)].
554 Special Functions Chapter 11
3. In statistical mechanics, we frequently use the approximation ln N ! = N ln N − N, where N is of the order of Avogadro’s number. Write out ln N ! using Stirling’s
formula, compute the approximate value of each term for N = 10 23 , and so justify this commonly used approximation.
4. Use Stirling’s formula to evaluate lim (2n)! n n→∞
2 2n (n!) 2
Γ(n + 3
5. Use Stirling’s formula to evaluate lim √
n→∞
n Γ(n + 1)
“ Use equations (3.4) and (11.5) to show that Γ(p) ∼ p ” p2π/p 1+ 1 12p +··· . 7. The function ψ(p) = d dp ln Γ(p) is called the digamma function, and the polygamma
6. − p e p
d functions are defined by ψ n (p) = dp n ψ(p). [Warning: Some authors define ψ(p) as d ln p! = d
dp ln Γ(p + 1).] (a)
dp
Show that ψ(p + 1) = ψ(p) + 1 p . Hint: See (3.4).
(b) 1 Use Problem 6 to obtain ψ(p) ∼ ln p − 1
2p − 12p 2 · · ·.
8. Sketch or computer plot a graph of y = ln x for x > 0. Show that ln n! is between the R n+1 R n values of the integrals 2 ln x dx and 1 ln x dx. (Hint: ln n! = ln 1+ln 2+ln 3+· · · is the sum of the areas of rectangles of width 1 and height up to the ln x curve at x = 1, 2, 3, · · ·.) By considering the values of the two integrals for very large n as in Problem 3, show that ln n! = n ln n − n approximately for large n.
9. The following expression occurs in statistical mechanics:
n!
P=
p np+u q nq−u .
(np + u)! (nq − u)!
Use Stirling’s formula to show that
1 npx nqy
∼x
p2πnpqxy,
where x = 1 + np ,y=1−
, and p + q = 1. Hint: Show that
nq
(np) np+u (nq) nq−u =n n p np+u q nq−u
and divide numerator and denominator of P by this expression. 10. Use Stirling’s formula to find lim n→∞ (n!) 1/n /n.
Parts
» CONVERGENCE TESTS FOR SERIES OF POSITIVE TERMS; ABSOLUTE CONVERGENCE
» CONDITIONALLY CONVERGENT SERIES
» POWER SERIES; INTERVAL OF CONVERGENCE
» EXPANDING FUNCTIONS IN POWER SERIES
» TECHNIQUES FOR OBTAINING POWER SERIES EXPANSIONS
» ACCURACY OF SERIES APPROXIMATIONS
» COMPLEX POWER SERIES; DISK OF CONVERGENCE
» ELEMENTARY FUNCTIONS OF COMPLEX NUMBERS
» POWERS AND ROOTS OF COMPLEX NUMBERS
» THE EXPONENTIAL AND TRIGONOMETRIC FUNCTIONS
» LINEAR COMBINATIONS, LINEAR FUNCTIONS, LINEAR OPERATORS
» LINEAR DEPENDENCE AND INDEPENDENCE
» SPECIAL MATRICES AND FORMULAS
» EIGENVALUES AND EIGENVECTORS; DIAGONALIZING MATRICES
» APPLICATIONS OF DIAGONALIZATION
» A BRIEF INTRODUCTION TO GROUPS
» POWER SERIES IN TWO VARIABLES
» APPROXIMATIONS USING DIFFERENTIALS
» CHAIN RULE OR DIFFERENTIATING A FUNCTION OF A FUNCTION
» APPLICATION OF PARTIAL DIFFERENTIATION TO MAXIMUM AND MINIMUM PROBLEMS
» MAXIMUM AND MINIMUM PROBLEMS WITH CONSTRAINTS; LAGRANGE MULTIPLIERS
» ENDPOINT OR BOUNDARY POINT PROBLEMS
» DIFFERENTIATION OF INTEGRALS; LEIBNIZ’ RULE
» APPLICATIONS OF INTEGRATION; SINGLE AND MULTIPLE INTEGRALS
» CHANGE OF VARIABLES IN INTEGRALS; JACOBIANS
» APPLICATIONS OF VECTOR MULTIPLICATION
» DIRECTIONAL DERIVATIVE; GRADIENT
» SOME OTHER EXPRESSIONS INVOLVING ∇
» GREEN’S THEOREM IN THE PLANE
» THE DIVERGENCE AND THE DIVERGENCE THEOREM
» THE CURL AND STOKES’ THEOREM
» SIMPLE HARMONIC MOTION AND WAVE MOTION; PERIODIC FUNCTIONS
» APPLICATIONS OF FOURIER SERIES
» COMPLEX FORM OF FOURIER SERIES
» LINEAR FIRST-ORDER EQUATIONS
» OTHER METHODS FOR FIRST-ORDER EQUATIONS
» SECOND-ORDER LINEAR EQUATIONS WITH CONSTANT COEFFICIENTS AND ZERO RIGHT-HAND SIDE
» SECOND-ORDER LINEAR EQUATIONS WITH CONSTANT COEFFICIENTS AND RIGHT-HAND SIDE NOT ZERO
» OTHER SECOND-ORDER EQUATIONS
» SOLUTION OF DIFFERENTIAL EQUATIONS BY LAPLACE TRANSFORMS
» A BRIEF INTRODUCTION TO GREEN FUNCTIONS
» THE BRACHISTOCHRONE PROBLEM; CYCLOIDS
» SEVERAL DEPENDENT VARIABLES; LAGRANGE’S EQUATIONS
» TENSOR NOTATION AND OPERATIONS
» KRONECKER DELTA AND LEVI-CIVITA SYMBOL
» PSEUDOVECTORS AND PSEUDOTENSORS
» VECTOR OPERATORS IN ORTHOGONAL CURVILINEAR COORDINATES
» ELLIPTIC INTEGRALS AND FUNCTIONS
» GENERATING FUNCTION FOR LEGENDRE POLYNOMIALS
» COMPLETE SETS OF ORTHOGONAL FUNCTIONS
» NORMALIZATION OF THE LEGENDRE POLYNOMIALS
» THE ASSOCIATED LEGENDRE FUNCTIONS
» GENERALIZED POWER SERIES OR THE METHOD OF FROBENIUS
» THE SECOND SOLUTION OF BESSEL’S EQUATION
» OTHER KINDS OF BESSEL FUNCTIONS
» ORTHOGONALITY OF BESSEL FUNCTIONS
» SERIES SOLUTIONS; FUCHS’S THEOREM
» HERMITE FUNCTIONS; LAGUERRE FUNCTIONS; LADDER OPERATORS
» LAPLACE’S EQUATION; STEADY-STATE TEMPERATURE IN A RECTANGULAR PLATE
» THE DIFFUSION OR HEAT FLOW EQUATION; THE SCHR ¨ODINGER EQUATION
» THE WAVE EQUATION; THE VIBRATING STRING
» STEADY-STATE TEMPERATURE IN A CYLINDER
» VIBRATION OF A CIRCULAR MEMBRANE
» STEADY-STATE TEMPERATURE IN A SPHERE
» INTEGRAL TRANSFORM SOLUTIONS OF PARTIAL DIFFERENTIAL EQUATIONS
» EVALUATION OF DEFINITE INTEGRALS BY USE OF THE RESIDUE THEOREM
» THE POINT AT INFINITY; RESIDUES AT INFINITY
» SOME APPLICATIONS OF CONFORMAL MAPPING
» THE NORMAL OR GAUSSIAN DISTRIBUTION
» STATISTICS AND EXPERIMENTAL MEASUREMENTS
Show more