Evaluate $\lim \limits_{n \to \infty} n \int_{-1}^{0}(x+e^x)^n dx$. Evaluate $\lim \limits_{n \to \infty} n $$\int_{-1}^{0}(x+e^x)^n  dx$. The answer should be $\frac{1}{2}$. I tried the substitution $x+e^x=u$ and then using the property that $\lim_{n \to \infty } n \int_{-a}^{1} x^n f(x)dx=f(1)$ but I don't know what to do further. If you solve this please do it so that a highschooler like me can understand it, thank you.
 A: I don't know if I used high school math to solve this problem. It is pretty challenging. Let $t=-nx$ and then
\begin{eqnarray}
&&n\int_{-1}^{0}(x+e^x)^n dx\\
&=&\int^{n}_{0}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n dx\\
&=&\int^{\frac{n}2}_{0}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n dx+\int_{\frac{n}2}^{n}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n dx. \tag{1}
\end{eqnarray}
By the Mean-Value theorem for integrals,
$$ \int_{\frac{n}2}^{n}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n dx=\frac{n}{2}\left(-\frac{\xi}{n}+e^{-\frac{\xi}{n}}\right)^n,\frac{n}2\le\xi\le n. $$
Noting that, for $\frac12\le x\le1$,
$$ |-x+e^{-x}|\le1-e^{-1}<1 $$
we have
$$ \lim_{n\to\infty}\int_{\frac{n}2}^{n}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n dx=\lim_{n\to\infty}\frac{n}{2}\left(-\frac{\xi}{n}+e^{-\frac{\xi}{n}}\right)^n=0. $$
Now we work on the first part of (1) and we want to show
$$ \lim_{n\to\infty}\int^{\frac{n}2}_{0}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n dx=\lim_{n\to\infty}\int^{\frac{n}2}_{0}e^{-2t}dt $$
or
$$ \lim_{n\to\infty}\int^{\frac{n}2}_{0}e^{-2t}\left[1-e^{2t}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n\right] dx=0 $$
From
$$ e^{-x}\ge 1-x, e^x\ge 1+x, -x+e^{-x}\le e^{-2x}, x+e^{x}\le e^{2x}, x\ge 0$$
we have
$$ e^{-2t}\ge\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n\ge\left(1-\frac{2t}{n}\right)^n , e^{2t}\ge \left(\frac{t}{n}+e^{\frac{t}{n}}\right)^n\ge\left(1+\frac{2t}{n}\right)^n$$
and hence
\begin{eqnarray}
0&\le& e^{2t}\left[e^{-2t}-\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n\right]\\
&\le&1-e^{2t}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n\\
&\le&1-\left(1+\frac{2t}{n}\right)^n\left(1-\frac{2t}{n}\right)^n\\
&=&1-\left(1-\frac{4t^2}{n^2}\right)^n.
\end{eqnarray}
By the Bernoulli inequality
$$ (1-x)^n\ge 1-nx, x\in(0,1)$$
we have
$$ 0\le 1-e^{2t}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n\le\frac{4t^2}{n}. $$
So
$$ 0\le\int^{\frac{n}2}_{0}e^{-2t}\left[1-e^{2t}\left(-\frac{t}{n}+e^{-\frac{t}{n}}\right)^n\right] dx\le\frac4n\int^{\frac{n}2}_{0}t^2e^{-2t}dt\to0 $$
as $n\to\infty$.
A: I'll sketch a proof and let you fill in the details. Let $f(x)=x+e^x.$ Then $f'(x) = 1 + e^x,$ hence $f$ is strictly increasing, and $f$ maps $[-1,0]$ to $[-1+1/e, 1].$ In the given integral, let $x= f^{-1}(y)$ (this is what you were trying). The expression becomes
$$\tag 1 n\int_{-1+1/e}^1 y^n(f^{-1})'(y)\,dy.$$
Now recall
$$(f^{-1})'(y) = \frac{1}{f'(f^{-1}(y)} = \frac{1}{1+e^{f^{-1}(y)}}.$$
Thus $(1)$ equals
$$n\int_{-1+1/e}^1 y^n\frac{1}{1+e^{f^{-1}(y)} }\,dy.$$
On $[-1+1/e,0]$ the integrand in absolute value is bounded above by $|y|^n \le |-1+1/e|^n.$ Since $n|-1+1/e|^n\to 0,$ we can ignore this part of the integral.
So we're left with
$$n\int_0^1 y^n\frac{1}{1+e^{f^{-1}(y)}}\,dy.$$
You're now set up to use the "property" you spoke of.
A: Your property says that the limit is
$$
\frac{1}{1+e^{X(1)}},
$$
where $X(u)$ is the solution of $X(u)+e^{X(u)}=u$.  Observe that $e^{X(1)}=1-X(1)$, so your limit is
$$
\frac{1}{2-X(1)}.
$$
It suffices to show that $X(1)=0$.  But this is clear, since $1=X(1)+e^{X(1)}\ge e^{X(1)}\ge 1$, with equality if and only if $X(1)=0$.
