Uniform convergence of a sequence of function Let $\forall n \in \mathbb{N^*}$ $$ f_n(x) = \frac{ne^{-x}+x^2}{n+x} $$
I know by simple calculation that it pointwise converge to : $f(x)=e^{-x}, \forall x \in \mathbb{R} \setminus \{-n\}$
Now I want to show the uniform converge on a compact $[a,b]$ with $ a,b\in\mathbb{R}^+$, of that sequence using:
$$ \lVert f_n - f \rVert_\infty = \sup_{x \in [a,b]}{\lvert \frac{x^2 - xe^{-x}}{n+x} \rvert} $$
At that point I don't know what to do because the derivative is too complex to be usable and it seem hard to bound the norm with something function of n.
 A: You do not need to any derivative. Since $x^2-xe^{-x}$ is continuous, it preserves a bounded maximum, $M$,  and a bounded minimum, $m$, over $[a,b]$. Therefore for any $x\in [a,b]$ $$m<x^2-xe^{-x}<M$$hence$$|x^2-xe^{-x}|<\max\{M,-M,m,-m\}\triangleq K$$
$$|{x^2-xe^{-x}\over n+x}|\le {K\over n+x}<{K\over n+a}<\epsilon$$which implies that $$n>{K\over \epsilon}-a$$since the lower bound of $n$ is only a function of $\epsilon$ and not of $x$, the convergence is uniform $\blacksquare$
A: Over $\Bbb R$, it cannot be uniform, since 
$$
\Vert f_n - f \Vert_\infty = \sup_{\Bbb R} \left\vert \frac {x^2 - x\mathrm e ^{-x}} {n + x} \right\vert \geqslant \frac {n^4 - n^2 \mathrm e^{-n^2}} {n + n^2}, 
$$
where
$$
\left\vert \frac {n^2 \mathrm e^{-n^2}} {n^2 + n} \right\vert \leqslant e^{-n^2} \xrightarrow {n \to +\infty} 0, 
$$
and then 
$$
\Vert f_n - f \Vert_\infty = \sup_{\Bbb R} \left\vert \frac {x^2 - x\mathrm e ^{-x}} {n + x} \right\vert \geqslant \frac {n^4 - n^2 \mathrm e^{-n^2}} {n + n^2} \sim \frac {n^4}{n+n^2} \sim n^2 \xrightarrow {n\to +\infty} +\infty. 
$$
Therefore if $E$ is an infinite interval of the form $[a,+\infty )$, then it cannot converge uniformly. 
For a compact subset $K$ in $\Bbb R$, it is always bounded by some $[-M, M]$. If $K \cap (- \Bbb N^*) = \varnothing$, then $f_n$ is defined for every $n$; otherwise we start the sequence from, say, $n = \lfloor M + 2 \rfloor$, then these $f_n$'s are still defined in $K$. Either way, we could bound the numerator
$$
x^2 - x\mathrm e^{-x} 
$$ 
on $[-M, M]$ by continuity, and this bound is related only to $M$. Let it be $B$. Also on $[-M, M]$, whenever $n \geqslant \lfloor M+2 \rfloor > M+1$, $$n + x \geqslant n - M \geqslant M+1 - M > 0, $$ so
$$
\sup_{x \in K} |f_n - f| \leqslant \sup _{x \in [-M, M]} |f_n - f| \leqslant \frac {B} {n - M} \xrightarrow {n \to +\infty} 0.
$$
Therefore $(f_n)_{n = \lfloor M+2 \rfloor}^{+\infty} \rightrightarrows f$ on $K$ compact in $\Bbb R$. $\square$
A: On $[a,b],$
$$\left | \frac{x^2 - xe^{-x}}{n+x} \right | \le \frac{|x^2| + |xe^{-x}|}{n+x}\le \frac{b^2 + b\cdot 1}{n+x}$$ $$ \le \frac{b^2 + b}{n+0}= \frac{b^2 + b}{n} \to 0.$$
