solving $\tan^{-1}(x+1)+\tan^{-1}x+\tan^{-1}(x-1)=\tan^{-1}3$ solve $$\tan^{-1}(x+1)+\tan^{-1}x+\tan^{-1}(x-1)=\tan^{-1}3$$.

we have the formula;

let $$\tan^{-1}(\frac{x+y}{1-xy})=a$$ :when $xy<1$ $$\tan^{-1}x+\tan^{-1}y= a$$
when $x>0,y>0,xy>1$ $$\tan^{-1}x+\tan^{-1}y= \pi+a$$
when $x<0,y<0,xy>1$ $$\tan^{-1}x+\tan^{-1}y= -\pi+a$$

My try
$$\tan^{-1}(x+1)+\tan^{-1}(x-1)=\tan^{-1}3-\tan^{-1}x$$
when $x^2-1<1$ and $3x<1$or when $-\sqrt{2}<x<1/3...(1)$:
$$\tan^{-1}(\frac{2x}{2-x^2})=\tan^{-1}(\frac{3-x}{1+3x})$$
$$\frac{2x}{2-x^2}=\frac{3-x}{1+3x}$$solving and neglecting the ones coming out of the bound defined by $x$ in (1).
we have $x=-1$.
I know i have to do other cases when $xy>1$ . But suprisingly the answer given in book is only $x=-1$ and the solution also does not take the other cases.Why are they neglecting other cases. Morover i feel doing so many cases is very less efficient .How do i tackle this question easily?.

$$\tan \left(\arctan x+\arctan(x+1)\right)=\frac{-2 x-1}{x^2+x-1}$$
$$\tan \left(\arctan 3-\arctan(x-1)\right)=\frac{4-x}{3 x-2}$$
provided that $\left(x (x+1)<1\right)\land \left(3 (x-1)<1\right)$ that is
$\frac{1}{2} \left(-\sqrt{5}-1\right)<x<\frac{1}{2} \left(\sqrt{5}-1\right)\land x\ne -1$
The equation becomes
$$\frac{-2 x-1}{x^2+x-1}=\frac{4-x}{3 x-2}$$
expanding and reordering
$$x^3-9 x^2-4 x+6=0$$
factoring
$$(x+1) \left(x^2-10 x+6\right)=0$$
which gives the solutions
$$x=-1,x= 5-\sqrt{19},x= 5+\sqrt{19}$$
$x=-1$ is discarded because the given equation is not verified
$$\arctan (-1+1)+\arctan(-1) +\arctan(-1-1)\ne\arctan 3$$
only $x=5-\sqrt{19}$ satisfies the constraint above therefore it is the only solution.
