Find $\lim_{n\to\infty}\left(\frac{n!}{n^n}\right)^{1/n}$ I am referring to this
video on youtube which shows the determination of
$$
\lim_{n\to\infty}\left(\frac{n!}{n^n}\right)^{1/n}.
$$
In the video, the trick is to set
$$
L=\lim_{n\to\infty}\left(\frac{n!}{n^n}\right)^{1/n}
$$
and then to consider
$$
\ln(L)=\ln\left(\lim_{n\to\infty}\left(\frac{n!}{n^n}\right)^{1/n}\right).
$$
I have some problems with the following step: It is said that, since $\ln$ is a continuous function, one has
$$
\ln\left(\lim_{n\to\infty}\left(\frac{n!}{n^n}\right)^{1/n}\right)=\lim_{n\to\infty}\ln\left(\left(\frac{n!}{n^n}\right)^{1/n}\right)
$$
Is this really true? Doesn't this step only hold if the limit exists (what is exactly the task to show)?
 A: A better way to understand what's going on is to state the connection as follows: For any sequence of positive numbers $a_n$ and any positive real number $L$, we have
$$\lim_{n\to\infty}a_n=L\iff\lim_{n\to\infty}\ln(a_n)=\ln(L)$$
If it's possible to evaluate the limit of the $\ln(a_n)$'s (as turns out to be the case here), then one simply takes $e$ to that limit to get $L$, which the equivalence tells you must be the (unique) limit of the $a_n$'s. (As an aside, the equivalence can be extended to allow for $L=0$ and $L=+\infty$ with appropriate understandings of $\ln(L)$ for those cases.)
A: You are right that the video should not have set $L$ equal to the desired limit, because we don't know yet that the limit is defined.  However, most of the video is devoted to showing that $\lim_{n \to \infty} \ln a_n = -1$, where $a_n = (n!/n^n)^{1/n}$.  Once you have that, you can conclude that $\lim_{n \to \infty} a_n = \lim_{n \to \infty} e^{\ln a_n} = e^{-1}$, because the exponential function is continuous.
However, there is a second problem with the solution in the video.  The video claims that an improper integral can be computed as a limit of Riemann sums, but this is not correct.  For an improper integral, it is possible that Riemann sums will not converge to the value of the integral.  Here is a better way to evaluate the limit.
We have
$$
\ln a_n = \frac{1}{n} \ln\left(\frac{n!}{n^n}\right) = \frac{\ln n! - n \ln n}{n}.
$$
Now, $\ln n! = \ln(2 \cdot 3 \cdots n) = \ln 2 + \ln 3 + \cdots + \ln n$, and we can estimate this using the integral $\int_1^n \ln x\,dx$.  By making rectangles of width 1 above and below the curve $y = \ln x$ for $1 \le x \le n$, you can show that
$$
\int_1^n \ln x\,dx < \ln n! < \int_1^n \ln x\,dx + \ln n.
$$
Evaluating the integral (using integration by parts), you get
$$
n\ln n - n + 1 < \ln n! < (n+1)\ln n - n + 1.
$$
Therefore
$$
\frac{-n+1}{n} < \frac{\ln n! - n\ln n}{n} < \frac{\ln n - n + 1}{n},
$$
or in other words
$$
-1 + \frac{1}{n} < \ln a_n < \frac{\ln n}{n} - 1 + \frac{1}{n}.
$$
Now you can use the squeeze theorem to conclude that $\lim_{n \to \infty} \ln a_n = -1$.
A: $L=\lim_{n\to +\infty}  (\frac{n!} {n^n})^{\frac{1}{n}} $
$\Rightarrow $$ \ln(L) =\frac{1}{n} \ln(\frac{n!} {n^n}) $
$\Rightarrow $$\ln(L) =\frac{1}{n} \ln(\frac{n} {n}×\frac{n-1} {n}×\frac{n-2}{n}....\frac{1}{n})=\frac{1} {n} \ln(\frac{1}{n})+\frac{1} {n} \ln(\frac{2}{n})+\frac{1} {n} \ln(\frac{3}{n})+....+\frac{1} {n} \ln(\frac{n-2}{n})+\frac{1} {n} \ln(\frac{n-1}{n})+\frac{1} {n} \ln(\frac{n}{n})$
let's show one thing
In the first, draw the curve of ln(x) in integral $[0,1]$, and thank how to calculate the area of under curve in this range $[0,1]$
We know that for  calculate the area of this unusual shape  we use integral, so  in this range the area is $\int\limits_{0}^{1}\ln(x)=-1$
Now I think you're now wonder, what is the relation  of that  and our limits??
In This idea your will know,
Let's go back to how to invent or discover the integral
Integration came when scientists asked how can calculate the area of unusual shapes، and one of they scientists came up with a genius idea, which it say we must  divide this area of Some rectangles have the same width، and when we make this width become 0, and adding all this rectangle area,We will get An estimate of the area of this unusual shape
So for calculate the area of under curve of algorithm in [0,1] we must to divide this area of Some rectangles have the same width
(here let's take this width $=\frac{1}{n}=\triangle x$)
Now we must to calculate to area of any rectangles here, so it's the width ×height
Note that we have a fixe width for all rectangles which is $\frac{1}{n}$ but the height  changes at every point and the height of any point $x$ is $f(x)=\ln(x) $
So   the general expression of  area  of any rectangles is $\triangle x×\ln(x)$
So the area is $\sum_{} {} \ln(x) \triangle x$
But this area is not a good estimate for the area of $\ln(x)$ in $[0,1] $(if you draw the curve and rectangles you will see that)
So we must to Increase the number of rectangles to get a better estimate, for doing that, It is enough to take  $\triangle x$ very small (there limit to 0) so  the area is $\lim_{\triangle x \to 0} \triangle x ln(x_1)+\triangle x ln(x_2)+....+\triangle x ln(x_n)$
We have $\triangle x=\frac{1}{n}$ and $x_k=\frac{k} {n} $
$\Leftrightarrow $$\lim_{\frac{1} {n} \to 0} \frac{1}{n} ln(\frac{1} {n} )+\frac{1}{n} ln(\frac{2}{n})+....+\frac{1} {n} ln(\frac{n}{n})$
$\Leftrightarrow $$\lim_{n \to +\infty} \frac{1}{n} ln(\frac{1} {n} )+\frac{1}{n} ln(\frac{2}{n})+....+\frac{1} {n} ln(\frac{n}{n}) $ and that is $ln(L) $
So we can express the area by :$\int\limits_{0}^{1}ln(x)=-1$ or $ln(L) $
That mean $ln(L) =\int\limits_{0}^{1}ln(x)=-1$
$\Rightarrow $$ L =\frac{1} {e} $
