Shouldn't tan(π/2) = ∞? We will first prove that $\sin(x)/\cos(x) = \tan(x)$.
By definition, $\sin(x) = O/H$, $\cos(x) = A/H$ and $\tan(x) = O/A$, where $O$,$A$ and $H$ are the opposite, adjacent and hypotenuse of a right angled triangle.
$\sin(x)/\cos(x) = O/H ÷ A/H = O/H × H/A = OH/AH = O/A = \tan(x)$
So $\tan(π/2) = \sin(π/2)/\cos(π/2) = 1/0$, which is undefined. However, we know that it can either be $∞$ or $-∞$. Therefore, $\tan(π/2)$ is equal to $∞$ or $-∞$.
If $\tan(π/2) = -∞$, then the limit of $\arctan(x)$ as $x$ approaches $-∞$ should equal $π/2$. However, it equals $-π/2$ instead. Therefore, $\tan(π/2)$ cannot be $-∞$, so it must be $∞$.
Is there any mistake in my working?

What @ultralegend5385 has said is pretty much correct. You cannot define $\infty$ as undefined (ie, $\infty$ ≠ undefined). The term undefined basically denotes that the value does not exist, whereas $\infty$ is way of saying something is endless.
For example, say an arbitrary function $f(x)$ has the domain (-$\infty$, $\infty$). It's just stating the function is endless. Now, that is not the same as being undefined, is it?
From what I believe, you might be looking for the word asymptote or asymptotic in terms of a graph:
The graph of $y = \tan{x}$ has the first, positive asymptote at $\frac{\pi}{2}$ and then for every $\pm \pi$ recurring after that.

