# Is $\tan^{-1}(-1) = 3\pi /4$ or $=7\pi /4$? I understand they're both valid solutions, but what about places where the value is added/subtracted?

For example: calculate $$\int^4_2 \tan^{-1} x \, dx$$

If $$\tan^{-1}(-1) = 3\pi /4$$, then the final answer is $$\frac{-\pi}{2}$$. But if $$\tan^{-1}(-1)= 7\pi /4$$, then the final answer would be $$\frac{3}{-4\pi}$$. Which is it?

The value of $$\arctan$$ is defined to lie within $$(-\pi/2,\pi/2)$$. Therefore the value should be $$-\pi/4$$.