Conditions for trigonometric identity $\tan^{-1}x-\tan^{-1}y=\tan^{-1}\dfrac{x-y}{1+xy}$, $x>0$,$y>0$

$$\tan^{-1}x-\tan^{-1}y=\tan^{-1}\dfrac{x-y}{1+xy}$$, $$x>0$$,$$y>0$$

This is the standard trigonometric identity for $$x>0$$,$$y>0$$

Now I want to know why it can't be $$x>=0,y>=0$$

To know that, I tried to prove for $$x>=0,y>=0$$ just to see if I get any contradiction

$$\tan^{-1}x\in\left[0,\dfrac{\pi}{2}\right)$$, $$\tan^{-1}y\in\left[0,\dfrac{\pi}{2}\right)$$

So $$\tan^{-1}x-\tan^{-1}y\in\left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$$ $$A=\tan^{-1}x,B=\tan^{-1}y$$ $$\tan A=x,\tan B=y$$

$$\tan(A-B)=\dfrac{\tan A-\tan B}{1+\tan A\tan B}$$ $$\tan(A-B)=\dfrac{x-y}{1+xy}$$

Taking $$\tan^{-1}$$ on both sides

$$\tan^{-1}(\tan(A-B))=\tan^{-1}\dfrac{x-y}{1+xy}$$

As $$A-B \in \left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$$

$$A-B=\tan^{-1}\dfrac{x-y}{1+xy}$$

So I didn't get any contradiction during the entire result. So is $$x=0$$ or $$y=0$$ not taken in domain to avoid corner conditions or there is something else?

• This is, of course, true for $x=0$. You don't even need to prove it - just substitute $x=0$ into the original formula. Your proof is fine. Nov 16, 2019 at 3:06
• Use $$\tan^{-1}(-z)=-\tan^{-1}z$$See math.stackexchange.com/questions/1837410/… Nov 16, 2019 at 5:53
• sorry but I didn't get you, $x=0$, $y=0$ is satisfying the original equation. Nov 16, 2019 at 5:55
• Why do you think that this is invalid for some negative values of $x,y$? Indeed it is, too! The only time it is invalid is when $x,y$ are such that $\arctan x-\arctan y$ falls outside the range $(-π/2,π/2).$ Nov 16, 2019 at 6:27

Just to add we can't take $$x$$ as any arbitary R(real), $$y$$ as any arbitary(real) because of the following issue.

$$A=\tan^{-1}x$$, $$B=\tan^{-1}y$$

if $$x\in R$$, $$\tan^{-1}x \in \left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$$

if $$y\in R$$, $$\tan^{-1}y \in \left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$$

So $$\tan^{-1}x-\tan^{-1}y \in (-\pi,\pi)\tag{1}$$

But for $$\tan^{-1}x-\tan^{-1}y=\tan^{-1}\dfrac{x-y}{1+xy}$$ to be valid, $$\tan^{-1}x-\tan^{-1}y \in \left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$$

But we had $$\tan^{-1}x-\tan^{-1}y \in (-\pi,\pi)$$ in equation $$(1)$$

So we can't take $$x$$ as any arbitary real. Just thought to mention it because one will not find this in many textbooks. May be this would be of some help to beginners.

• The claim that you can't take $x$ or $y$ to be negative is wrong! Take $x=y=-100,$ for example. Nov 16, 2019 at 6:29
• I am not claiming that x cann't be negative, I am just claiming that we can't allow $x\in R$. Just see the proof again. Nov 16, 2019 at 6:30
• ok yeah, you were correct, at the last I did mistake, but I have updated my answer now. Nov 16, 2019 at 6:32
• On the contrary you do. In any case we have to allow $x,y$ to be real, otherwise what do we mean by $\arctan x$ otherwise, for example? Nov 16, 2019 at 6:33
• bro, I am saying "all" real, Nov 16, 2019 at 6:33