<s>[INST] Explaining $\int_{-1}^1\frac{1}{1+x^2}\,dx = \frac{\pi}{2}$. How would you explain to a student that
$$ \int_{-1}^1\frac{1}{1+x^2}\,dx = \arctan(1) - \arctan(-1) = \frac{\pi}{2} $$
and not
$$ \int_{-1}^1\frac{1}{1+x^2}\,dx = \arctan(1) - \arctan(-1) \neq \frac{\pi}{4} - \frac{3\pi}{4} = -\frac{\pi}{2}$$
besides the obvious fact that $\arctan x$ cannot map to two distinct values?
 [/INST] We are actually using the substitution $x=\tan\theta$. 
$$ \int_{-1}^1\frac{1}{1+x^2}dx=\int_{\frac{-\pi}{4}}^{\frac{\pi}{4}} \left(\frac{1}{1+\tan^2\theta}\right)(\sec^2\theta)d\theta=\int_{\frac{-\pi}{4}}^{\frac{\pi}{4}} d\theta=\frac{\pi}{2}$$
We take the $\displaystyle \theta\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$ as $\tan\theta$ is differentiable in the range.
If we want to take $\displaystyle \theta=\frac{3\pi}{4}$, the interval cannot be $\displaystyle \left(\frac{\pi}{4},\frac{3\pi}{4}\right)$ as $\displaystyle \tan\frac{\pi}{2}$ does not exist.
We have to break down the interval as $\displaystyle \left(\frac{3\pi}{4},2\pi\right)$ and $\displaystyle \left(0,\frac{\pi}{4}\right)$ to avoid the trouble.
\begin{align*}
\int_{-1}^1\frac{1}{1+x^2}dx&=\int_{-1}^0\frac{1}{1+x^2}dx+\int_0^1\frac{1}{1+x^2}dx\\
&=\int_{\frac{3\pi}{4}}^{2\pi}d\theta+\int_0^{\frac{\pi}{4}}d\theta\\
&=\frac{\pi}{4}+\frac{\pi}{4}\\
&=\frac{\pi}{2}
\end{align*}
</s>