Question:
Find the value of $\tan ^{-1}\left(\frac{x}{y}\right)-\tan ^{-1}\left(\frac{x-y}{x+y}\right)$
Solution:
We know
$\tan ^{-1} x-\tan ^{-1} y=\tan ^{-1} \frac{x-y}{1+x y}, x y>-1$
Now,
$\tan ^{-1}\left(\frac{x}{y}\right)-\tan ^{-1}\left(\frac{x-y}{x+y}\right)$
$=\tan ^{-1}\left\{\frac{\frac{x}{y}-\frac{x-y}{x+y}}{1+\frac{x}{y}\left(\frac{x-y}{x+y}\right)}\right\}$
$=\tan ^{-1}\left\{\frac{\frac{x^{2}+x y-x y+y^{2}}{y(x+y)}}{\frac{x^{2}+y^{2}+x y-x y}{3(x+y)}}\right\}$
$=\tan ^{-1} 1$
$=\tan ^{-1}\left(\tan \frac{\pi}{4}\right)$
$=\frac{\pi}{4}$
$\therefore \tan ^{-1}\left(\frac{x}{y}\right)-\tan ^{-1}\left(\frac{x-y}{x+y}\right)=\frac{\pi}{4}$