# Ways to evaluate $\lim_{n\to\infty}\int_0^{\frac{1}{n}}\log\left(e^n+e^{-x}\right) \, dx$ as $1$

After I've obtained the indefinite integral $$\int\log\left(e^n+e^{-x}\right)\,dx,$$

with Wolfram Alpha, see this code if you need it

int log(e^n+e^(-x))dx,

and do the calculations at the limits of integration $\int_0^{1/n}$, I get the following limits $$\lim_{n\to\infty}\frac{1}{n}\log\left(\frac{e^n+e^{-\frac{1}{n}}}{e^{n+\frac{1}{n}}+1}\right)+\frac{1}{2n^2}=0$$ and $$\lim_{n\to\infty}\operatorname{Li}_2\left(-e^n\right)-\operatorname{Li}_2 \left(-e^{n+\frac{1}{n}}\right)=1.$$

I believe that there are no mistakes, thus it implies that $$\lim_{n\to\infty}\int_0^{\frac{1}{n}}\log\left(e^n+e^{-x}\right) \, dx=1.$$

And my question was

Question. Can you to evaluate (and justify it) $$\lim_{n\to\infty}\int_0^{\frac{1}{n}}\log\left(e^n+e^{-x}\right) \, dx$$ from a different way? Thanks in advance.

I don't know if makes sense Lebesgue or also Riemann integral. My problem is that I don't understand well the evaluation of the limit of the upper limit and this integrand.

• Thanks for your edit @MichaelHardy – user243301 Dec 20 '16 at 9:10

Consider $$f_n(x)=\log(e^n+e^{-x})-n=\log(1+e^{-x-n})$$ Then $$0\le\int_0^{1/n}f_n(x)\,dx\le\int_0^{1/n}\log 2\,dx=\frac{\log2}{n}$$ Thus $$\lim_{n\to\infty}\left(\int_0^{1/n}\log(e^n+e^{-x})\,dx-\int_{0}^{1/n}n\,dx\right)=0$$

• Many thanks your proof is truly nice. – user243301 Dec 20 '16 at 0:22

First, we can write

$$\log(e^n+e^{-x})=n+\log(1+e^{-(n+x)})$$

Then, we have

$$\int_0^{1/n}\log(e^n+e^{-x})\,dx=1+\int_0^{1/n}\log(1+e^{-(n+x)})\,dx$$

So, the problem boils down to showing that $\int_0^{1/n}\log(1+e^{-(n+x)})\,dx\to 0$ as $n\to \infty$.

From the First Mean-Value Theorem for Definite Integrals, there exists a number $\xi_n\in (0,1/n)$ such that

$$\int_0^{1/n}\log(1+e^{-(n+x)})\,dx=\frac1n \log(1+e^{-(n+\xi_n)})$$

Taking the limit as $n\to \infty$ yields the coveted result.

• Many thanks for this proof using the mean-value theorem. All the three answers seem dreams, are very nice. – user243301 Dec 20 '16 at 0:27
• You're quite welcome! My pleasure. And Happy Holidays! -Mark – Mark Viola Dec 20 '16 at 0:28
• Nice variation, happy holidays! – egreg Dec 20 '16 at 8:55
• @egreg Thank you Greg. And Happy Holidays to you also. -Mark – Mark Viola Dec 20 '16 at 15:41

For $n$ large, $e^{-x}$ is very nearly $1$ for the entire domain of the integral, while $e^n$ is very large. So in the limit, the $e^{-x}$ term can be ignored (this is not quite rigorous but it is easy to make it rigorous).

Then you have $$\int_0^{1/n} \log (e^n) \,dx = \int_0^{1/n} n \,dx = 1$$

So the answer is not at all mysterious.

• Many thanks, to me seems curious, was an example that I've created few minutes ago. – user243301 Dec 20 '16 at 0:20

Another approach is to use bounded/dominated convergence:

$$\int^{1/n}_0 \ln (e^n + e^{-x}) \,dx = \int_0^1 \frac{ \ln (e^n + e^{-y/n})}{n} \, dy\to \int_0^1 1 \, dy.$$

The limit on the right is because the nonnegative functions $\ln (e^n + e^{-y/n})/n$ converge pointwise to $1$ as $n\to\infty$ and are bounded above by $\ln (2e^n)/n \le \ln 2+1$.

* NOTE * The pointwise convergence is actually uniform, so we can totally avoid bounded convergence and get the limit from theory of Riemman integration.

• Many thanks also to you, I note the trick of the change of variable. Many thanks for your generous explanation, and thanks all users. – user243301 Dec 20 '16 at 0:41
• You're very welcome. Nice question ! – Fnacool Dec 20 '16 at 0:51