# applying weierstrass test of uniform convergence of sequence of functions

consider $f_n(x)$=$\frac{nx}{1+nx^2}$ suppose we talk about it's uniform convergence on [0,$\infty$)

now, $f_n(x)\to f(x)$, where $f(x)=\begin{cases} \frac{1}{x}, & \text{if } x \neq 0 \\[2ex] 0, & \text{if } x=0. \end{cases}$

Now, I am sure that $f_n(x)$ is not uniformly convergent to $f(x)$ on $[0,\infty)$ by using uniform limit theorem. But, instead I want to show non uniform convergence in $[0,\infty)$ using Weierstrass test only. Now, I am stuck on what is $M_n =\sup\{\left\lvert f_n(x)-f(x)\right\rvert\}$, where supremum is taken over $[0,\infty)$, please give answer in detail.

If $x>0$ then $$f_n(x) = \frac{nx}{1+nx^2} = \frac x{\frac1n+x^2} \stackrel{n\to\infty}\longrightarrow \frac1x,$$ and $f_n(0)=0$, so $f_n$ converges pointwise to $$f(x) = \frac1 x\chi_{(0,\infty)}(x).$$ From $$f_n'(x) = \frac{n(1+nx^2)-nx(2nx)}{(1+nx^2)^2}$$ and $$n(1+nx^2)-nx(2nx)=0 \iff x=n^{-\frac12}$$ we see that that $$\sup_{x\in[0,\infty]}\left|f_n(x)-\frac1x\right|= \left| n^{-\frac12} -\frac1x\right|\stackrel{n\to\infty}\longrightarrow \infty,$$ from which we conclude that $f$ does not converge uniformly. Indeed, as $$\sum_{n=1}^\infty n^{-\frac12}$$ does not converge, if follows that $f_n$ does not satisfy the conditions of the Weierstrass $M$-test.
$$f_n(1/n)-f(1/n) = \frac{n(1/n)}{1+n(1/n)^2} -n = \frac{1}{1+ (1/n)} -n \to -\infty.$$
It follows that $\sup |f_n-f| \to \infty,$ which shows uniform convergence fails in a big way.