how to show uniform convergence 
I don't understand why the function $f$ is uniformly convergent on $\mathbb{R}\setminus S$.
I mean it is clear to me that we have $$\frac{1}{|1+n^2x|}=\frac{1}{n^2}\frac{1}{|1/n^2+x|}\leq \frac{1}{n^2}\frac{1}{||x|-1/n^2|} $$ but how does this help me?
Somehow we have to use the Weierstrass m-test but I don't get that the term on the right is $<\sum \ \frac{1}{n^2}$.
 A: Edit: as I said in my comment, the series converges uniformly on every closed interval that doesn’t intersect $S$.
Choose a closed interval which doesn’t intersect $S$. Call this interval $I$. Then, since $S$ is closed and bounded, hence compact, and since $S$ and $I$ are disjoint, you have
$$\min\{|x-y|\;\colon\;x\in S,\;y\in I\}=d(S,I)=:a>0,$$
where the above quantity is the distance between sets (see distance between closed and compact set to see why we can write “$\min$“ instead of “$\inf$”).
Then, continuing the above inequalities, for all $x\in I$ you have
$$…\leq\frac{1}{n^2} \frac{1}{||x|-1/n^2|}\leq \frac{1}{n^2} \frac{1}{a},$$
and the last quantity does not depend on $x$. So you can estimate everything with the series of $1/n^2$.
A: You ask about why it helps to note that $$\frac{1}{|1+n^2x|}=\frac{1}{n^2}\frac{1}{|1/n^2+x|}\leq \frac{1}{n^2}\frac{1}{||x|-1/n^2|},$$
when $A$ is some constant satisfying $x \leq A <-1$. In this case we have $\frac1{n^2} \leq 1<|A|\leq |x|$. Therefore $$|x|-\frac1{n^2}\geq |A|-1>0.$$
$$\frac{1}{|1+n^2x|}\leq \frac{1}{n^2}\frac{1}{|x|-1/n^2}\leq \frac{1}{n^2}\frac{1}{|A|-1}=\frac{C_2}{n^2},$$
for some positive constant $C_2$.
A: Deleting set $S$ = {$y\in \mathbb{R} |y= \frac{-1}{n^2},n\in \mathbb{N} \}$ $\cup$ $\{0\}$ in your attached picture ensures that the denominator in $\frac{1}{|1+n^{2}x|}$ is non-zero therefore the function is well-defined for all $n\in \mathbb{N}$. Only then will taking the limit as n tends to infinity from $n=1$ to $\infty$ make sense. We add {0} to the definition of set $S$ since if $x=0$ then the given series diverges
Yes , we can use weierstrass M-test.  Notice for any $x \in \mathbb{R}\backslash S $ , we know $\frac{1}{n^2}$$\frac{1}{| |x|-(1/n^2)|}$ $\leq$ $\frac{1}{n^2}$$\frac{1}{|x|+|1/n^2|}$ $\leq$ $\frac{1}{n^2}$$\frac{1}{|x|}$ (by the triangle inequality). $\frac{1}{|x|}$ is a positive constant. Now recall that multiplying the terms of a convergent sequence with the constant does not affect convergence(i.e. it will still converge)
The sum to infinity, $\sum_{n=1}^{\infty}\frac{1}{n^2}\frac{1}{|x|} $ just means the limit of a sequence the partial sums $S_{n}$, where $S_{n} = \frac{1}{1^{2}}\frac{1}{|x|}+ \frac{1}{2^{2}}\frac{1}{|x|}+...+\frac{1}{n^{2}}\frac{1}{|x|}$ $=$ $\frac{1}{|x|}(\frac{1}{1^2}+\frac{1}{2^2}+...+\frac{1}{n^2})$.
We know the sequence $S^{'}_n$ = $\frac{1}{1^2}+\frac{1}{2^2}+...\frac{1}{n^2}$ converges by p-series test. This implies $S_n$ converges ( i.e. $\sum^{\infty}_{n=1} \frac{1}{n^2}\frac{1}{|x|}$ exists).
Select the x as the infimum of $|x|$ on the given the closed bounded interval in the given set $ \mathbb{R} \backslash S$. Then apply the Weierstrass M-Test. Thus it converges uniformly on every closed bounded interval in $ \mathbb{R} \backslash S$ (As @311411 and @Lorenzo Pompili stated).
