<s>[INST] Convert $\sin\left(2\cos^{-1}\left(\cot\left(2 \tan^{-1}x\right)\right)\right)$ into an algebraic function 
Convert trigonometric function into algebraic function.
  $$\sin\left(2\cos^{-1}\left(\cot\left(2 \tan^{-1}x\right)\right)\right)$$

My approach is as follows:
$sin2\theta$ is to be calculated
$$\tan^{-1}x=\gamma \tag{1}$$
Hence 
$$\begin{align}
\cos\theta&=\cot2\gamma \tag{2}\\[4pt]
\cos\theta&=\frac{\cot^2\gamma-1}{2\cot\gamma} \tag{3}\\[4pt]
\cos\theta&=\frac{1-x^2}{2x} \tag{4}
\end{align}$$
The value of $\sin\theta$ is coming in negative.
 [/INST] \begin{align}
   \cot\left(2 \tan^{-1}x\right)
   &= \dfrac{1}{\tan\left(2 \tan^{-1}x\right)} \\
   &= \dfrac{1-\tan^2(\tan^{-1}x)}{2\tan(\tan^{-1}x)} \\
   &= \dfrac{1-x^2}{2x} \\
\hline
   \sin\left(2\cos^{-1}\left(\cot\left(2 \tan^{-1}x\right)\right)\right) 
   &= 2\sin\left(\dfrac{ 1-x^2}{2x} \right) \cos\left( \dfrac{1-x^2}{2x} \right)
\end{align}
</s>