How to check uniform convergence of $f_n(x) = n(1 + x(e^{1/n} - 1))^n - ne^x$? Define the sequence $f_n:[0,1]\rightarrow \mathbb{R}$ by
$$f_n(x) = n(1 + x(e^{1/n} - 1))^n - ne^x$$
How do I show that
$$\lim_{n\rightarrow +\infty} \sup_{x\in [0,1]} f_n(x)$$
exists? I have tried showing uniform convergence of $f_n$. I obtained that the sequence converges pointswise to $f(x) = \frac{1}{2}e^x x(1-x)$, but I could not show uniform convergence. I have attempted to use Dini's theorem to show uniform convergence, but it failed.
 A: I think that in order to apply Dini's theorem you need that for a given $x$ the sequence $\{f_n(x)\}_{n\geq 0}$ have to be monotone but not necessarily in the same direction for all $x$.
Note that (Maple helped me a lot here):
$$\frac{f_n(x)}{f(x)}=1-\frac{P(x)}{12n}+\frac{Q(x)}{24n^2}+R_n(x).$$
where $P(x)=3x^2+5x-4$, $Q(x)=x^4+6x^3+x^2-8x+2$ and
$|R_n(x)|\leq C/n^3$ for some positive constant $C$ and for all $x\in [0,1].$
Hence there is $n_0$ such that for $n>n_0$ the sequence $\{f_n(x)\}_{n\geq 0}$ is decreasing for $x\in [0,x_0)$ and it is increasing for $x\in [x_0,1]$ where $x_0=(-5+\sqrt{73})/6$ is the root of $P$ in $[0,1]$ (at $x_0$ it is increasing because $Q(x_0)<0$ ).
A: Here is my attempt to show uniform convergence, but I'm uncomfortable with the use of big-oh notation, so I'd welcome feedback. In any case, I think something like this must be the right approach, and hope it helps.
First I will show that the $f_n$ converge pointwise to $f(x)=\frac{1}{2}e^xx(1-x)$, as you say. The analysis provides estimates that help in establishing uniformity.
Write $f_n$ as
$$f_n(x)=ne^x\left(\frac{\big(1+x(e^{1/n}-1)\big)^n}{e^x}-1\right)$$
Define
$$g(x):=\big(1+x(e^{1/n}-1)\big)^n=\exp\left[n\ln\big(1+x(e^{1/n}-1)\big)\right]$$
so that
$$f_n(x)=ne^x\left(\frac{g(x)}{e^x}-1\right)$$
We must analyze the term in parentheses. Using
$$\ln(1+x)=x-x^2/2+O(x^3)$$
when $-1<x\leq1$, and noting that for $x\in[0,1]$, $|x(e^{1/n}-1)|=x(e^{1/n}-1)<1$ for $n>1$, we see $g$ can be written
$$g(x)=\exp\left[n\big(x(e^{1/n}-1)-x^2(e^{1/n}-1)^2/2+O(x^3(e^{1/n}-1)^3)\big)\right]$$
Now we use
$$e^{1/n}=1+1/n+1/2n^2+O(1/n^3)$$
to write
\begin{align}
g(x)&=\exp\left[n\left(x/n+x/2n^2+O(x/n^3)-x^2/2n^2+O(x^2/n^3)+O(x^3/n^3)\right)\right]\\
&= \exp\left[x+x/2n-x^2/2n+O(x/n^2)\right]
\end{align}
Therefore
$$g(x)/e^x=\exp(x/2n-x^2/2n+O(x/n^2))=1+x/2n-x^2/2n+O(x/n^2)$$
so
$$g(x)/e^x-1=x/2n-x^2/2n+O(x/n^2)$$
Putting this all together, we have
$$f_n(x)=ne^x\big(x/2n-x^2/2n+O(x/n^2)\big)=e^x\big(x/2-x^2/2+O(x/n)\big)\to \frac{1}{2}e^xx(1-x)$$
as $n\to\infty$.
Now consider
$$d(n)=\sup_{x\in[0,1]}\left|f_n(x)-f(x)\right|$$
For uniform convergence we need to show $d\to0$ as $n\to\infty$. But the calculation above shows there is some constant $C$ so that $|f_n(x)-f(x)|$ is bounded above by $Cxe^x/n$, which on $[0,1]$ is at most $Ce/n$, which in turn tends to zero as $n\to\infty$. The result follows by the squeeze theorem.
