TITLE: A question about the arctangent addition formula.
QUESTION [33 upvotes]: In the arctangent formula, we have that:
$$\arctan{u}+\arctan{v}=\arctan\left(\frac{u+v}{1-uv}\right)$$
however, only for $uv<1$. My question is: where does this condition come from? The situation is obvious for $uv=1$, but why the inequality?
One of the possibilities I considered was as following: the arctangent addition formula is derived from the formula:
$$\tan\left(\alpha+\beta\right)=\frac{\tan{\alpha}+\tan{\beta}}{1-\tan{\alpha}\tan{\beta}}.$$
Hence, if we put $u=\tan{\alpha}$ and $v=\tan{\beta}$ (which we do in order to obtain the arctangent addition formula from the one above), the condition that $uv<1$ would mean $\tan\alpha\tan\beta<1$, which, in turn, would imply (thought I am NOT sure about this), that $-\pi/2<\alpha+\beta<\pi/2$, i.e. that we have to stay in the same period of tangent.
However, even if the above were true, I still do not see why we have to stay in the same period of tangent for the formula for $\tan(\alpha+\beta)$ to hold. I would be thankful for a thorough explanation.

REPLY [4 votes]: A simpler explanation  of why the identity  $$\arctan u+\arctan v=\arctan\dfrac{u+v}{1-uv}$$
is valid if & only if  $uv <1$.
By definition of the arctan function, as both sides have the same tangent, we only need to check under which condition
$$-\frac\pi 2<\arctan u+\arctan v < \frac\pi2.$$
Let $\alpha=\arctan u$, $\beta=\arctan v$. A priori, $\alpha+\beta\in(-\pi,\pi)$, and on this interval,
$$\alpha+\beta \in\Bigl(-\frac\pi 2,\frac\pi 2\Bigr)\iff \cos(\alpha+\beta)>0$$
Now $$\cos(\alpha+\beta)=\cos\alpha\cos\beta-\sin\alpha\sin\beta = \cos\alpha\cos\beta(1-\tan\alpha\tan\beta)\\=\underbrace{\cos\alpha\cos\beta}_{>0}\,(1-uv)$$
has the sign of $1-uv$.