Integrate $\sin^{-1}\frac{2x}{1+x^2}$ 
Integrate $\sin^{-1}\frac{2x}{1+x^2}$

The solution is given in my reference as: $2x\tan^{-1}x-\log(1+x^2)+C$.
But, is it a complete solution ?
My Attempt
$$
\int 2\tan^{-1}x \, dx=\int \tan^{-1}x \cdot 2\,dx=\tan^{-1}x\int2\,dx-\int\frac{1}{1+x^2}\int2\,dx\cdot dx\\
=\tan^{-1}x \cdot2x-\int\frac{2x}{1+x^2}\,dx=2x\tan^{-1}x-\log(1+x^2)+C
$$
$$
2\tan^{-1}x=\begin{cases}\sin^{-1}\frac{2x}{1+x^2}\text{ if }|x|\leq{1}\\
\pi-\sin^{-1}\frac{2x}{1+x^2}\text{ if }|x|>{1}\text{ and }x>0\\
-\pi-\sin^{-1}\frac{2x}{1+x^2}\text{ if }|x|>{1}\text{ and }x<0
\end{cases}\\
\sin^{-1}\frac{2x}{1+x^2}=\begin{cases}2\tan^{-1}x\text{ if }|x|\leq{1}\\
\pi-2\tan^{-1}x\text{ if }|x|>{1}\text{ and }x>0\\
-\pi-2\tan^{-1}x\text{ if }|x|>{1}\text{ and }x<0
\end{cases}
$$
$$
\int\sin^{-1}\frac{2x}{1+x^2}\,dx=\begin{cases}\int2\tan^{-1}x\,dx&\text{ if } |x|\leq{1}\\\int\pi\, dx-\int2\tan^{-1}x\,dx&\text{ if }|x|>{1}&\text{ and } x>0\\-\int\pi \,dx-\int2\tan^{-1}x\,dx&\text{ if }|x|>{1}&\text{ and } x<0\end{cases}=\begin{cases}\color{red}{2x\tan^{-1}x-\log(1+x^2)+C\text{ if } |x|\leq{1}}\\\pi x-2x\tan^{-1}x+\log(1+x^2)+C&\text{ if }|x|>{1}&\text{ and } x>0\\-\pi x-2x\tan^{-1}x+\log(1+x^2)+C&\text{ if }|x|>{1}&\text{ and } x<0\end{cases}$$
So don't we have two more cases for our solution rather than that is given in my reference, right ?

According to the standard tangent half-angle substitution
\begin{align}
& x=\tan\frac\theta 2 \\[8pt]
& 2\arctan x = \theta \\[8pt]
& \frac {2\,dx}{1+x^2} = d\theta \\[8pt]
& dx = \sec^2\frac\theta 2 \,\,\frac{d\theta} 2 \\[8pt]
& \frac{2x}{1+x^2} = \sin\theta \\[8pt]
& \frac{1-x^2}{1+x^2} = \cos\theta
\end{align}
Thus we have $\theta = \arcsin\dfrac{2x}{1+x^2}.$
So
\begin{align}
& \int \arcsin\frac{2x}{1+x^2} \, dx = \int \theta \left( \sec^2\frac\theta 2 \,\, \frac{d\theta} 2 \right) = \int\theta \, dv = \theta v - \int v\,d\theta \\[10pt]
= {} & \theta\tan\frac\theta 2 - \int \tan\frac\theta 2 \, d\theta = \theta\tan\frac\theta 2 +2\log\left|\cos\frac\theta 2\right| + C \\[10pt]
= {} & \theta \tan \frac \theta 2 + \log\left|\frac 1 2 + \frac 1 2 \cos\theta \right| + C = \theta\tan\frac \theta 2 + \log\left| \frac 1 2 + \frac{1-x^2}{2(1+x^2)} \right| + C \\[10pt]
= {} & 2x\arctan x - \log(1+x^2) + C
\end{align}
