# Homework Help: Horrible limit with factorials. Need to use Stirling formula?

1. Mar 16, 2013

### tsuwal

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

Do I need to used the boring Stirling formula?

2. Mar 16, 2013

### Ray Vickson

What is stopping you from trying the use of Stirling's formula to see if it works?

BTW: Stirling is far from boring; it is extremely useful and plays a crucial role in many areas such as probability theory and practice.

3. Mar 17, 2013

### tt2348

Actually, i think this problem can be done without stirrings. For the top factorial, you have (2n-2) terms, giving a leading term of (2n)^(2n-2) for the expansion. Then the bottom will have (n^(n-2)+...)(n^n+....), giving a leading coefficient n^(2n-2)... This your limit becomes (2n-2)!/(2^(2n-2)*n!*n-2!)~O(2^(2n-2)*n^(2n-2)/(2^(2n-2)*n^(2n-2))~1

4. Mar 17, 2013

### Ray Vickson

5. Mar 17, 2013

### tsuwal

I don't use the stirling formula because it is just a aproximation and I'm not sure if I can substitute n! by n^n/e^n
In fact, wolfram alpha says the limit of n!*e^n/n^n as n goes to infinity is not 1, is infinity, so it is not a good aproximation, right?

6. Mar 17, 2013

### Ray Vickson

Your approximation is not good, but Stirling's formula IS good. The Stirling formula is
$$St(n) = \sqrt{2 \pi n}\: n^{n} e^{-n}.$$ This is an asymptotic formula for n!, in the sense that
$$\frac{n!}{St(n)} \to 1 \; \text{ as } \ \to \infty.$$
St(n) is a useably good approximation to n! for large, finite n, in the sense that the % errors are small.

In fact, St(n) is a lower bound on n! for any positive integer n. An upper bound St1(n) can be obtained simply as
$$St1(n) = St(n) e^{1/(12n)}.$$
We have $St(n) < n! < St1(n)$ for all integers $n \geq 1$. The fancier form St1 improves the accuracy of Stirling remarkably, even for small n. For example, here are some numerical values:
$$\begin{array}{cccc} n & St(n) & n\! & St1(n) \\ 1 & 0.922137 & 1 & 1.00227 \\ 2 & 1.919 & 2 & 2.00065 \\ 5 & 118.019 & 120 & 120.003 \\ 10 & 3.59870e+06 & 3.62880e+06 & 3.62881e+06 \\ 15 & 1.30043e+12 & 1.30767e+12 & 1.30768e+12 \\ 20 & 2.42279e+18 & 2.43290e+18 & 2.43290e+18 \\ 30 & 2.64517e+32 & 2.65253e+32 & 2.65253e+32 \\ 40 & 8.14217e+47 & 8.15915e+47 & 8.15915e+47 \\ 50 & 3.03634e+64 & 3.04141e+64 & 3.04141e+64 \end{array}$$
Anyhow, for limit results, ordinary Stirling is good enough.

Last edited: Mar 17, 2013
7. Mar 17, 2013

### tsuwal

Now it makes sense. I didn't knew "that" stirling formula, mine is deduced from the numerical integration of the logarithmic function by ln(n!). Would like to know how do you get to your formula though.. Thanks!

8. Mar 18, 2013

### Ray Vickson

One way is to do an asymptotic analysis of the integral representation
$$n\! = \int_0^{\infty} e^{-x} x^n \, dx,$$
as is done in http://mathworld.wolfram.com/StirlingsApproximation.html . Another way (as done in Feller, Introduction to Probability Theory and its Applications, Volume I) is to look directly at the series for ln(n!). Feller gives a nice, elementary argument that shows
$$C + \left( n + \frac{1}{2}\right) \ln(n) - n < \ln (n!) < C + \left( n + \frac{1}{2}\right) \ln(n) - n +\frac{1}{12n}.$$
The argument leaves the constant C unevaluated, but other methods (such as the above integral method, or the limiting theorems of Probability theory itself) serve to give
$$C = \frac{1}{2} \ln(2 \pi).$$ Noter that Feller's method gives the lower and upper bounds I mentioned.