3

Suppose we want to calculate $\tan^{-1}x-\tan^{-1}y$ for $\forall~x,y$

We already know $\tan^{-1}x-\tan^{-1}y=\tan^{-1}\dfrac{x-y}{1+xy}$ for $x>0$ and $y>0$, but we will not make use of it as we have to prove for $\forall$ $x,y$

$$\tan^{-1}x-\tan^{-1}y=\theta\tag{1}$$

Let's find range of $\theta$, assuming $x$ and $y$ to be independent variables

$$\theta\in(-\pi,\pi)$$

Taking $\tan$ on both sides of equation $1$

$$\dfrac{\tan(\tan^{-1}x)-\tan(\tan^{-1}y)}{1+\tan(\tan^{-1}x)\cdot \tan(\tan^{-1}y)}=\tan\theta$$

$$\dfrac{x-y}{1+xy}=\tan\theta$$

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

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

$$\tan^{-1}(\tan\theta)=\begin{cases} \pi+\theta,&-\pi<\theta<\dfrac{-\pi}{2} \\ \theta,&-\dfrac{\pi}{2}<\theta<\dfrac{\pi}{2} \\ -\pi+\theta, & \dfrac{\pi}{2}<\theta<\pi \end{cases}$$

So

$$\theta=\begin{cases} -\pi+\tan^{-1}\dfrac{x-y}{1+xy},&-\pi<\theta<\dfrac{-\pi}{2} \\ \tan^{-1}\dfrac{x-y}{1+xy},&-\dfrac{\pi}{2}<\theta<\dfrac{\pi}{2} \\ \pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \dfrac{\pi}{2}<\theta<\pi \end{cases}$$

$$\tan^{-1}x-\tan^{-1}y=\begin{cases} -\pi+\tan^{-1}\dfrac{x-y}{1+xy},&-\pi<\tan^{-1}x-\tan^{-1}y<-\dfrac{\pi}{2} \\ \tan^{-1}\dfrac{x-y}{1+xy},&-\dfrac{\pi}{2}<\tan^{-1}x-\tan^{-1}y<\dfrac{\pi }{2}\\ \pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \dfrac{\pi}{2}<\tan^{-1}x-\tan^{-1}y<\pi \end{cases}$$

$$\tan^{-1}x-\tan^{-1}y=\begin{cases} -\pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \tan^{-1}x-\tan^{-1}y\in\left(-\pi,\dfrac{-\pi}{2}\right)\\ \tan^{-1}\dfrac{x-y}{1+xy},& \tan^{-1}x-\tan^{-1}y\in\left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)\\ \pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \tan^{-1}x-\tan^{-1}y\in\left(\dfrac{\pi}{2},\pi\right) \end{cases}$$

$$\tan^{-1}x-\tan^{-1}y=\begin{cases} -\pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \dfrac{x-y}{1+xy}\in\left(0,\infty\right)\\ \tan^{-1}\dfrac{x-y}{1+xy},&\dfrac{x-y}{1+xy}\in\left(-\infty,\infty\right)\\ \pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \dfrac{x-y}{1+xy}\in\left(-\infty,0\right) \end{cases}$$

$$\tan^{-1}x-\tan^{-1}y=\begin{cases} -\pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \dfrac{x-y}{1+xy}>0\\ \tan^{-1}\dfrac{x-y}{1+xy},&\dfrac{x-y}{1+xy}\in\left(-\infty,\infty\right)\\ \pi+\tan^{-1}\dfrac{x-y}{1+xy}, & \dfrac{x-y}{1+xy}\in\left(-\infty,0\right) \end{cases}$$

Let's take a look at first branch

$\dfrac{x-y}{1+xy}>0$, only in two following cases

Case $1$:

$x>y$ and $xy>-1$

In this case, L.H.S= $\tan^{-1}x-\tan^{-1}y$ will be positive as $\tan^{-1}$ is increasing function but R.H.S=$-\pi+\tan^{-1}\dfrac{x-y}{1+xy}$ is always negative because range of $\tan^{-1}$ is $\left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$. So we got contradiction in this case

Case $2$:

$x<y$ and $xy<-1$ $\implies$ $x<0$ and $y>0$ (just determining the sign of $x$ and $y$)

So in this case this branch looks perfectly valid.

Let's take a look at third branch

$\dfrac{x-y}{1+xy}<0$, only in two following cases

Case $1$:

$x<y$ and $xy>-1$

In this case, L.H.S= $\tan^{-1}x-\tan^{-1}y$ will be negative as $\tan^{-1}$ is increasing function but R.H.S=$-\pi+\tan^{-1}\dfrac{x-y}{1+xy}$ is always positive because range of $\tan^{-1}$ is $\left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$. So we got contradiction in this case

Case $2$:

$x>y$ and $xy<-1$ $\implies$ $y<0$ and $x>0$ (just determining the sign of $x$ and $y$)

So in this case this branch looks perfectly valid.

Let's take a look at second branch

This branch looks perfectly valid for all cases, but let's see if is it actually?

Case $1$: $x>0,y>0$, $x>y$

L.H.S is positive and R.H.S is also positive, perfectly valid.

Case $2$: $x>0,y>0$, $x<y$

L.H.S is negative and R.H.S is also negative, perfectly valid.

Case $3$: $x<0,y<0$, $x>y$

L.H.S is positive and R.H.S is also positive, perfectly valid.

Case $4$: $x<0,y<0$, $x<y$

L.H.S is negative and R.H.S is also negative, perfectly valid.

Case $5$: $x>0,y<0$, $xy>-1$ and $xy<0$

L.H.S is positive and R.H.S is also positive, perfectly valid.

Case $5$: $x>0,y<0$, $xy<-1$

L.H.S is positive and R.H.S is negative, got contradiction.

Case $7$: $x<0,y>0$, $xy<-1$

L.H.S is negative and R.H.S is positive, got contradiction.

Case $8$: $x<0,y>0$, $xy>-1$ and $xy<0$

L.H.S is negative and R.H.S is negative, perfectly valid.

So finally we can write

$$\tan^{-1}x-\tan^{-1}y=\begin{cases} -\pi+\tan^{-1}\dfrac{x-y}{1+xy}, &x<0 \text{ and } y>0 \text { and } xy<-1\\ \pi+\tan^{-1}\dfrac{x-y}{1+xy}, & x>0 \text{ and } y<0 \text { and } xy<-1\\ \tan^{-1}\dfrac{x-y}{1+xy},& \text{ otherwise } \end{cases}$$

One can also derive $\tan^{-1}x+\tan^{-1}y$ by the above formula

$$\tan^{-1} x+\tan^{-1} (-y)=\begin{cases} -\pi+\tan^{-1}\dfrac{x-y}{1+xy}, &x<0 \text{ and } y>0 \text { and } xy<-1\\ \pi+\tan^{-1}\dfrac{x-y}{1+xy}, & x>0 \text{ and } y<0 \text { and } xy<-1\\ \tan^{-1}\dfrac{x-y}{1+xy},& \text{ otherwise } \end{cases}$$

Replace $y$ by $-y$

$$\tan^{-1} x+\tan^{-1} (y)=\begin{cases} -\pi+\tan^{-1}\dfrac{x+y}{1-xy}, &x<0 \text{ and } -y>0 \text { and } -xy<-1\\ \pi+\tan^{-1}\dfrac{x+y}{1-xy}, & x>0 \text{ and } -y<0 \text { and } -xy<-1\\ \tan^{-1}\dfrac{x+y}{1-xy},& \text{ otherwise } \end{cases}$$

$$\tan^{-1} x+\tan^{-1} (y)=\begin{cases} -\pi+\tan^{-1}\dfrac{x+y}{1-xy}, &x<0 \text{ and } y<0 \text { and } xy>1\\ \pi+\tan^{-1}\dfrac{x+y}{1-xy}, & x>0 \text{ and } y>0 \text { and } xy>1\\ \tan^{-1}\dfrac{x+y}{1-xy},& \text{ otherwise } \end{cases}$$

N. F. Taussig
  • 76,571
user3290550
  • 3,452
  • Use $\arctan(-y)=-\arctan(y)$ and https://math.stackexchange.com/questions/1837410/inverse-trigonometric-function-identity-doubt-tan-1x-tan-1y-pi-tan – lab bhattacharjee Jan 03 '20 at 03:27

3 Answers3

3

Hint Prove the following formula valid for $x y\neq -1$ \begin{equation} \tan^{-1}(x)-\tan^{-1}(y) = \tan^{-1}\left(\frac{x-y}{1+x y}\right) + \frac{\pi}{4}(\operatorname{sgn}(x)-\operatorname{sgn}(y))(1 - \operatorname{sgn}(1+x y)) \end{equation} For this, let $f(x)$ and $g(x)$ be the left hand side and the right hand side respectively. When $y\ne 0$, note that $f'$ and $g'$ are defined and equal on ${\mathbb R}\setminus\{-1/y\}$ and that $f$ and $g$ have the same limits at $\pm\infty$.

Gribouillis
  • 14,188
-1

You must take principal value. In this case the principal value will be tan^(-1)(x-y)/(1+xy). Hope you know what principal value is.

user738426
  • 53
  • 3
-1

When X,Y $\gt$ 0 you can use principle form of $$tan^{-1}(X)-tan^{-1}(Y)=tan^{-1}(\frac{X-Y}{1+XY})$$ For either X or Y is negative then first use $$tan^{-1}(-a)=-tan^{-1}(a)$$ Then use formula accordingly. $$ $$ Either $$ tan^{-1}(X)-tan^{-1}(Y) $$ $$Or $$ $$tan^{-1}(X)+tan^{-1}(Y)$$