Two methods are giving two different answers to the this differential equation : $\frac{dy}{dx}=\frac{1}{2} \frac{d(\sin ^{-1}(f(x))}{dx}$ 
$f(x)=\left(\sin \left(\tan ^{-1} x\right)+\sin \left(\cot ^{-1} x\right)\right)^{2}-1,\ |x|>1$
If $\displaystyle\frac{\mathrm{d} y}{\mathrm{d} x}=\frac{1}{2} \frac{\mathrm{d}}{\mathrm{d} x}\left(\sin ^{-1}(f(x))\right)$ and
$y(\sqrt{3})=\frac{\pi}{6}$, then $y(-\sqrt{3})$ is equal to :
Options:
$1. \quad-\frac{\pi}{6}\\
2. \qquad \frac{2 \pi}{3}\\
3. \qquad \frac{5 \pi}{6}\\
4. \qquad\frac{\pi}{3}$

Now I am getting two Answers in two methods. Can anyone tell me which method is wrong and why?
Method - 1 $f(x) = [\sin(\tan^{-1}x) + \sin(\cot^{-1}x) ]^2 -1 $.
Let $\tan^{-1}x = \theta $. So $f(x) = [\sin(\theta) + \sin(\frac{\pi}{2} - \theta) ]^2 -1 = \sin 2\theta$.
So $f(x) = \sin 2\theta = \frac{2\tan \theta}{1+ \tan^2 \theta} = \frac{2x}{1+x^2}\tag 1$.
Now $\frac{d}{dx} \sin^{-1} \frac{2x}{1+x^2} = \frac{2(1-x^2)}{\sqrt{(1-x^2)^2}(1+x^2)} = \frac{2(1-x^2)}{(1+x^2)(x^2 -1)}$ [Since $|x| > 1$].
Now $\frac{dy}{dx} = \frac{1}{2}\frac{d(\sin^{-1}f(x)}{dx}$ . So  $\frac{dy}{dx} = \frac{-1}{1+x^2}$. So $y= - \tan^{-1} x + C$. Now as $y(\sqrt 3) = \frac{\pi}{6}$ , $C = \frac{\pi }{2}$.
So $y = -\tan^{-1} x + \frac{\pi}{2}$.
So $ \displaystyle   y(-\sqrt 3) =  \frac{\pi}{3} + \frac{\pi}{2} = \frac{5\pi}{6}$
Method -2 - $\displaystyle\frac{\mathrm{d} y}{\mathrm{d} x}=\frac{1}{2} \frac{\mathrm{d}}{\mathrm{d} x}\left(\sin ^{-1}(f(x))\right)$. So $y = \frac{\sin^{-1}f(x)}{2 } + C$.
Now $f(x) =  \sin (2\tan^{-1} x)$.
SO $\displaystyle y = \frac{\sin^{-1}(\sin (2\tan^{-1} x))}{2 } + C$ . Now as $y(\sqrt 3) = \frac{\pi}{6}$ , $C = 0$.
So $\displaystyle y = \frac{\sin^{-1}(\sin (2\tan^{-1} x))}{2 } $ .
So $ \displaystyle y(-\sqrt 3) = \frac{-\pi}{6}$
I am really confused. Why I am getting two answers? Can anyone please help me out?
 A: There is no way to predict the value of $y(-\sqrt{3})$ by knowing the solution over $(1,\infty)$.
The problem is ill posed. It is like asking for the value of $y(-1)$ if $y'=1/x$ for $x\ne0$, with $y(1)=0$. Any value for $y(-1)$ can be chosen.
Indeed, there is no reason for the constant of integration to be the same over $(0,\infty)$ and $(-\infty,0)$ in this case or over $(1,\infty)$ and $(-\infty,-1)$ in your case.
By the way, we have
$$
f(x)=\begin{cases}
\frac{\pi}{2}-\arctan x & x>1 \\[6px]
-\frac{\pi}{2}-\arctan x & x<-1
\end{cases}
$$
as witnessed by https://www.desmos.com/calculator/6akvm0e78h


Therefore the differential equation is
$$
y'=-\frac{1}{1+x^2}
$$
and so
$$
y=\begin{cases}
a-\arctan x & x>1 \\[6px]
b-\arctan x & x<-1
\end{cases}
$$
You can determine $a$ by plugging in $a-\arctan\sqrt{3}=\pi/6$, so $a=\pi/2$. However, this does not impose any condition on $b$.
If the instructor wants you to use $b=a$, then the answer would be
$$
\frac{\pi}{2}-\arctan(-\sqrt{3})=\frac{\pi}{2}+\frac{\pi}{3}=\frac{5\pi}{6}
$$
but there is no mathematical justification for this and the instructor is wrong.
A: So we can write $f(x) = \sin (2 \tan^{-1} x)$ where $|x | > 1$.
$\frac{dy}{dx} = \frac{1}{2}\frac{d(\sin^{-1}f(x)}{dx}$ .   So $2y = \sin^{-1} f(x) +C$ which is nothing but $2y =  \sin^{-1}(\sin (2 \tan^{-1} x)) + C$.
Now $y(\sqrt 3) = \frac{\pi}{6}$ . So   $C = 0$  if  $x> 1$.
$\therefore 2y =  \sin^{-1}(\sin (2 \tan^{-1} x)) $ if  $x> 1$
So the solution to the differential equation is $$
y(x)=\begin{cases}
\frac{1}{2}\sin^{-1}(\sin (2 \tan^{-1} x)) & x>1 \\[6px]
\frac{1}{2} \sin^{-1}(\sin (2 \tan^{-1} x))+ d & x<-1
\end{cases}
$$
Here $d \in \mathbb R$.
So $y(-\sqrt 3)$ will be any element of the set $\{\frac{1}{2} \sin^{-1}(\sin (2 \tan^{-1} (-\sqrt 3)))+ d : d \in \mathbb R\}$ which is nothing but $\mathbb R$.
So all answers are correct.
