What are the conditions for $\arctan x+\arctan y+\arctan z=\arctan\frac{x+y+z-xyz}{1-xy-yz-zx}$ to be true?

This is the formula:

$$\arctan x+\arctan y+\arctan z=\arctan\frac{x+y+z-xyz}{1-xy-yz-zx}$$

Should the condition be $|xy+yz+zx|<1$?

Related: Why does the equation with $2 \arctan(x)$ and other Inverse Trigonometric functions have weird conditions?


Solution 1:

It is sufficient that the sum of the three arctangents is between $\pm\pi/2.$

For $x,y,z\in\mathbb R,$ the value of $$\frac{x+y+z-xyz}{1-xy-xz-yz}\in\mathbb R\cup\{\infty\}$$ is always equal to $$\tan(\arctan x + \arctan y + \arctan z)\in\mathbb R\cup\{\infty\}, $$ since $$\tan(\arctan x) = x \text{ for every } x\in\mathbb R$$ and for all $a,b,c\in\mathbb R,$ $$ \tan(a+b+c) = \frac{\tan a+\tan b+\tan c-\tan a\tan b\tan c}{1 - \tan a\tan b - \tan a \tan c - \tan b\tan c} \in\mathbb R\cup\{\infty\}. $$ (This $\text{“}\infty\text{”}$ is neither $+\infty$ nor $-\infty,$ but is approached by going in either the positive or the negative direction, so $\mathbb R\cup\{\infty\}$ is topologically a circle.)

However, in some cases $\arctan (\tan a) \ne a,$ namely in those cases in which $a\notin(-\pi/2,+\pi/2).$

Solution 2:

It's just $xy+yz+zx<1$. If $xy+yz+zx>1$, $\pi$ or $-\pi$ needs to be added to the RHS. A possible approach to see this. For the sum of two arctangents, we have $$\arctan u+\arctan v=\begin{cases} \arctan\frac{u+v}{1-uv}, & uv<1\\ \pi+\arctan\frac{u+v}{1-uv}, & uv>1\text{ and } u,v>0\\ -\pi+\arctan\frac{u+v}{1-uv}, & uv>1\text{ and } u,v<0\\ \pi/2, & uv=1\text{ and } u,v>0\\ -\pi/2, & uv=1\text{ and } u,v<0\\ \end{cases} $$ Apply this twice: first with $u=x,v=y$, then with $u=(x+y)/(1-xy),v=z$ and consider the various cases for the products $xy$ and $z(x+y)/(1-xy)$ with possible subcases for the signs of $x,y,z$ (yes, that's a lot of cases). For example, when $xy<1$ and $\frac{z(x+y)}{1-xy}<1\Rightarrow xy+yz+zx<1$, we have $$\arctan x+\arctan y+\arctan z=\arctan\frac{x+y}{1-xy}+\arctan{z}=\arctan\frac{x+y+z-xyz}{1-xy-yz-zx}$$ In the case $xy>1$ and $\frac{z(x+y)}{1-xy}>1\Rightarrow xy+yz+zx<1$ with $x,y>0$ and $z<0$, we have $$\arctan x+\arctan y+\arctan z=\pi+\arctan\frac{x+y}{1-xy}+\arctan{z}\\ =\pi+(-\pi)+\arctan\frac{x+y+z-xyz}{1-xy-yz-zx}=\arctan\frac{x+y+z-xyz}{1-xy-yz-zx}$$ And continue with the other cases. If you want to avoid this laborious case checking, consider achille hui's answer which uses geometrical reasoning about the region $xy+yz+zx\ne 1$.