Stirling's Formula

Stirling's Formula

   

n

n!

 n! (Stirling's approximation)

Error %

ln(n!)

n*lnn - n

Error %

As per Stirling's formula, n! = nne-n (2π)n [1 + 1/12n + 1/288n2 + ........]

 

where 0<θ<1.

The figure under bracket represents divergent infinite series.

For n >100, the error % comes down to 0.1%.

0 xn e-x dx = n!

 The Gamma function is represented as Γ(n)

Γ(n + 1) = nΓ(n)

Γ(n + 1) = n! and Γ(1) = 0! =1 and Γ(d/2 - 1)! = Γ(d/2)

Γ(1/2) = Π

    Γ(n )Γ(1-n) = Π / sin(Πn)  where 0<n<1

From Stirling's formula it follows -

ln N! =NlnN -N + ln √ (2πn)

Neglecting the last term, ln N! =NlnN -N