<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] Thank you to @Robin'sPremiumCoffee for a nice algebraic solution. Now the problem with your original method is that although:
$$\frac{1-\tan \theta}{1+\tan \theta} = \tan(\frac \pi 4 -\theta)$$
It is also equal to:
$$\frac{1-\tan \theta}{1+\tan \theta} = \tan(\frac \pi 4 -\theta)=\tan(\pi +\frac \pi 4 -\theta)$$
This is because $\tan(\theta)$ is $\pi$ periodic. From there we may continue your steps to get:
\begin{align} 
\pi + \frac\pi 4 - \theta&=\frac{1}{2}\theta\\
\frac{5\pi} 4&=\frac{1}{2}\theta + \theta\\
\frac{5\pi} 4&=\frac{3}{2}\theta\\
\frac{5\pi} 6&=\theta\\
\frac{5\pi}6&=\tan^{-1}(x)\\
\tan\frac{5\pi} 6&=(x)\\
-\frac1{\sqrt{3}}&=x\end{align}
</s>