Stirling s formula, n-spheres and the Gamma Function We start by noticing that and hence x n e x dx lim a 1 ( 1 n n a n n! e ax dx lim a 1 ( 1 n n a n a 1 x n e x dx (1 Let us make a remark in passing. Note that in general the gamma function is defined by Γ(x e t t x 1 dt ( and hence a simple integration by parts (with u t x and dv e t dt shows that Γ(x + 1 xγ(x. (3 Since it is also easy to see that Γ(1 1, it follows that equation (1 is just n! Γ(n + 1. We will also have use for the basic result ( π 1/ e ax dx (4 a (To prove this, multiply the integral by itself (letting x y, resulting in a double integral with integrand e a(x +y. Change to polar coordinates with dxdy rdrdθ, and integrate r from to, and θ from to π. Define F x n e x so that lnf n lnx x. Then lnf has a maximum at x given by d lnf dx n x 1 ]xx so that x n. Expanding x in a neighborhood of n we write x n + ξ n(1 + ξ/n where ξ n. Using ln(1 + ε ε + ε /! + we have lnf n lnn(1 + ξ/n n(1 + ξ/n ( ξ n lnn + n n 1 ξ n n ξ n lnn n 1 ξ n 1
and therefore F n n e n e ξ /n Observe that if n is very large, then n n. For example, if n 1 4, then n 1 1 n. Also, if say, ξ 1 16, then ξ n while ξ n (or alternatively, ξ 1 3 n. Since it is also obvious that F has a maximum at ξ and is very small if ξ n, this max is very sharp. As an example, if n is only equal to 1, F(ξ n n e n 3.7 1 156, while letting ξ 5 1 gives a damping factor of e 1 ξ /n e 5/ 3.7 1 6. And for typical numbers like n 1 4 and ξ 1 16, this damping factor is on the order of the fantastically small number e 18 / 8.3 1 171475. We now want to use (5 in (1. We first change variables in (1 from x to ξ x n so that the integral becomes dx n dξ since if ξ < n, then F is very small. (Again, if n 1 4 ξ, then e 1 ξ /n e 14 / 1. Therefore, equation (1 becomes or, using (4 n! Taking the logarithm yields the formula dξ (5 n n e n e ξ /n dξ n n e n e ξ /n dξ (6 n! πn n n e n (7 lnn! n lnn n + 1 ln πn (8 Finally, we note that for n large, ln πn n, and hence the last term in (8 is completely negligible. (If n 1 4, then ln n 55. We are then left with the usual form of Stirling s equation lnn! n lnn n (9 As a measure of the accuracy of this formula, let us look at a comparison of equations (8 and (9 with the exact result: n lnn! n lnn n + (1/lnπn n lnn n 1 15.144 15.961 13.59 1 363.739 363.739 36.517 1 3 591.13 591.13 597.76 1 6 1.8155 1 7 1.8155 1 7 1.8155 1 7 It is clear that for the numbers of interest in statistical mechanics, equation (9 is quite accurate.
As another application of equations ( and (4, we derive an equation for the volume of an n-dimensional sphere of radius R. First of all, since exp( n i1 x i n i1 exp( x i, it is clear from (4 that ( n I n exp dx 1 dx n π n/. i1 x i Note that dx 1 dx n is the volume element dv n in the cartesian coordinates for R n. We now want to change to spherical coordinates where x 1 + + x n R. Since an n-dimensional volume must go like R n, we can write V n C n R n for come constant C n, and hence dv n d(c n R n nc n R n 1 dr. Then I n exp( R dv n nc n e R R n 1 dr. Now let t R so that dt R dr or dr (1/t 1/ dt. Using equations ( and (3 this gives us n I n C n e t t (n 1/ t 1/ dt n C n e t t n/ 1 dt n C n C n Γ Γ + 1. But we already showed that I n π n/ and therefore C n π n/ /Γ that the volume of the n-sphere is given by + 1 so V n πn/ Γ + 1Rn (1 Let us write this in another form. If we let t u in ( we find another useful representation for the gamma function: or Γ(x e u u x u du Γ(x e u u x 1 du e t t x 1 dt (11 From equation (4 we clearly have (since the integrand is symmetric e ax dx 1 ( π a 1/ 3
and hence Γ( 1 π1/. If n is even, then Γ + 1 isn t a problem. But if n is odd, then we observe that Γ + 1 n Γ n 1 Γ 1 n 1 Γ n ( ( ( n n 1 1 1 Γ n ( ( ( ( n n 4 n (n 1 1 Γ. Note there are (n 1/ + 1 (n + 1/ terms in the product, and hence we have Γ + 1 n!! π for n odd (1 n+1 where the double factorial is defined by n!! n(n (n 4 (1. Using equation (1, we can now rewrite equation (1 for n odd as V n n+1 π n 1 n!! R n. The double factorial can be written in another form as follows: n!! 1 3 5 7 9 (n 4 (n n 1 3 4 5 6 7 8 9 (n 4 (n 3 (n (n 1 n 4 6 8 (n 3 (n 1 1 3 4 5 6 7 8 9 (n 4 (n 3 (n (n 1 n ( 1( ( 3( 4 ( n 3 n 1 ( n! n 1 1!. Then we also have (for n odd V n n π n 1 n! 1! R n. Finally, as a general comment, for any nonnegative integer m we note that m + 1 is odd and hence (m + 1!! (m + 1! m m! m 1,, 3,... 4
As another application of these techniques, we evaluate the so-called Bose- Einstein integral I ν (z z 1 e x dx (13 1 where z 1 and ν R. Recall that if w (, 1 then 1 1 w 1 + w + w + We have for the integrand of equation (13 z 1 e x 1 xν ze x 1 1 ze x xν ze x and hence the integral becomes z 1 e x 1 dx w n. n (ze x n z n e nx n z n e nx dx z n e nx dx. Now let t nx so that dx dt/n and t ν /n ν, and therefore I ν (z z 1 e x 1 dx z n n ν+1 t ν e t dt. From equation ( we see that the integral is just Γ(ν + 1, and the sum we will denote by g ν+1 (z, i.e., g ν (z z n n ν z 1. In the particular case that z 1 we have g ν (1 ζ(ν, the Riemann zeta function. In any case, we have and, in particular, I ν (z z 1 e x 1 dx g ν+1(zγ(ν + 1 e x dx Γ(ν + 1ζ(ν + 1 1 5