Real Analysis – Proving $N\ln N-N<\ln(N!)<(N+1)\ln(N+1)-N$

calculusreal-analysissolution-verification

I have doubts about my proof, I think I made some possible mistakes but I can't find them for some reason.

By considering the area under the curves $y = \ln x$ and $y = \ln(x − 1)$, show that
$$N\ln N-N<\ln(N!)<(N+1)\ln(N+1)-N.$$
Hence show that $$|\ln N!-N\ln N+N|<\ln\left(1+\frac1N\right)^N+\ln(1+N).$$

My attempt:

Let $A_1$ and $A_2$ be the areas under the curves $y = \ln x$ and $y = \ln(x-1)$ over the interval $[1, N]$, where $N$ is a positive integer.

The integral of $\ln x$ from 1 to $N$ is given by:
$A_1 = \int_{1}^{N} \ln x \,dx$

Similarly, the integral of $\ln(x-1)$ from 1 to $N$ is given by:
$A_2 = \int_{1}^{N} \ln(x-1) \,dx$

Now, we establish the inequalities:
\begin{align*}
&\text{Lower Bound:} & N\ln N – N &< \ln(N!) < (N+1)\ln(N+1) – N \\
&\text{Upper Bound:} & |\ln N! – N\ln N + N| &< \ln\left(1+\frac{1}{N}\right)^N + \ln(1+N)
\end{align*}

Consider the rectangle with base $[1, N]$ and height $\ln N$. The area of this rectangle is $N \ln N$. Since $\ln x < \ln(x-1)$ for $x > 1$, the area under the curve $y = \ln x$ is less than the area under $y = \ln(x-1)$ over the interval $[1, N]$. Therefore,
$N \ln N < A_1 < A_2$

This implies $N\ln N < \int_{1}^{N} \ln(N) \,dx = \ln(N!)$.

Consider the rectangle with base $[1, N]$ and height $\ln(N+1)$. The area of this rectangle is $(N+1)\ln(N+1) – N$. Since $\ln(x-1) < \ln x$ for $x > 1$, the area under the curve $y = \ln(x-1)$ is less than the area under $y = \ln x$ over the interval $[1, N]$. Therefore,
$A_2 < A_1 < (N+1)\ln(N+1) – N$

This implies $\ln(N!) < \int_{1}^{N} \ln(N+1) \,dx = (N+1)\ln(N+1) – N$.

Starting with the middle expression, $\ln N!$, rewrite it using Stirling's approximation:
$\ln N! \approx N\ln N – N + \frac{1}{2}\ln(2\pi N)$

Substitute this into the expression and simplify:
$\left| N\ln N – N + \frac{1}{2}\ln(2\pi N) – N\ln N + N \right| < \ln\left(1+\frac{1}{N}\right)^N + \ln(1+N)$

This simplifies to:
$\frac{1}{2}\ln(2\pi N) < \ln\left(1+\frac{1}{N}\right)^N + \ln(1+N)$

Notice that $\ln\left(1+\frac{1}{N}\right)^N$ converges to $\ln e = 1$ as $N$ approaches infinity. Also, for large $N$, $\ln(1+N)$ is dominated by $N$. Therefore, the right side approaches $N + 1$.

Thus, we have:
$\frac{1}{2}\ln(2\pi N) < N + 1$

Which is true for sufficiently large $N$. This completes the proof.

Best Answer

Since $\ln$ is monotone increasing (on its domain $(0,\infty)$, $$\int^j_{j-1}\ln x\,dx \leq \ln j\leq \int^{j+1}_j\ln x\,dx$$ whence we obtain $$\sum^N_{j=2}\int^j_{j-1}\ln x\,dx\leq \ln(N!)=\sum^N_{j=2}\ln(j)\leq\sum^N_{j=2}\int^{j+1}_{j}\ln x\,dx$$

From $$\int^j_{j-1}\ln x\,dx =j\ln j-j-(j-1)\ln(j-1) + j-1=j\ln j-(j-1)\ln(j-1)-1$$ we obtain that \begin{align} \sum^N_{j=2}\big(j\ln j-(j-1)\ln(j-1)-1\big)&=N\ln N-N\\ \sum^N_{j=2}\big((j+1)\ln (j+1)-j\ln(j) -1\big)&=(N+1)\ln(N+1)-2\ln2-N\\ &<(N+1)\ln(N+1)-N \end{align}