$\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


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


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?

  • 1
    $\begingroup$ 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. $\endgroup$
    – Ma Joad
    Nov 16, 2019 at 3:06
  • $\begingroup$ Use $$\tan^{-1}(-z)=-\tan^{-1}z$$See math.stackexchange.com/questions/1837410/… $\endgroup$ Nov 16, 2019 at 5:53
  • $\begingroup$ sorry but I didn't get you, $x=0$, $y=0$ is satisfying the original equation. $\endgroup$ Nov 16, 2019 at 5:55
  • $\begingroup$ 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).$ $\endgroup$
    – Allawonder
    Nov 16, 2019 at 6:27

1 Answer 1


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.

  • $\begingroup$ The claim that you can't take $x$ or $y$ to be negative is wrong! Take $x=y=-100,$ for example. $\endgroup$
    – Allawonder
    Nov 16, 2019 at 6:29
  • $\begingroup$ 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. $\endgroup$ Nov 16, 2019 at 6:30
  • $\begingroup$ ok yeah, you were correct, at the last I did mistake, but I have updated my answer now. $\endgroup$ Nov 16, 2019 at 6:32
  • $\begingroup$ 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? $\endgroup$
    – Allawonder
    Nov 16, 2019 at 6:33
  • $\begingroup$ bro, I am saying "all" real, $\endgroup$ Nov 16, 2019 at 6:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .