Derive the conditions $xy<1$ for $\tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy}$ and $xy>-1$ for $\tan^{-1}x-\tan^{-1}y=\tan^{-1}\frac{x-y}{1+xy}$ 
$$
\tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy} \text{, }xy<1\\
\tan^{-1}x-\tan^{-1}y=\tan^{-1}\frac{x-y}{1+xy} \text{, }xy>-1
$$

But, How do I reach the conditions $xy<1$ for the first expression and $xy>-1$ for the second from the domain and range of the functions, provided we are only considering the principal value branch ?
My Attempt
$$
\tan^{-1}:\mathbb{R}\to \Big(\frac{-\pi}{2},\frac{\pi}{2}\Big)
$$
$$
\text{Taking, }\alpha=\tan^{-1}x, \quad\beta=\tan^{-1}y\implies x=\tan\alpha,\quad y=\tan\beta\\
\tan(\alpha+\beta)=\frac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta}=\frac{x+y}{1-xy}\\
\text{We have, }-\pi<\tan^{-1}x+\tan^{-1}y=\alpha+\beta<\pi
$$
If $\tfrac{-\pi}{2}<\alpha+\beta<\tfrac{\pi}{2}$ we have, 
$$
\alpha+\beta=\tan^{-1}\bigg(\frac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta}\bigg)\implies \tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy}
$$
For the first expression, $xy\neq{1}$ as the denominator can not be equal to zero.
$$
\frac{-\pi}{2}<\tan^{-1}\frac{x+y}{1-xy}<\frac{\pi}{2}\text{ and }-\pi<\tan^{-1}x+\tan^{-1}y<\pi\\\implies\frac{-\pi}{2}<\tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy}<\frac{\pi}{2}
$$
I really dont see any clue which leads to the condition $xy<1$. I checked a similar question asked Inverse trigonometric function identity doubt, but it does not seem to clear how to get to the given conditions from the above proof.
Note: I am not looking for proving the statement is correct. I'd like to see how to reach the given conditions from the domain and range of the functions involved.

We prove $xy<1$ for $\tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy}$. The other inequality is likewise. Suppose not. Therefore $xy>1$. The case $xy=1$ would be discussed later. Also the case where at least one of them is zero is trivial, so we assume both to be nonzero. Then we have four cases to check:
Case 1: $x,y>0$ so $\frac{x+y}{1-xy}<0$
$$0<\tan^{-1}x+\tan^{-1}y<\pi$$$$-\frac{\pi}{2}<\tan^{-1}\frac{x+y}{1-xy}<0$$
$$\to\tan^{-1}x+\tan^{-1}y\ne\tan^{-1}\frac{x+y}{1-xy}$$
Case 2: $x,y<0$ so $\frac{x+y}{1-xy}>0$
$$-\pi<\tan^{-1}x+\tan^{-1}y<0$$$$0<\tan^{-1}\frac{x+y}{1-xy}<\frac{\pi}{2}$$
$$\to\tan^{-1}x+\tan^{-1}y\ne\tan^{-1}\frac{x+y}{1-xy}$$
Case 3: $x>0,y<0$ and $x+y<0$
$$-\frac{\pi}{2}<\tan^{-1}x+\tan^{-1}y<0$$$$0<\tan^{-1}\frac{x+y}{1-xy}<\frac{\pi}{2}$$
$$\to\tan^{-1}x+\tan^{-1}y\ne\tan^{-1}\frac{x+y}{1-xy}$$
Because of symmetry that's exactly the case where $x<0,y>0$ and $x+y<0$.
Case 4: $x>0,y<0$ and $x+y>0$
$$0<\tan^{-1}x+\tan^{-1}y<\frac{\pi}{2}$$$$-\frac{\pi}{2}<\tan^{-1}\frac{x+y}{1-xy}<0$$
$$\to\tan^{-1}x+\tan^{-1}y\ne\tan^{-1}\frac{x+y}{1-xy}$$
Because of symmetry that's exactly the case where $x<0,y>0$ and $x+y>0$.
Here we deduce that $\tan^{-1}x+\tan^{-1}y\ne\tan^{-1}\frac{x+y}{1-xy}$ where $xy>1$. The case $xy=1$ is either $xy=1^-$ or $xy=1^+$. Here since $x={1\over y}$ we investigate 2 cases:
Case 1: $x>0$
Then $\tan^{-1} x+ \tan^{-1} \frac{1}{x}=\frac{\pi}{2}$ which leads to $xy=1^-$ since $$\tan^{-1} \frac{x+y}{1-xy}=\tan^{-1} \frac{x+y}{1-1^-}=\tan^{-1} +\infty=\frac{\pi}{2}$$
Case 2: $x<0$
This case similarly gives us $xy=1^+$.
Also you can prove $xy>1$ for $\tan^{-1}x-\tan^{-1}y=\tan^{-1}\frac{x-y}{1+xy}$ by substituting $y\to -y$.
