Find all $x$ that satisfy the equation $$\tan^{-1}\left(\frac{2x+1}{x+1}\right)+\tan^{-1}\left(\frac{2x-1}{x-1}\right)=2\tan^{-1}\left(1+x\right)$$
Attempt:
Taking tangent on both sides, and using the identities $\displaystyle \tan\left(\alpha+\beta\right)=\frac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta}$ and $\displaystyle \tan\left(2\alpha\right)=\frac{2\tan\alpha}{1-\tan^{2}\alpha}$,
We obtain $$\frac{\frac{\left(2x+1\right)}{x+1}+\frac{\left(2x-1\right)}{x-1}}{1-\frac{\left(4x^{2}-1\right)}{x^{2}-1}}=\frac{2\left(x+1\right)}{1-\left(x+1\right)^{2}}$$ and after removing the root $x=0$, we are left with a simple equation $(x^2-2)(2x+1)=0$. So, the possible roots are $x=0,\pm \sqrt{2}, -\dfrac{1}{2}$ , now my question is, how do I verify which roots satisfy the original equation, because one cannot see directly after plugging, whether it's true or not because it involves arctangents.
To avoid this situation, I re-wrote the original equation as $$\tan^{-1}\left(\frac{2x+1}{x+1}\right)-\tan^{-1}\left(1+x\right)=\tan^{-1}\left(1+x\right)-\tan^{-1}\left(\frac{2x-1}{x-1}\right)$$ and because while using the identity $\tan^{-1}\left(\alpha\right)-\tan^{-1}\left(\beta\right)=\tan^{-1}\left(\frac{\alpha-\beta}{1+\alpha\beta}\right)$, there are no restrictions on $\alpha,\beta$ I went ahead with this, and got the equation $$\frac{\frac{\left(2x+1\right)}{x+1}-\left(x+1\right)}{2\left(x+1\right)}=\frac{\left(x+1\right)-\frac{\left(2x-1\right)}{x-1}}{2x}$$ which simplified to $\left(x+1\right)^{2}\left(x-2\right)+x^{2}\left(x-1\right)=0$ and surprisingly from here, I am not even getting those roots!
I used this method to avoid the extraneous roots, what is going wrong here?
Edit: The immediately above issue has been resolved, however, the first issue remains unresolved.
Note that all calculations have to be performed by hand, since these types of questions are asked in exams in which the allotted time per question averages out to 2-3 minutes.