I have to decide if the function $\arctan \frac{1}{x}$ is uniformly continuous in $(-1,0) \cup (0,1)$.
The function is defined and continuous in $(-1,0) \cup (0,1)$ and it can be extended to $x=1$ putting $f(x=1) =\frac{\pi}{4}$ and to $x=-1$ putting $f(x=-1) =-\frac{\pi}{4}$.
Unfortunately there's no way to eliminate the discontinuity in $x=0$ because $\lim_{x\rightarrow 0^+} f(x)=\frac{\pi}{2}$ and $\lim_{x\rightarrow 0^-} f(x)=-\frac{\pi}{2}$.
So I can't find and extention of the function continuous in a compact interval to apply Weierstrass and then the theorem of extention.
Can someone help me to understand how to solve the problem?
It is easy to see that for all $x \in (0,1)$, you have $$f(x) \geq \frac{\pi}{4}$$
and that for all $y \in (-1,0)$, you have $$f(y) \leq -\frac{\pi}{4}$$
Hence, for all $x \in (0,1)$ and $y \in (-1,0)$, you have $$|f(x)-f(y)| \geq \frac{\pi}{2}$$
In particular, you have $$\left|f\left(\frac{1}{n}\right)-f\left(-\frac{1}{n}\right)\right| \geq \frac{\pi}{2}$$
Can you conclude ?