There is a mistake. And the main problem is the notation. If we have a function $f$ that is 1-1 then we can think of it's inverse function $f^{-1}$. This notation can mislead people to the wrong impression that $f^{-1}(x)=1/f(x)$. That's not true! The function $f^{-1}$ is the function such that $f^{-1}(f(x))=x$ and $f(f^{-1}(y))=y$. For instance, let $f : \Bbb R \to \Bbb R$ be given by: $f(x)=\lambda x$. In that case, $f$ is obviously 1-1 with inverse $f^{-1}(x)=x/\lambda$. Notice that $f^{-1}(x) \neq 1/f(x)$.
In that case we define two things for $\tan$: the reciprocal function $\cot $ that is really defined by $\cot(x) = 1/\tan (x)$ and the inverse function $\arctan$ given by the property I've mentioned above. Take a look on my answer here about the same doubt involving $\sec$, it's the same issue and it may help you.
Good luck.