Let $x = \tan \theta$,then $dx = \sec^2 \theta \, d\theta$.
$\therefore \sin ^{-1}\left(\frac{2 x}{1+x^{2}}\right) = \sin ^{-1}\left(\frac{2 \tan \theta}{1+\tan ^{2} \theta}\right) = \sin ^{-1}(\sin 2 \theta) = 2 \theta$.
$\int \sin ^{-1}\left(\frac{2 x}{1+x^{2}}\right) dx = \int 2 \theta \cdot \sec ^{2} \theta \, d\theta = 2 \int \theta \cdot \sec ^{2} \theta \, d\theta$.
Integrating by parts,we obtain:
$2 \left[ \theta \int \sec ^{2} \theta \, d\theta - \int \left( \frac{d}{d \theta} \theta \cdot \int \sec ^{2} \theta \, d\theta \right) d\theta \right]$
$= 2 [ \theta \tan \theta - \int \tan \theta \, d\theta ]$
$= 2 [ \theta \tan \theta + \log |\cos \theta| ] + C$
Since $\tan \theta = x$,we have $\theta = \tan^{-1} x$ and $\cos \theta = \frac{1}{\sqrt{1+x^2}}$.
$= 2 [ x \tan^{-1} x + \log |\frac{1}{\sqrt{1+x^2}}| ] + C$
$= 2 x \tan^{-1} x + 2 [ -\frac{1}{2} \log (1+x^2) ] + C$
$= 2 x \tan^{-1} x - \log (1+x^2) + C$,where $C$ is an arbitrary constant.