Is this demonstration of uniform convergence sufficient? Let's have $f_n(x)$ defined on $\mathbb{R}$ by:


*

*$f_n(0)=0$

*$f_n(x)=\frac{1-e^{-nx^2x^2}}{x}$if $x\neq 0$


$f_n(x)\rightarrow \frac{1}{x}$
therefore, $f_n(x)$ converges weakly to $\frac{1}{x}$
\begin{align}
\lim\limits_{x\rightarrow +\infty}\sup\limits_{n\in I}{|f_n(x)-f(x)|}&=\lim\limits_{x\rightarrow +\infty}\sup\limits_{n\in I}{|\frac{1-e^{-n^2x^2}}{x}-\frac{1}{x}|}\\
&=\lim\limits_{x\rightarrow +\infty}|\frac{1}{x}-\frac{1}{x}|\\
&=0
\end{align}
Hence $f_n(x)$ uniformly-converges.
I'm not sure about my demostration of uniform convergence when I change $|f_n(x)-f(x)|$. Can you tell me if I can improve it?
 A: For the sequence $f_n(x)$ to be uniformly convergent for $x\in \mathbb{R}$, one requires that
$$\lim_{n\to \infty}\sup_{x\in\mathbb{R}}\left|f_n(x)-f(x)\right|=0 \tag 1$$
However, we have 
$$f_n(x)=\begin{cases}
\frac{1-e^{-n^2x^2}}{x}&,x\ne 0\\\\
0&,x=0
\end{cases}$$
and therefore
$$\begin{align}
f(x)&=\lim_{n\to \infty}f_n(x)\\\\
&=\begin{cases}
\frac1x&,x\ne 0\\\\
0&,x=0
\end{cases}
\end{align}$$
Since the limit function is discontinuous at $x=0$, then $f_n(x)$ is not uniformly continuous on any interval that either contains $0$ or has $0$ as a limit point.
To see that $(1)$ is violated, we simply note that for $x=1/n$ we have
$$\begin{align}
\sup_{x\in\mathbb{R}}\left(\left|\frac{1-e^{-n^2x^2}}{x}-\frac1x\right|\right)&=\sup_{x\in\mathbb{R}}\left(\frac{e^{-n^2x^2}}{|x|}\right)\\\\
&\ge n/e\to \infty
\end{align}$$
A: The reason why your argument doesn't work is that you assumed that 
$$
\lim_{n \to \infty} \sup_{x \in \mathbb R} \left| f_n(x) - f(x) \right| =\sup_{x \in \mathbb R}  \lim_{n \to \infty} \left| f_n(x) - f(x) \right|,
$$
which is essentially asking that pointwise convergence and uniform convergence are equivalent (because you computed the limit inside pointwise), and this is definitely not the case. (By the way, you swapped the roles of $x$ and $n$ in your computations.) You should always be careful when you try to pull in limits inside things like supremum or series ; in general, you should worry about commuting any two operations (limits, series, supremums/infimums, etc.) applied on some entity. 
The key to determining uniform convergence is to bound the quantity
$$
\left| f_n(x) - f(x) \right|
$$
by something independent of $x$ (in other words, find an upper bound for the supremum, it can be a function of $n$ in this case since $\sup_{x \in \mathbb R} |f_n(x) - f(x)|$ does depend on $n$ after all) and then make sure this bound goes to zero as $n$ goes to infinity. 
Hope that helps,
