Why is $\frac{1}{x} \sum_{n=1}^x \ln (n) \sim \ln(x) - \gamma$

78 Views Asked by At

I was playing with some functions and decided I wanted to see at which point the factorial of $x$ became bigger than $e^x$. I set them equal to each other and after doing some algebra I ended up with $$\frac{1}{x} \sum_{n=1}^x \ln (n)=1$$ I realized it would be very difficult to find a value of $x$, so I decided to graph the function and noticed that it looked remarkably similar to $\ln(x)- \gamma$.
In a previous question, I learned that $\sum_{n=1}^x \frac{1}{n} \sim \ln(x) + \gamma$.
So is my previous result a fluke or a coincidence? Or is there a deeper reason for it?

1

There are 1 best solutions below

0
On BEST ANSWER

Look closer at your graph! (I am going to use $k$ and $n$ here.) I get e.g.

$$\frac{1}{100000}\left(\sum_{k=1}^{100000}\ln(k)\right)\approx \ln(100000)-0.999933$$

This suggests an asymptotic of $\ln(n)-1$. Indeed:

$$\begin{array}{ll} \displaystyle \frac{1}{n}\sum_{k=1}^n\ln(k) & \displaystyle =\ln(n)+\frac{1}{n}\sum_{k=1}^n \big(\ln(k)-\ln(n)\big) \\ & \displaystyle = \ln(n)+\sum_{k=1}^n\frac{1}{n}\ln\left(\frac{k}{n}\right) \\ & \displaystyle = \ln(n)+\int_0^1 \ln(x)\,{\rm d}x+o(1) \\ & = \ln(n)-1+o(1). \end{array} $$