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?


$$\tan ^{-1}\left(\frac{1-x}{1+x}\right)=\frac{1}{2}\tan ^{-1}\left(x\right)$$
Putting $x = \tan(\theta)$

Here, it is useful to impose the restriction $$\theta\in\left(-\frac\pi2,-\frac\pi4\right)\cup\left(-\frac\pi4,\frac\pi2\right);\tag1$$ since $\tan\theta$ for which the given equation is defined is surjective on this interval, this restriction is valid and does not contract the solution set.

\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\end{align}

Note that $$\arctan(\tan \alpha)\not\equiv \alpha;\tag{*}$$ instead, for each $\alpha\in\mathbb R,$ there is some $k\in\mathbb Z$ such that $$\arctan(\tan \alpha)=\alpha+k\pi.$$ By condition $(1),$ $$\arctan \left(\tan\theta\right)=\theta$$ while \begin{align}\arctan\left(\tan\left(\frac\pi4 -\theta\right)\right)&=\frac\pi4 -\theta \quad\text{or}\quad \left(\frac\pi4 -\theta\right)-\pi\\
&=\frac\pi4 -\theta \quad\text{or}\quad -\frac34\pi -\theta.\end{align}

\begin{align} \tan ^{-1}\left(\frac{1-\tan\theta}{1+\tan\theta}\right)&=\frac{1}{2}\tan ^{-1}\left(\tan\theta\right)\end{align}

Continuing with your substitution method:
\begin{align}
\frac12\arctan \left(\tan\theta\right) &=\arctan\left(\tan\left(\frac\pi4 -\theta\right)\right)\\
\frac12\big(\theta\big) &= \left(\frac\pi4 -\theta\right) \quad\text{or}\quad \left(-\frac34\pi -\theta\right)\\
\theta &= \frac\pi6 \quad\text{or}\quad -\frac\pi2\\
&= \frac\pi6\\
x&=\frac1{\sqrt3}.\end{align} Plugging this value into the given equation reveals that it is the only solution. So, while you had obtained the correct solution set by serendipity (without proper justification), your textbook is actually wrong too in neglecting to eliminate its extraneous solution $x=-\dfrac1{\sqrt3}.$
