Stirling's Formula/Examples/8
Jump to navigation
Jump to search
Example of Use of Stirling's Formula
The factorial of $8$ is given by Stirling's Formula as:
- $8! \approx 39 \ 902$
which shows an error of about $1 \%$.
Proof
\(\ds n!\) | \(\approx\) | \(\ds \sqrt {2 \pi n} \left({\dfrac n e}\right)^n\) | Stirling's Formula | |||||||||||
\(\ds \leadsto \ \ \) | \(\ds 8!\) | \(\approx\) | \(\ds \sqrt {2 \pi 8} \left({\dfrac 8 e}\right)^8\) | |||||||||||
\(\ds \) | \(=\) | \(\ds 4 \sqrt \pi \left({\dfrac 8 e}\right)^8\) | ||||||||||||
\(\ds \) | \(=\) | \(\ds 2^{26} \sqrt \pi e^{-8}\) | ||||||||||||
\(\ds \) | \(=\) | \(\ds 67108864 \times 1.77245 \times 0.00033546\) | ||||||||||||
\(\ds \) | \(\approx\) | \(\ds 39902\) |
We have that by the usual calculation:
- $8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 40 \ 320$
Hence:
\(\ds \frac {40320 - 39902} {40320}\) | \(=\) | \(\ds \frac {418} {40320}\) | ||||||||||||
\(\ds \) | \(\approx\) | \(\ds 0.01036\) | ||||||||||||
\(\ds \) | \(\approx\) | \(\ds 1.03 \%\) |
$\blacksquare$
Sources
- 1997: Donald E. Knuth: The Art of Computer Programming: Volume 1: Fundamental Algorithms (3rd ed.) ... (previous) ... (next): $\S 1.2.5$: Permutations and Factorials