# Estimating $n!$ as $e \left(\frac ne \right)^n \le n! \le ne \left(\frac ne \right)^n$

I'm told that for $n \geq 2,$ $$\sum_{k=1}^{n-1} f(k) \leq \int_1^n f(x) \, dx \leq \sum_{k=2}^n f(k)$$

I am then asked to consider $\ln n! = \sum_{k=1}^n \ln k$ and show that for $n \geq 2$

$$n! \leq ne \left(\frac{n}{e} \right)^n$$ and $$n! \geq e \left(\frac{n}{e} \right)^n$$

This is what I have so far:

$$\ln n! = \sum_{k=1}^n \ln k = \sum_{k=2}^n \ln k \geq \int_1^n \ln x \, dx = n\ln n$$

So I have $$\ln n! \geq n\ln n \Rightarrow n! \geq n^n$$

Where do I go next?

• $n^n\geq n!$ certainly, yes? There must be an error! – jdods May 1 '16 at 15:35
• Your integration is wrong: $\int\ln x\,dx=x\ln x-x+C$. For the other inequality, note that you have $$\ln(n-1)!\le\int_1^n\ln x\,dx\;.$$ – Brian M. Scott May 1 '16 at 15:37
• @BrianM.Scott Even after I've corrected the mistake in my integration I'm not sure how to get the correct inequality. Could you show how to do this? – Si.0788 May 1 '16 at 15:41
• @Si.0788: At that point you should have $\ln n!\ge n\ln n-n+1$. Now exponentiate: $$n!\ge e^{n\ln n-n+1}=n^n\cdot\frac{e}{e^n}\;,$$ and then it’s just a little algebra. – Brian M. Scott May 1 '16 at 15:45