How to decide the value of $\arctan x$ in a definite integral? 

This is my question. When it gets the upper bound of $\tan^{-1}(1)$ and lower bound of $\tan^{-1}(-1)$, how does he know $\tan^{-1}(-1)$ is equal to $-\frac{\pi}{4}$ rather than $\frac{3\pi}{4}$, and $\tan^{-1}(1)$ is equal to $\frac{\pi}{4}$ rather than $\frac{5\pi}{4}$?
I've tried to let $\tan^{-1}(1)$ equal to $\frac{\pi}{4}$, and $\tan^{-1}(-1)$ equal to $-\frac{\pi}{4}$, it seems work well except the result is different from the solution.
 A: $\tan^{-1}$ is a function and so it must be defined in a unique way. By convention, $\tan^{-1}(x)$ is the only real number $\theta$ such that $x=\tan \theta$ but also
$$-\frac{\pi}{2}< \theta < \frac{\pi}{2}$$
A: 
how does he know $\tan^{−1}(−1)$ is equal to $−\fracπ4$ rather than $\frac{3π}4$

The definition of $\arctan$ is basically a matter of convention and convenience.  The usual definition of $\arctan$ is such that:

*

*It is an odd function.


*It is continuous.


*The value it produces are the smallest possible (by absolute value), namely in the range $(-\frac\pi2,\frac\pi2)$.
Using the usual definition of $\arctan$, you could define the inverse of $\tan$ to be
$$t(x) = \begin{cases}
\arctan x, &\text{ if } x \geqslant 0 \\
\pi+\arctan x, &\text{ if } x < 0 \\
\end{cases}$$
so that $t(-1)=3\pi/4$.
Then $t(x)$ does not have any of the nice properties of $\arctan$ from above. So while you could use $t$, it's the case that $\arctan$ is usually much more convenient, for example it has a simple power series for $|x|\leqslant1$:
$$\arctan x=\sum_{n=0}^\infty(-1)^n\frac{x^{2n+1}}{2n+1}$$
or you can represet is as integral like
$$\arctan x=\int\limits_0^x \frac1{1+t^2} dt$$
