## idku one year ago What is going on here? (Stirling's approximation of n!)

1. e.mccormick

Inquiring minds want to know.... what is the rest of this question?

2. idku

Ok, there Stirling's approximation of the factorial $$\large \displaystyle n! {\LARGE\text{ ~}} ~\sqrt{2\pi n}\cdot \left(\frac{n}{e}\right)^n$$ and I take two limits to test how reasonable it is, and this is what I get: $$\large \displaystyle \lim_{n \rightarrow \infty}\left[ \sqrt{2\pi n}\cdot \left(\frac{n}{e}\right)^n~-~n! \right]=-\infty$$ $$\large \displaystyle \lim_{n \rightarrow \infty}\left[ \frac{\sqrt{2\pi n}\cdot \left(\frac{n}{e}\right)^n~}{~n!} \right]=1$$

3. idku

I can see Stirling's is smaller from the first limit, but why is then 2nd limit =1? (btw, the source is wolfram)

4. anonymous

i'm not sure you're first limit is correct.

5. idku
6. idku

wolfram said so

7. idku

And if you subtract Stirling's approximation from factorial: n! - Stirling's approximation , then the limit as n-> infinity , = infinity.

8. idku
9. ikram002p

so basically n! is increasing faster than (n)^{n+1/2} :)

10. ikram002p

@ganeshie8 check this

11. idku

Yes, basically plain factorial is increasing faster than stirlings. I guess for limits as n-> infinity, I can only use stirling in a denominator if I want to shjow convergence.

12. idku

show*

13. ganeshie8

whats the question

14. idku

My question is why this limit is (- infinity) $$\large \displaystyle \lim_{n \rightarrow \infty}\left[ \sqrt{2\pi n}\cdot \left(\frac{n}{e}\right)^n~-~n! \right]=-\infty$$ and this limit is 1 for some reason $$\large \displaystyle \lim_{n \rightarrow \infty}\left[ \frac{\sqrt{2\pi n}\cdot \left(\frac{n}{e}\right)^n~}{~n!} \right]=1$$

15. ganeshie8

let me ask you a question

16. ganeshie8

$$\lim\limits_{n\to\infty} (2n-n) = ?$$ $$\lim\limits_{n\to\infty} \dfrac{2n}{n} = ?$$

17. idku

Yes, yes I think I found why 1000-100 10000-1000 100000-10000 1×10^(n+1)-1×10^n = ∞ but if you divide it is just 10 for every one of them

18. ikram002p

this what u need to explain http://prntscr.com/8977k3

19. ganeshie8

right, good question to spend time on !

20. idku

$$\large \displaystyle \sqrt{2\pi n}\cdot \left(\frac{n}{e}\right)^n~~~?~~~~n!$$ $$\large \displaystyle \sqrt{2\pi n}\cdot n^n~~~?~~~~e^nn!$$ I guess like this. $$\large \displaystyle \sqrt{2\pi}\cdot n^{n+0.5}~~~?~~~~e^nn!$$ we can disregard coefficient 2pi for this, perhaps. $$\large \displaystyle n^{n+0.5}~~~?~~~~e^nn!$$

21. idku

so two growths verses one, but still kind of strange I thought that n^n is the boss

22. ikram002p

well in the long time no one can beats factorial :3

23. idku

No, we do know that n^n>n!

24. ikram002p

25. idku

yes, so with e^n together factorial is greater, and my logic of n^n being the boss doesn't apply

26. idku

Well, $\frac{e}{n}\times\frac{2e}{n}\times\frac{3e}{n}\times\frac{4e}{n}\times...\frac{(n-1)e^{n-1}}{n}\times\frac{e^nn}{n}$ so that e^n * n! can be in a sense intuitively larger if you think about it...

27. idku

28. idku

wait, I am mixinging something up

29. idku

$\frac{n!~e^n}{n^n}=\frac{e}{n}\times\frac{2e}{n}\times\frac{3e}{n}\times\frac{4e}{n}\times...\frac{(n-1)e}{n}\times\frac{en}{n}$ just this.

30. idku

i don't know intuitively n^n still rules, but it will take me a while to digest that and actually think about the truth and make some sense of it. Thanks guys!

31. ganeshie8

|dw:1440615166212:dw|

32. idku

well, that is very beginning tho...... and the difference will grow infinitely...

33. idku

in any case.... I guess will just take the fact and some reasoning without complete comprehension. THere are times when we humans have to do that.

34. idku

Tnx for your input ganeshie and ikram