2

I am trying to derive a 'rough' version of Stirling's approximation for $N!$: $$ N!\approx c\sqrt{N}\Big(\frac{N}{e}\Big)^N.\tag{1} $$ I'm aware that Stirling's approximation has $c=\sqrt{2\pi}$, but I'm just trying to obtain (1) at the moment.

What I've done: I have shown already that $$ \int_1^N\frac{\{x\}}{x}dx=\sum_{n=1}^N\ln n-N\ln N+N-1\tag2 $$ in my question here. By $\{x\}$ I refer to the Fractional Part of $x$, where $\{x\}=x-\lfloor x\rfloor$.

I noticed that by applying $\exp$ to the summation in (2), I get $N!$, so I wonder how I can simplify all of this to show (1).

A hint that I am given is to start by showing that $$ \int_1^N\frac{\{x\}}{x}dx=\frac{\ln N}2+\mathcal O(1/N)+C,\tag{3} $$ for some constant $C$. The equality in (3) above looks like it can be simplified somehow to (1), I think, because for example we have $$ \exp((\ln N)/2)=\exp(\ln(N^{1/2}))=\sqrt{N}, $$ which gets me the $\sqrt N$ factor in (1). But beyond that I am a little stuck on how to piece everything together. Thank you.

Hikawa
  • 65

1 Answers1

1

Substitute the RHS of (3) into the LHS of (2): $$ \frac{{\log N}}{2} + C + \mathcal{O}\!\left( {\frac{1}{N}} \right) = \underbrace {\sum\limits_{n = 1}^N {\log n} }_{\log N!} - N\log N + N - 1. $$ Taking the exponential of both sides gives $$ \sqrt N e^C e^{\mathcal{O}\left( {\frac{1}{N}} \right)} = N!N^{ - N} e^N e^{ - 1} . $$ Re-ordering and calling $c=e^{C+1}$ gives $$ N! = c\sqrt N \left( {\frac{N}{e}} \right)^N e^{\mathcal{O}\left( {\frac{1}{N}} \right)} . $$ By the Taylor series of the exponential function $$ e^{\mathcal{O}\left( {\frac{1}{N}} \right)} = 1 + \mathcal{O}\!\left( {\frac{1}{N}} \right). $$ Thus, finally, $$ N! = c\sqrt N \left( {\frac{N}{e}} \right)^N \left( {1 +\mathcal{O}\!\left( {\frac{1}{N}} \right)} \right). $$

Gary
  • 31,845