Domain of definition of function $\frac{1}{\tan x}$ We consider the real valued function $$f: x \mapsto \frac{1}{\tan x}$$ we know that the domain of definition of $x \mapsto \tan x$ is  $D_1=\mathbb{R}-\{\frac{\pi}{2}+k\pi, ~k\in \mathbb{Z}\}$,  we have $\frac{1}{\tan x}=\cot x$ moreover the domain of definition of $x \mapsto \cot x$ is  $D_2=\mathbb{R}-\{k\pi, ~k\in \mathbb{Z}\}$ so now when we want to determine the domain of definition of $f$ do we have to consider only $D_2$ of $\cot x$ since $f(x)=\cot x$ or $D_1\cap D_2$ since $f(x)=\frac{1}{\tan x}= f_1\circ f_2 (x)$ where $f_1= \frac{1}{x}$ and $f_2(x)=\tan x$?
Thanks 
 A: You have to consider $D_1 \cap D_2$ since $\tan x$ must both be defined and non-zero.Note the domain can be denoted in this simpler way:
$$\mathbf R\smallsetminus\frac\pi2\cdot\mathbf Z.$$
A: The domain for $f: x \mapsto \frac{1}{\tan x}$ is given by both the conditions


*

*$\tan x$ defined 

*$\tan x\neq 0$ 


that is $D_1\cap D_2$ while for 
$f: x \mapsto \cot x$ the domain is given simply by $D_2=\mathbb{R}\setminus\{k\pi, ~k\in \mathbb{Z}\}$.
As a simpler example consider
$$g(x)=\frac{1}{\frac1x}$$
which is equal to $x$ but is not defined for $x=0$.
A: Determining the domain is always a source of quarrels. ;-)
The identity
$$
\frac{1}{\tan x}=\cot x
$$
only holds for $x\ne k\pi/2$:


*

*for odd $k$, $\tan x$ is not defined;

*for even $k$, $\tan x=0$.


However, $\cot x$ is defined on $x=k\pi/2$ for even $k$. Indeed, the function
$$
f(x)=\frac{1}{\tan x}
$$
has a removable singularity at those points.
So it's a matter of conventions what the domain is.


*

*Most commonly, the domain is taken as the largest subset of the real numbers where the expression makes sense as written (so, for instance, $1/x^{-1}$ would not be defined at $x=0$);

*One might add to the domain the accumulation points of the set determined above on which the function is not otherwise defined but has a removable singularity and is assigned as value the limit (so with this convention, $1/x^{-1}$ would be defined at $0$).
Both conventions have merits and demerits. Be consistent (and follow what your instructor said).
Under the first convention, the function is defined on the reals except at the points of the form $k\pi/2$, for integer $k$.
Under the second convention, the function is defined on the reals except at the points of the form $k\pi$, for integer $k$.
On the other hand, such a determination is only significant when doing exercises on functions, so it's not worth too much trouble. I'm not questioning its value for learning the basic concepts, but when one does “real world mathematics” this concept loses significance.
