Yesterday I encountered the following exercise in a tutorial sheet from the University of Lyon : define a sequence of functions $(f_n)$ (with $f_n:[0,\infty) \to {\mathbb R}$) by $f_n(x)=\big(1-\frac{x}{n}\big)^n$ if $x< n$ and $0$ otherwise. It is easy and well-known that $(f_n)$ converges pointwise to $f(x)=e^{-x}$, and the exercise asks to show that the convergence is in fact uniform.
I found a solution as I explain below, but given the context I expect that a simpler solution exists, which is why I post this here on MSE.
My solution : as ${\sup}_{x\in[0,n]}|f_n(x)-f(x)|=e^{-n}$, it suffices to show that $M_n={\sup}_{x\in[0,n]}|f_n(x)-f(x)|$ tends to zero when $n\to+\infty$. We have $M_n=\sup_{y\in[0,1]} |g_n(y)|$ where $g_n(y)=e^{-ny}-(1-y)^n$. Using the inequality $e^{-y} \geq 1-y$ for $y\in[0,1]$, we see that $g_n\geq 0$ and we can remove the absolute value : $M_n=\sup_{y\in[0,1]} g_n(y)$. Next, $g'_n(y)=n((1-y)^{n-1}-e^{-ny})$, so that $g'_n(y)=0$ is equivalent to $(*)_n :h(y)=-\frac{n}{n-1}$ where $h(y)=\frac{\log(1-y)}{y}$. As $h'(y)=\frac{-\frac{y}{1-y}-\log(1-y)}{y^2}\leq 0$, we see that $(*)_n$ has a unique solution $y_n\in[0,1]$. A little computation yields $y_n=\frac{2}{n}-\frac{2}{3n^2}+o(\frac{1}{n^2})$, whence $M_n=g(y_n)=\frac{2e^{-2}}{3n}+o(\frac{1}{n})$. So $(M_n)\to 0$ as wished.
Related : Uniform Convergence of an Exponential Sequence of Functions