The question: (1) Prove that $\ln(n!) = (n+\frac{1}{2})\ln(n) - n + C + o(1)$, where $C - const$, o(1) - infinitely small.
(2) Using Valles' formula $\lim_{n\to\infty}\frac{1}{n}(\frac{(2n)!!}{(2n-1)!!})^2 = \pi$, prove that $C = \frac{\ln(2\pi)}{2}$.
(3) Derive Sterling's formula from your work ($n! \sim \sqrt{2\pi n}(\frac{n}{e})^n $).
What I have done:
I have proven ($1$) (by comparing $C$ for $n$ and $n-1$), and I believe I can approximate C by taking $n = 1$ and getting the following formula:
$\ln1 = (1+\frac{1}{2})\ln1 - 1 + C + o(1)$
$0 = 0-1+C+o(1)$
$C = 1 - o(1)$
But I don't think it fits the approximation of $\frac{\ln(2\pi)}{2}$ which is $\approx 0.919$, since $o(1)$ is supposed to be infinitely small.
I don't really know where to go from here, so, if you could, please point me in the right direction.
$$\ln((n-1)!) = (n-1+\frac{1}{2})\ln(n-1)-n+1+C+o(1)$$
Get C values from these 2 and compare them.
$$(n+\frac{1}{2})\ln(n) - n - \ln(n!) + o(1) = (n-\frac{1}{2})\ln(n-1)-n+1-\ln((n-1)!) + o(1)$$
...
$$(n-\frac{1}{2})\ln(\frac{n}{n-1}) = 1 + o(1)$$
$$\frac{n}{n-1}^{(n-\frac{1}{2})} = e + o(1) $$ (Not really sure it would be e + o(1) but it should be something close to that)
$$(1+ \frac{1}{n-1})^{(n-\frac{1}{2})} = e + o(1)$$ which is true since i know that $(1+\frac{1}{n-1})^n$ approaches e
– waterfalls Feb 26 '16 at 13:03