Improper Integrals as Riemann Sums and a Beautiful Limit $\lim_{n \to \infty}\frac{\sqrt[n]{n!}}{n}$ – Calculus

improper-integralsintegrationlimitsriemann sumsequences-and-series

For some context, I recently encountered a beautiful limit.
$$\lim_{n \to \infty}\frac{\sqrt[n]{n!}}{n}$$
To solve this we begin by taking the natural log of the inside.
$$\ln\left(\frac{\sqrt[n]{n!}}{n}\right)=\ln\left(\frac{n!}{n^n}\right)^\frac{1}{n}=\frac{1}{n}\ln\left(\frac{n!}{n^n}\right)$$
Writing out the terms inside the $\ln$ makes it clear that we can express it as a sum.
$$\ln\left(\frac{n!}{n^n}\right)=\ln\left(\frac{1\cdot2 \dotsm n}{n\cdot n \dotsm n}\right)=\ln\left(\frac{1}{n}\right)+\ln\left(\frac{2}{n}\right)+\dotsm+\ln\left(\frac{n}{n}\right)=\sum_{i=1}^n\ln\left(\frac{i}{n}\right)$$
So what we are looking for is the following.
$$\lim_{n \to \infty}\frac{1}{n}\sum_{i=1}^n\ln\left(\frac{i}{n}\right)$$
Notice that this is the Riemann Sum from $0$ to $1$ of $\ln(x)$ so we have,
$$\lim_{n \to \infty}\frac{1}{n}\sum_{i=1}^n\ln\left(\frac{i}{n}\right)=\int_{0}^{1}\ln(x)\ dx$$
The integral can be solved using integration by parts which I will not include here but it evaluates to $-1$.
$$\int_{0}^{1}\ln(x)\ dx=-1$$
But as we took the natural log of the expression, we must undo it by putting it to the power of $e$.
$$\therefore\lim_{n \to \infty}\frac{\sqrt[n]{n!}}{n}=\frac{1}{e}$$

I was wondering if I could use the same kind of steps to make an expression equal to $e^\pi$. I realized I needed an integral based on $\ln(x)$ which evaluates to $\pi$ and found the following.

$$\int_{0}^{\infty}\ln\left(1+\frac{1}{x^2}\right)\ dx=\pi$$

However, the problem here is that this is an improper integral and the upper bound is at $\infty$. I've been looking for ways to express this as a Riemann Sum but intuitively it does not make sense to me. The point of Riemann Sums was to keep adding infinitely thin boxes infinite times, so is there any room to expand that so that the upper bound is at infinity?

Also, if you find any other integrals which can be used to make a nice expression like the one above, please include that too. I would love to solve it.

ps. This is my first post and also my first time using latex to write these equations. Any advice or suggestion is welcome. Thank you.

Best Answer

We have

\begin{align*} \int_{0}^{\infty} \log \left( 1 + \frac{1}{x^2} \right) \, \mathrm{d}x &= \lim_{n\to\infty} \sum_{k=1}^{\infty} \log \left( 1 + \frac{n^2}{k^2} \right) \frac{1}{n} \\ &= \lim_{n\to\infty} \frac{1}{n} \log \left[ \prod_{k=1}^{\infty} \left( 1 + \frac{n^2}{k^2} \right) \right] \\ &= \lim_{n\to\infty} \frac{1}{n} \log \left( \frac{\sinh(n\pi)}{n\pi} \right). \end{align*}

So, the equality $\int_{0}^{\infty} \log \left( 1 + \frac{1}{x^2} \right) \, \mathrm{d}x = \pi$ is equivalent to

$$ \lim_{n\to\infty} \left( \frac{\sinh(n\pi)}{n\pi} \right)^{\frac{1}{n}} = e^{\pi}, $$

which is in fact much easier to prove only using calculus.

Related Question