Find the values of $\tan ^{-1} \sqrt{3}-\cot ^{-1}(-\sqrt{3})$ is equal to
(A) $\pi$
(B) $-\frac{\pi}{2}$
(C) 0
(D) $2 \sqrt{3}$
Let $\tan ^{-1} \sqrt{3}=x$. Then, $\tan x=\sqrt{3}=\tan \frac{\pi}{3}$ where $\frac{\pi}{3} \in\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$.
We know that the range of the principal value branch of $\tan ^{-1}$ is $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$.
$\therefore \tan ^{-1} \sqrt{3}=\frac{\pi}{3}$
Let $\cot ^{-1}(-\sqrt{3})=y$
Then, $\cot y=-\sqrt{3}=-\cot \left(\frac{\pi}{6}\right)=\cot \left(\pi-\frac{\pi}{6}\right)=\cot \frac{5 \pi}{6}$ where $\frac{5 \pi}{6} \in(0, \pi)$.
The range of the principal value branch of $\cot ^{-1}$ is $(0, \pi)$.
$\therefore \cot ^{-1}(-\sqrt{3})=\frac{5 \pi}{6}$
$\therefore \tan ^{-1} \sqrt{3}-\cot ^{-1}(-\sqrt{3})=\frac{\pi}{3}-\frac{5 \pi}{6}=\frac{2 \pi-5 \pi}{6}=\frac{-3 \pi}{6}=-\frac{\pi}{2}$
The correct answer is B