Consider the following integral,
$$\mathrm{I} = \int\_{-1}^{1}\frac{d}{dx}\tan^{-1}\left(\frac{1}{x}\right)dx$$

We can do this in two ways,  

***First***  

Using the fact that the antiderivative of $\frac{d}{dx}\tan^{-1}\left(\frac{1}{x}\right)$ is simply $\tan^{-1}\left(\frac{1}{x}\right)$, it reduces to

$$ \mathrm{I} = \tan^{-1}(1) - \tan^{-1}(-1) = \frac{\pi}{4} - \left(-\frac{\pi}{4}\right) = \frac{\pi}{2}$$

Another way to this is using that $\tan^{-1}\left(\frac{1}{x}\right) = \cot^{-1}x$

Also notice that I've not balanced range (but it won't impact the integral)

$$\mathrm{I} = \int\_{-1}^{1}\frac{d}{dx}\cot^{-1}(x)dx$$

Use the fact that you know the derivative of $\cot^{-1}x$,

$$ = -\int\_{-1}^{1}\frac{dx}{1 + x^2} = -\left[\tan^{-1}(x)\right]\_{-1}^{1}$$
$$ = -\left[\tan^{-1}(1) - \tan^{-1}(-1)\right] = -\left[\frac{\pi}{4} - \left(-\frac{\pi}{4}\right)\right]$$

$$\mathrm{I} = -\frac{\pi}{2}$$

One method gives $\frac{\pi}{2}$ and other gives $-\frac{\pi}{2}$. Strange...  

(Please explain this sorcery)

**Notice that $tan^{-1} x$ is an inverse trigonometric function**