Solve the equation $\cos^{-1}\frac{x^2-1}{x^2+1}+\tan^{-1}\frac{2x}{x^2-1}=\frac{2\pi}{3}$ $\cos^{-1}\dfrac{x^2-1}{x^2+1}+\tan^{-1}\dfrac{2x}{x^2-1}=\dfrac{2\pi}{3}$
Let's first find the domain
$$-1<=\dfrac{x^2-1}{x^2+1}<=1$$
$$\dfrac{x^2-1}{x^2+1}>=-1 \text { and } \dfrac{x^2-1}{x^2+1}<=1$$
$$\dfrac{x^2-1+x^2+1}{x^2+1}>=0 \text { and } \dfrac{x^2-1-x^2-1}{x^2+1}<=0$$
$$\dfrac{2x^2}{x^2+1}>=0 \text { and } \dfrac{-2}{1+x^2}<=0$$
$$x\in R$$
$$x^2-1\ne0$$
$$x\ne\pm1$$
$$\cos^{-1}\dfrac{x^2-1}{x^2+1}+\tan^{-1}\dfrac{2x}{x^2-1}=\dfrac{2\pi}{3}$$
$$\pi-\cos^{-1}\dfrac{1-x^2}{1+x^2}-\tan^{-1}\dfrac{2x}{1-x^2}=\dfrac{2\pi}{3}$$
$$\dfrac{\pi}{3}=\cos^{-1}\dfrac{1-x^2}{1+x^2}+\tan^{-1}\dfrac{2x}{1-x^2}$$
Substituting $x$ by $\tan\theta$
$$x=\tan\theta$$
$$\tan^{-1}x=\theta$$
$$\theta\in \left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)-\{-\dfrac{\pi}{4},\dfrac{\pi}{4}\}$$
$$\dfrac{\pi}{3}=\cos^{-1}\dfrac{1-\tan^2\theta}{1+\tan^2\theta}+\tan^{-1}\dfrac{2\tan\theta}{1-\tan^2\theta}$$
$$\dfrac{\pi}{3}=\cos^{-1}(\cos2\theta)+\tan^{-1}(\tan2\theta)$$
$$2\theta\in(-\pi,\pi)-\{-\dfrac{\pi}{2},\dfrac{\pi}{2}\}$$
Now we break the range of $2\theta$ into various parts:-
Case $1$: $2\theta\in\left(-\pi,-\dfrac{\pi}{2}\right)$,$\theta\in\left(-\dfrac{\pi}{2},-\dfrac{\pi}{4}\right)$
$$\dfrac{\pi}{3}=2\pi+2\theta+\pi+2\theta$$
$$-\dfrac{8\pi}{3}=4\theta$$
$$-\dfrac{2\pi}{3}=\theta$$
But it is not the range of $\theta$ we assumed
Case $2$: $2\theta\in\left(-\dfrac{\pi}{2},0\right]$,$\theta\in\left(-\dfrac{\pi}{4},0\right]$
$$\dfrac{\pi}{3}=-2\theta+2\theta$$
$$\dfrac{\pi}{3}=0 \text { not possible }$$
Case $3$: $2\theta\in\left(0,\dfrac{\pi}{2}\right)$,$\theta\in\left(0,\dfrac{\pi}{4}\right)$
$$\dfrac{\pi}{3}=2\theta+2\theta$$
$$\dfrac{\pi}{12}=\theta$$
It is coming in the range of $\theta$, so its a valid solution.
$$\tan^{-1}x=\dfrac{\pi}{12}$$
$$x=\tan\dfrac{\pi}{12}$$
$$x=2-\sqrt{3}$$
Case $4$: $2\theta\in\left(\dfrac{\pi}{2},\pi\right)$, $\theta\in\left(\dfrac{\pi}{4},\dfrac{\pi}{2}\right)$
$$\dfrac{\pi}{3}=2\pi-2\theta+2\theta-\pi$$
$$\dfrac{\pi}{3}=\pi \text { not possible }$$
So only solution is $2-\sqrt{3}$, but actual answer is $2-\sqrt{3}, \sqrt{3}$

Let $x=\tan\dfrac t2$ for $t\in(-\pi,\pi)$. The equation reads
$$\tan^{-1}(-\tan t)+\cos^{-1}(-\cos t)=\frac{2\pi}3$$
or
$$\tan^{-1}(\tan t)+\cos^{-1}(\cos  t)=\frac{\pi}3.$$
By lazily checking on a plot, we see that the function has a null slope in the negatives, where there are no solutions.
In the positives, the slope is $2$ and there are two roots:
$$2t=\frac\pi3$$ and $$2t-\pi=\frac\pi3.$$

You deduce $x$ from $t$.

$\tan\dfrac\pi3=\sqrt3$ or $\tan\dfrac\pi{12}=2-\sqrt3$.


Note:
Despite the use of a plot, this resolution is rigorous, because we know that these functions are piecewise linear and we know the limits of the pieces, so we could check formally.
