Is $\cot(x)=\frac{1}{\tan(x)}$? I just found in some place say that $\cot(x)=\frac{1}{\tan(x)}$. 
If you think about it as a function they are definitely not same. but if you think about as a relation between angle in a right angle triangle and its side they will be equal. 
so the question is its right to say they are equal or not( at least pedagogically)?
Update:-
Even wolfram alpha and Desmos say they are not equal ( have different domain).
 A: we have $\cot(x)=\frac{\cos(x)}{\sin(x)}$ and $x\ne k\pi$ $k \in \mathbb{Z}$ and $\tan(x)=\frac{\sin(x)}{\cos(x)}$ and $x\ne \frac{2k+1)}{2}\pi$ and $$\frac{1}{\tan(x)}$$ is defined for all $x$ with $\tan(x) \ne 0$ and this is if $\sin(x)\ne 0$ if $x\ne k\pi$ with $x\in \mathbb{Z}$
A: It depends on your perspective. It is true that, in elementary mathematics, the two functions aren't the same because of domain issues.
However, in the realm of meromorphic functions, they are the same function. The explanation, briefly put, is that you add a “point at infinity” to the complex numbers, call it $\infty$, and declare that $1/0=\infty$ and $1/\infty=0$. You don't really need the complex numbers to do that; you can do it to the reals too, but then note that we don't distinguish between $+\infty$ and $-\infty$.
Until you learn about meromorphic functions, this may seem a bit ad hoc. That is why basic calculus books would rather avoid the issue.
A: The tangent is defined as $$\tan\alpha =\frac{\text{opposite}}{\text{adjacent}}=\frac{a}{b}=\frac{\sin~\alpha}{\cos~\alpha}$$
and the cotangent as 
$$\cot\alpha =\frac{\text{adjacent}}{\text{opposite}}=\frac{b}{a}=\frac{\cos\alpha}{\sin\alpha} $$
what leads us to 
$$\frac{\cos\alpha}{\sin\alpha} = \tan\left(\frac{\pi}{2} - \alpha\right) = \frac{1}{\tan \alpha} = \cot\alpha$$
so yes, they are equivalent.
The confusing thing about it is, that you would have to consider the roots of the cosine function, if you were evaluating the tangent function in the denominator before evaluating the fraction.
This is actually a big dissent between different (functional) programming languages, as there is actually no "right order" of evaluation. 
A: Pedagogically, we say that that equality holds. We have to fudge it a bit on where the functions are defined (which is sometimes achieved by allowing $\tan(x)$ to be infinite) but we generally say that that equality holds.
A: $$\cot x = \frac {\cos x}{\sin x} = \frac {1}{\frac {\sin x}{\cos x}} = \frac {1}{\tan x}$$
This is true only when $\cot x$ and $\tan x$ are defined.
This equation merely indicates that $\cot x$ and $\frac {1}{\tan x}$ are equal in value (when they are both defined, of course). It does not say that $\cot x$ and $\frac {1}{\tan x}$ are the same function.
A: I just encountered a similar issue in discussing the graph of the function  $ \ \log (x^2 \ - \ 3 x \ + \ 2) \ $ .  We usually say (and teach) that this equals $ \ \log( x \ - \ 1 ) \ + \ \log ( x \ - \ 2 ) \ $ , but the former function is defined on $ \ ( -\infty \ , \ 1 ) \ , \ ( 2  \ , \  \infty) \ $ , while the latter sum function is defined only on $ \ ( 2 \  , \ \infty) \ $ .  To say a bit differently what others have said here, the equation for an identity only has meaning when the expressions on both sides of the equation have defined values.  (It is easy to forget this in applying or teaching such equations, unfortunately.)  To paraphrase Yuxiao Xie on this page, the equation doesn't imply that the two expressions being equated represent exactly the same function (though, again, this often gets overlooked because of the ways in which we usually use such equations).
It is a bit like the equation in the definition for continuity of a function at a point*, $ \ \lim_{x \ \rightarrow \ a} \ f(x) \ = \ f(a) \ $ . In explaining this definition, we often point out that there are three conditions being required:  that $ \ f(x) \ $ be defined at $ \ x \ = \ a \ $ ; that the two-sided limit $ \ \lim_{x \ \rightarrow \ a} \ f(x) \ $ exists ; and finally, with the expressions on each side having a meaningful value, that these two values be the same.  (It's these sorts of "fussy" points that are sometimes vital in mathematics, as they can lead to pitfalls when neglected -- even though they may seem pedantic.)
$ * $ if you haven't had calculus yet, but are going to later on, you'll meet this early in the course
