Why is $\tan(-\frac{\pi}{2})<\tan(x)<\tan(\frac{\pi}{2})$ equivalent to $-\infty<\tan(x)<\infty$? Why is $\tan(-\frac{\pi}{2})<\tan(x)<\tan(\frac{\pi}{2})$ equivalent to $-\infty<\tan(x)<\infty$? 
I get that $\tan(-\frac{\pi}{2})$ and $\tan(\frac{\pi}{2})$ are both undefined but why do they turn into negative and positive infinity?
 A: You are right to find this quite problematic as posed, from a mathematically strict view. First off, in the strict sense, one could consider the inequality
$$\tan\left(-\frac{\pi}{2}\right) < \tan(x) < \tan\left(\frac{\pi}{2}\right)$$
to actually be meaningless, if we are strictly working in the real number system alone, because $\tan\left(\pm \frac{\pi}{2}\right)$ are both undefined - i.e. the input to the tangent function is outside of its domain and hence it gives no value for either point.
Moreover, your second inequality is, likewise, meaningless as well, because there is no real number called "$\infty$" to compare to.
However, of course, there is a rather obvious intuitive gist that they are trying to get at with this inequality, but it requires a bit more formalism to understand and, in fact, even with that, it is not straightforward at all.
And that is that, "intuitively", we have that the graph of $\tan$ when its input ranges in the open interval $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$ looks something like a monotone curve, that grows arbitrarily far in both negative and positive directions:

Thus, we would, ideally, like to be able to try and extend it to the closed interval $\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$ and preserve that monotonic property. However, this runs into two chief problems. One of these is that there is no real number that we can put down at either $\pm \frac{\pi}{2}$ as the value of tangent that will keep monotonicity (and will certainly not keep continuity): since it goes arbitrarily far down and up, we would need values that are respectively below and above every real number. The other problem is that $\tan$ is periodic, and periodic in a way that even further complicates the notion of what the "best" value is to put at the endpoints.
The first problem can be handled, of course, by using the extended real number system, where we go in and affix some new "numbers" $\pm \infty$ to the real number system:
$$\mathbb{R}_\mathrm{ext} := \mathbb{R} \cup \{ \infty, -\infty \}$$
and where we extend the usual ordering relation with
$$-\infty < x < \infty$$
for all $x \in \mathbb{R}$.
Under this extension, the second inequality now makes sense:
$$-\infty < \tan(x) < \infty$$
when $x \in \left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$, if we interpret now the codomain of tangent to be $\mathbb{R}_\mathrm{ext}$. However, the problem here now is that the first inequality still doesn't work, because we have not define $\tan\left(\pm \frac{\pi}{2}\right)$.
And thus we come to the second problem. While, if we restrict ourselves to this range of $x$, we may find it reasonable to set
$$\tan\left(-\frac{\pi}{2}\right) := -\infty\ \ \ \ \ \mbox{and}\ \ \ \ \ \tan\left(\frac{\pi}{2}\right) := \infty$$
the "reasonableness" of this soon becomes harder to justify when we consider the full graph of the tangent function outside the interval just given:

Now, if you look to the immediate left and right, you see the monotone curve pattern repeats itself, and hence, while it may have looked before that, say, $-\infty$ makes sense when we look at it by looking toward the left of our first graph, there is no reason we can't also look at that point from the vantage point of looking toward the right of the piece of graph immediately to the left, i.e. the piece for for the interval $\left(-\frac{\pi}{2} - \pi, \frac{\pi}{2} - \pi\right)$, and if we do that, the situation, where that piece of graph rises arbitrarily (now infinitely?) far, the same as $\tan\left(\frac{\pi}{2}\right)$ when looked at toward the right in our original graph. Hence, by this argument, we would want to say that $\tan\left(-\frac{\pi}{2}\right) = +\infty$! It seems that even adding the points $\pm \infty$ to our real number system, is not sufficient to make this work!
So yes, the inequalities can be equivalent if you define things right, but then it's trivial as there isn't really any good reason to prefer those definitions to some other ones that would make the inequality false.
A: First, consider the domain of $\tan{x}$ for $x \in \mathbb{R}$, $x$ will at all time be like this :
$$-\frac{\pi}{2}+k\pi<x<\frac{\pi}{2}+k\pi \text{ where } k \in \mathbb{Z}$$
We know that $\tan{x}$ is a strictly increasing function on that interval and hence you could "apply" $\tan{x}$ on that inequality :
$$\tan{(-\frac{\pi}{2}+k\pi)}<\tan{x}<\tan{(\frac{\pi}{2}+k\pi)} \text{ where } k \in \mathbb{Z}$$
But because the terms on the left and on the right are not in the domain, we shall take the limit :
$$\lim_{x \to -\frac{\pi}{2}^+}\tan{x}<\tan{x}<\lim_{x \to \frac{\pi}{2}^-}\tan{x}$$
And this gives us what you're looking for!
A: I think I understand the confusion with this problem, and you are correct. $\tan\left(\pi/2\right)$ and $\tan\left(-\pi/2\right)$ are both undefined, but they are a special kind of underfined. They approach infinities of differing signs on either side of the asymptote. 
It says $\tan(-\pi/2)<\tan(x)<\tan(\pi/2)$ is equivalent to $-\infty<\tan(x)<\infty$, and this looks like they are saying that $\tan(-\pi/2)\equiv-\infty$ and $\tan(\pi/2)\equiv\infty$. This is inaccurate. 
Whoever wrote the problem may have bounded $x$ such that $-\pi/2<x<\pi/2$, and in that case it is (still incorrect) more acceptable to say that $\tan(\pi/2)=\infty$ and $\tan(-\pi/2)=-\infty$ for the following reason: $\tan(\pi/2)$ is a shorthand notation for 
$$\lim_{x\to \pi/2}\tan(x)$$
because the value of $\tan$ is underfined at $\pi/2$, so we must take the limit. If $x$ is defined for values greater than $\pi/2$, then there is ambiguity: to which side of the asymptote should we approach? But if  $-\pi/2<x<\pi/2$, then it is implied that we are taking the limit from the left side, so we choose the left limit as the limit itself. I cannot think of how the relationship would be defined if $x$ was not bounded to this interval, so I think this is how the author intended the problem to be interpreted.
A: They don't "turn into" negative or positive infinity. Indeed,
$$
\lim_{x\to 0} \tan(\pi/2 -x) = \infty,
$$
and similarly
$$
\lim_{x\to 0} \tan(-\pi/2 +x) = -\infty,
$$
and so the statement $-\infty<\tan(x)<\infty$ is equivalent to the statement $\tan(-\frac{\pi}{2})<\tan(x)<\tan(\frac{\pi}{2})$.
A: No, they don't turn into anything. Since the inequalities are still strict, the author is just using another notation for the same thing, and doesn't define $\tan$ still at $\pm π/2,$ the substantial difference now being that the behavior of the function as one approaches the 'endpoints,' so to say, of the interval, is now more emphasized.
But one doesn't even need to know what $\pm\infty$ represents in the limiting sense, and one can use any symbol of one's choice instead, emphasising that these symbols are mere placeholders, or notations for unbounded intervals. With that in mind I can write instead that $$-\chi<\tan x<\chi,$$ provided we both understand that whenever we use the symbol $\chi$ in inequalities (and only in strict inequalities), we mean to refer to an unbounded interval.
