$\tan(\pi/2)$ is undefined but $\cot(\pi/2)$ is defined We know that $\tan(\pi/2)$ is undefined, and $\cot(\pi/2) = 0$. But $\cot(x) = \frac{\cos(x)}{\sin(x)} = \frac{1}{\tan(x)}$. So how is it possible that for some value $x$, $\tan(x)$ is undefined but $\,1/\tan(x)$ is defined?
 A: The identity $\cot(x) = \frac{1}{\tan(x)}$ only works where they are both defined. Really, this isn't some sort of definition, but rather a consequence of the fact that 
$$
\tan(x) = \frac{\sin(x)}{\cos(x)}, \quad \cot(x) = \frac{\cos(x)}{\sin(x)}
$$
and if you treat these functions as variables, then it is clear that the identity holds. But this isn't completely accurate, and as you have noted, it doesn't hold for $x$ being an integer multiple of $\frac{\pi}{2}$. In the field of algebraic geometry an identity like $\cot(x) = \frac{1}{\tan(x)}$ would be called a birational equivalence, rather than equality, to reflect this fact. It means the functions are equal wherever they are defined (and that they are defined almost everywhere).
If there is some sort of intuition to get out of this, it could be that $\cot(x)$ and $\frac{1}{\tan(x)}$ can be considered mostly equal as functions, but not necessarily when as evaluations at specific points. So as long as you are manipulating expressions where the functions act like variables, you can consider them equal, but add the constraint $x \neq \frac{n\pi}{2}$ as you go along to help reminding yourself that it is not always true.
A: Why we say $\tan(\pi/2)$ is undefined. Since $\frac{\sin(\pi/2)}{\cos(\pi/2)}$ and $\cos(\pi/2)=0$, we should say $\tan(\pi/2)$ is undefined. Note that $\frac{*}{0}$ always is undefined.
A: *

*$\tan$ and $\cot$ have different domains.


*$\cot x\equiv\dfrac1{\tan x}.$
This is an identity, and reads: $\cot x=\dfrac1{\tan x}$ is universally true wherever both functions are defined.
User SassatelliGiulio's comment nicely sums it up: “$\cot x=\frac1{\tan x}$ is an identity that holds in the intersection of the domains. It shouldn't be read as implying that the functions have the same domain.”
Alternatively, we can define $\cot x:=\dfrac1{\tan x},$ stipulating the domain of $\cot$ as $\{x\in\mathbb R\mid \forall n{\in}\mathbb Z\;x\ne n\pi\}.$
