# How to calculate $\lim\limits_{x\to\infty} \frac{\log(x!)}{x\log(x)}$ [duplicate]

How to calculate $$\lim\limits_{x\to\infty} \frac{\log(x!)}{x\log(x)}$$. Assume base $$e$$ (so $$\ln)$$.

My attempt:

$$\lim_{x\to\infty} \frac{\log(x!)}{x\log(x)}=\lim_{x\to\infty}\frac{\log(1\cdot 2\cdot 3\cdots x)}{x\log x}=\lim_{x\to\infty}\frac{\log(ax)}{x\log x}, a\gt 0$$

Applying LH rule:

$$\lim_{x\to\infty} \frac{\frac{1}{x}}{\log(x)+1}=\lim_{x\to\infty}\frac{1}{x(\log(x)+1)}=0$$

Wolfram tells me the answer is $$1$$. Where is my mistake?

• How did you end up at $\log(ax)$? That's your error. Check out Stirling's approxmiation for the correct order of $\log x!.$ – stochasticboy321 Mar 3 '19 at 19:17
• The $a$ in your formula is not a constant. – saulspatz Mar 3 '19 at 19:19
• See this book, page 67, theorem 3.15. The limit is $1$. – rtybase Mar 3 '19 at 19:57

First of all, if $$x$$ is a real parameter, the "factorial" doesn't make sense (unless it's some notation for the Gamma function). Anyway, I'll use $$n$$ instead of $$x$$ for an integer variable; So you want to compute $$\lim_{n\to\infty}\frac{\log(n!)}{n\log(n)}$$ Well, first of all, observe that $$\log(n!)=\log(1)+\dots+\log(n)\leq\log(n)+\dots+\log(n)=n\log(n)$$ so your limit (if existent) is $$\leq 1$$. On the other hand, let $$n\in\mathbb{N}$$ and $$f(x)=\log(x)$$. Let $$P$$ be the partition $$\{1,\dots n\}$$ of the interval $$[0,n]$$. Then We have that $$\displaystyle{\log(n!)=\sum_{k=1}^{n}\log(k)=U(f,P)}$$, i.e. the upper Darboux sum of $$f$$ for this partition; The Riemann integral $$\displaystyle{\int_1^n\log(x)dx}$$ is defined as the infimum of all upper Darboux sums of $$f$$ over all possible partitions of $$[1,n]$$, hence $$\log(n!)\geq\int_1^n\log(t)dt=n\log(n)-n+1$$. Deviding on both sides with $$n\log(n)$$ yields $$\frac{\log(n!)}{n\log(n)}\geq1-\frac{n-1}{n\log(n)}$$ Taking limits and observing that the RHS limit is $$1$$ gives the rest.

By Stirling's Approximation: $$\log n! = n\log n-n$$ as $$n \to \infty$$. As pointed out in the commentsby @stochasticboy321 and @saulspatz you misjudged the order of the term $$\log n!$$.

$$\lim_{n\to \infty} \dfrac{\log n!}{n\log n}=\lim_{n\to \infty}\left(1-\dfrac{1}{\log n}\right)= 1$$

Hint (with the same caveat that @JustDroppedIn): write $$\log(n!) = \log(1) + \cdots + \log(n)$$ and apply Stolz–Cesàro.