<s>[INST] Solving $\tan ^{-1}(\frac{1-x}{1+x})=\frac{1}{2}\tan ^{-1}(x)$ I was solving the following equation,$$\tan ^{-1}\left(\frac{1-x}{1+x}\right)=\frac{1}{2}\tan ^{-1}\left(x\right)$$
But I missed a solution (don't know where's the mistake in my work).

Here's my work:
$$\tan ^{-1}\left(\frac{1-x}{1+x}\right)=\frac{1}{2}\tan ^{-1}\left(x\right)$$
Putting $x = \tan(\theta)$
$$\begin{align} \tan ^{-1}\left(\frac{1-\tan\theta}{1+\tan\theta}\right)&=\frac{1}{2}\tan ^{-1}\left(\tan\theta\right)\\
\tan ^{-1}\left(\tan\left(\frac\pi 4 - \theta\right)\right)&=\frac{1}{2}\theta\\
\frac\pi 4 - \theta&=\frac{1}{2}\theta\\
\frac\pi 4&=\frac{1}{2}\theta + \theta\\
\frac\pi 4&=\frac{3}{2}\theta\\
\frac\pi 6&=\theta\\
\frac\pi 6&=\tan^{-1}(x)\\
\tan\frac\pi 6&=(x)\\
\frac1{\sqrt{3}}&=x\end{align}$$

I got only one solution, but the answer in my textbook is $\pm\frac{1}{\sqrt{3}}$. Where is the mistake?
 [/INST] Apply $tan$ to both sides
$ \dfrac{1 - x}{1 + x} = \tan \left( \dfrac{1}{2} \tan^{-1}(x) \right) \\
= \dfrac{ x }{ \sqrt{1 + x^2} + 1 } $
From this,
$ (1 - x) (\sqrt{1 + x^2} + 1 ) = x (1 + x) $
$ (1 - x) \sqrt{1 + x^2} + 1 - x = x + x^2  $
$ \sqrt{ 1 + x^2} = \dfrac{(x^2 + 2 x - 1)}{ ( 1 - x)} $
$ 1 + x^2 = \dfrac{ (x^2 + 2x - 1)^2 }{ (x - 1)^2 } $
$ (x^2 + 1) (x - 1)^2 = (x^2 + 2 x - 1)^2 $
$ (x^2 + 1)(x^2 - 2 x + 1) = x^4 + 4 x^2 + 1 + 4 x^3 - 4 x - 2 x^2 $
$ x^4 - 2 x^3 + x^2 + x^2 - 2 x + 1 = x^4 + 4 x^3 + 2 x^2 - 4 x + 1 $
Cancelling $x^4 $ and $1$ on both sides, and re-arranging,
$ 6 x^3 - 2 x = 0 $
Dividing by $(2 x)$ (The root $0$ is extraneous)
$ 3 x^2 - 1 = 0 $
Hence, $ x = \pm \dfrac{1}{\sqrt{3}} $
</s>