Is the function $\tan(x)$ uniformly continuous in$ (-\pi/2,\pi/2)$ I'm convinced but a bit confused with the theorem that a continuous function in closed and bounded interval is uniform. As I check the same for $\tan(x)$, at least the graph says it is continuous in $(-\pi/2,\pi/2)$. According to the theorem, $\tan(x)$ is uniform.
But I know the fact that if a function has vertical asymptotes, it is not uniform. I do not know at which part I'm going wrong. Any help will be worth it. Regards.
 A: This is a good question. The function $f(x) = \tan x$ is typically defined on $(-\pi/2,\pi/2)$, and on this open interval it is not uniformly continuous since it has vertical asymptotes at $\pm\pi/2$. 
If we want to extend $f$ to the closed interval $[-\pi/2,\pi/2]$, we need to pick values for it at the endpoints, but no matter what real numbers we choose for the values of $f$ at the endpoints, the resulting function will not be continuous at $\pm\pi/2$ because of the asymptotes, and therefore it will not be uniformly continuous on $[-\pi/2,\pi/2]$.
A: As others said, $\tan(x)$ is not continuous at the points $\pm \frac{\pi}{2}$, because $\tan(x)$ is not defined at those values and in any neighborhood of those points, $\tan(x)$ becomes insanely large. So, it behaves very badly around those points and those are very serious singularities of the function.
In general, when the value of a function at a point $x=a$ tends to infinity, it can't be continuous anymore because by definition we have:
$$\forall M>0, \exists \delta>0: |x-a|<\delta \implies |f(x)|>M$$
Now to demonstrate that it can't be continuous, notice that for any $L \in \mathbb{R}$, a form of triangle inequality tells us:
$$\left| |f(x)|-|L| \right| \leq |f(x)-L|$$
Now if you take $M=|\frac{L}{2}|$, you will find a $\delta_0>0$ such that in the neighborhood $x \in (a-\delta_0,a+\delta_0)$:
$$0<\left||f(x)|-|\frac{L}{2}|\right|<|f(x)-L|$$
Therefore, $|f(x)-L|$ will never be smaller than $||f(x)|-|\frac{L}{2}||$ and the definition of continuity at $x=a$ fails for any $L$ when $$\epsilon <\left||f(x)|-|\frac{L}{2}|\right|$$
