# What's the domain of $\frac{1}{\tan\left(x\right)}$?

On one hand, $$\frac{1}{\tan\left(x\right)}$$ is undefined for $$\tan(x)=0$$, but $$\tan(x)$$ itself is undefined for $$x=\frac{\pi}{2}$$. So, in this view, the domain should be $$\mathbb{R}\backslash \left\{\frac{\pi }{2}n,\:n\in \mathbb{Z}\right\}$$.
On the other hand, $$\frac{1}{\tan\left(x\right)}$$ can also be written as $$\frac{\cos\left(x\right)}{\sin\left(x\right)}$$, and this is only undefined when $$\sin\left(x\right)=0$$
• I'd say the second solution, as $\frac1{\tan x}=\cot x$, and the domain of the latter is $\mathbf R\smallsetminus\pi\mathbf Z$. – Bernard Mar 24 '19 at 0:31
• The expression $\frac{1}{\tan(x)}$ is computed by first computing the tangent, and the taking the reciprocal of the result. It is then defined when both operations are defined. The expression $\frac{\cos(x)}{\sin(x)}$, although returning the same values at the common points of definition, is a different one. Compare to computing the domain of $\frac{x^2-1}{x-1}$ vs the domain of $x+1$. – user647486 Mar 24 '19 at 0:35
The first answer is correct. $$\tan x = \frac{\sin x}{\cos x}$$ and so $$\frac{1}{\tan x}$$ can be written as $$\frac{\cos x}{\sin x}$$ provided you can actually take the reciprocal of both sides of the original equation. If they are undefined, like when $$x = \frac{\pi}{2}$$, taking the reciprocal is not a legal operation so the identity breaks down. It is true that $$\lim_{x \rightarrow \frac{\pi}{2}}\frac{1}{\tan x}$$ is defined and it's equal to $$\frac{\cos \frac{\pi}{2}}{\sin \frac{\pi}{2}}$$.