Since $\tan(25\pi/2)$ is undefined, and $\cot x = \frac{1}{\tan x}$, then why isn't $\cot(25\pi/2)$ undefined instead of $0$? I'm working through James Stewart's Precalculus, and I have some confusion regarding this question: "Find the exact value of the trigonometric function at the given real number: $\cot \frac{25\pi}2$." 
So, easy enough... $\frac{25\pi}2$ is simply a multiple of $\pi\over2$. $\cot$ is undefined at intervals of $n\pi$ where $n$ is any integer, and the value of $\cot$ at $\pi\over2$ is $0$, as evidenced by the graph below: 
Now comes the part, that befuddles me: working it out algebraically, I do the following.
$$\begin{align}
\cot \frac{25\pi}2 &= \cot \frac\pi2 \\[4pt]
&= \frac{1}{\tan(\pi/2)} \\[4pt]
&= \frac{1}{\text{undefined}}
\end{align}$$
The value of $\tan$ for $\pi\over2$ is, of course, undefined, as evidenced by the graph below: 

It is here that I get stuck: 

How is that $\cot$ is defined for that value when $\tan$ itself is not?

I would imagine that a numerator divided by a denominator of an undefined value would be undefined? Could anyone explain how the value of 0 for cotangent would be worked out in terms of tangent. Is it incorrect to relate cotangent and tangent like this:
$$cot = \frac1{tan}$$
I hope that makes sense and is not too a silly a question. 
Thanks in advance! 
 A: The standard definition of $\cot x$ is $\frac{\cos x}{\sin x}$. This happens to coincide with $\frac{1}{\tan x}$ whenever $\cos x \neq 0$. Defining $\cot x$ as $\frac{1}{\tan x}$ without mentioning this is just lazy. 
A: $\tan({\pi\over 2})$ is undefined because $\cos({\pi\over 2}) = 0$
But $$\cot \left({\pi\over 2}\right) = {\cos({\pi\over 2})\over\sin({\pi\over 2})} = {0\over 1} = 0$$ 
Now $\cot(\theta) = (\tan(\theta))^{-1}$  because 
$$\cot \left(\theta\right) = {\cos(\theta)\over\sin(\theta)} = \left({\sin(\theta)\over\cos(\theta)}\right)^{-1} = (\tan\left(\theta\right))^{-1}$$
it is not the other way around, just because $\tan^{-1}(\theta)$ works for most value does not make it the definition. 
A: $$ \cot \frac{25 \pi}{2}=  \frac{\cos (25 \pi/2)}{\sin (25 \pi/2)}= \frac{0}{1}=0$$
A: If you take the left limit of $1/tan$ you'll get $0$. If you take the right limit of $1/tan$ you will also get $0$, since you are dividing by really big things $\infty$ and $-\infty$ respectively. Since both limits agree, the limit exists and it's $0$.
