Question:
Write the value of $\tan ^{-1} x+\tan ^{-1}\left(\frac{1}{x}\right)$ for $x<0$.
Solution:
$\tan ^{-1} x+\tan ^{-1} y=\tan ^{-1}\left(\frac{x+y}{1-x y}\right)$
When $x<0, \frac{1}{x}<0$, then both are negative.
Let $x=-y, y>0$
Then,
$\tan ^{-1} x+\tan ^{-1} \frac{1}{x}=\tan ^{-1}(-y)+\tan ^{-1}\left(-\frac{1}{y}\right)$
$=-\left(\tan ^{-1} y+\tan ^{-1} \frac{1}{y}\right)$
$=-\tan ^{-1}\left(\frac{y+\frac{1}{y}}{1-y \frac{1}{y}}\right), y>0$
$=-\tan ^{-1}\left(\frac{y^{2}+1}{0}\right)$
$=-\tan ^{-1}(\infty)$
$=-\tan ^{-1}\left(\tan \frac{\pi}{2}\right)$
$=-\frac{\pi}{2}$
$\therefore \tan ^{-1} x+\tan ^{-1} \frac{1}{x}=-\frac{\pi}{2}, x<0$