<s>[INST] Evaluate $\int \sin^{-1}\frac{2x}{1+x^2}dx$ $\int \sin^{-1}\dfrac{2x}{1+x^2}dx$
My attempt is as follows:-
$$x=\tan\theta$$
$$dx=\sec^2\theta d\theta$$
$$\int \sin^{-1}(\sin2\theta) \cdot\sec^2\theta d\theta$$
So here should we make cases on the basis of values of $\theta$ or can we write $\sin^{-1}(\sin2\theta)$ as $2\theta$?
 [/INST] I think it may be easier to apply integration by parts on the original integral (i.e. differentiate the integrand and integrate $1$) giving
\begin{align}
\int\arcsin{\left(\frac{2x}{1+x^2}\right)}\mathrm{d}x
&=x\cdot\arcsin{\left(\frac{2x}{1+x^2}\right)}-\int x\cdot\frac{2\,\text{sign}(1-x^2)}{1+x^2}\mathrm{d}x\\
&=x\cdot\arcsin{\left(\frac{2x}{1+x^2}\right)}+\text{sign}(x^2-1)\cdot\int\frac{2x}{1+x^2}\mathrm{d}x\\
&=x\cdot\arcsin{\left(\frac{2x}{1+x^2}\right)}+\text{sign}(x^2-1)\cdot\ln{(1+x^2)}+C\\
\end{align}
It turns out that if we choose $C=-\ln{(2)}\cdot\text{sign}{(x^2-1)}+C'$ then we get a continuous antiderivative namely
$$\int\arcsin{\left(\frac{2x}{1+x^2}\right)}\mathrm{d}x=x\cdot\arcsin{\left(\frac{2x}{1+x^2}\right)}+\text{sign}(x^2-1)\cdot(\ln{(1+x^2)}-\ln{(2)})+C'$$
</s>