Show that $\int_{0}^{\sqrt{3}} \sin^{-1} \left( \frac{2x}{1+x^2} \right) ~dx =\frac{\pi}{\sqrt{3}}.$

Show that $$\int_{0}^{\sqrt{3}} \sin^{-1} \left( \frac{2x}{1+x^2} \right) ~dx =\frac{\pi}{\sqrt{3}}.$$

When I do the following integral by parts taking $$\sin^{-1}()$$ as first function and 1 as second, I get an additional log term, $$I=\int_{0}^{\sqrt{3}} \sin ^{-1} \frac{2x}{1+x^2}~.1~ dx = \left[x\sin^{-1}\left(\frac{2x}{1+x^2}\right)-\ln(1+x^2)\right]_0 ^{\sqrt3} = \frac{\pi}{\sqrt3}-\ln4.$$

Notice that $$\frac{d}{dx} \sin ^{-1}\left ( \frac{2x}{1+x^2} \right)= \frac{2}{1+x^2} ~ \frac{1-x^2}{|1-x^2|}.$$ So the function $$f(x)=\sin ^{-1} \frac{2x}{1+x^2}$$ is non-differentiable at $$x=1$$ in the domain of integration $$(0,\sqrt{3})$$. The given definite integral can be done by parts assuming $$f(x)$$ to be the first and 1 as second function $$I=\int_{0}^{\sqrt{3}} \sin ^{-1} \frac{2x}{1+x^2}~.1~ dx=\left. x \sin^{-1} \frac{2x}{1+x^2}\right |_{0}^{\sqrt{3}}- \int_{0}^{\sqrt{3}} x~\frac{d}{dx} \sin ^{-1} \left( \frac{2x}{1+x^2} \right)dx.$$ Then due to the said non-differentiability at $$x=1$$, we break the domin of integration in above as $$[0,1]$$ and $$[1,\sqrt{3}]$$: $$I=\left . x \sin^{-1} \frac{2x}{1+x^2}\right |_{0}^{\sqrt{3}}- \int_{0}^{1} \frac{+2x}{1+x^2} dx -\int_{1}^{\sqrt{3}} \frac{-2x}{1+x^2} dx= \frac{\pi}{\sqrt{3}} -\ln 2 + \ln 2= \frac{\pi}{\sqrt{3}}.$$
Another approach let $$x=\tan(y)$$ then $$dx=\sec^2(y)dy$$ . So the integral becomes $$\int_0^{\frac{\pi}{3}} \arcsin(\sin(2y))\sec^2y\,dy$$. Note that $$\sin(2y)=\dfrac{2\tan(y)}{1+\tan^2(y)}$$. Now we don't immediately write $$\arcsin(\sin2y)=2y$$ we see that after $$y=\frac{\pi}{4}$$ $$2y>\frac{\pi}{2}$$ but arcsin is defined only from $$[-\frac{\pi}{2},\frac{\pi}{2}]$$. So after $$\pi/4$$ we have $$\arcsin(\sin(2y))=\pi-2y$$ thus our integral becomes $$\int_0^{\frac{\pi}{4}}2y\sec^2y\,dy+\int_{\frac{\pi}{4}}^{\frac{\pi}{6}}(\pi-2y)\sec^2y\,dy$$ which can be easily found out.
Let $$x=\tan\theta$$, where $$\theta\in[0\frac\pi3]$$. Then $$\dfrac{2x}{1+x^2}=\dfrac{2\tan\theta}{\sec^2\theta}=2\sin\theta\cos\theta=\sin2\theta$$.
\begin{align*} \int_0^\sqrt3\sin^{-1}\left(\frac{2x}{1+x^2}\right)dx&=\int_0^{\frac\pi4}\sin^{-1}(\sin2\theta)\frac{d\tan\theta}{d\theta} d\theta+\int_{\frac\pi4}^{\frac\pi3}\sin^{-1}(\sin2\theta)\frac{d\tan\theta}{d\theta} d\theta\\ &=\int_0^{\frac\pi4}2\theta\frac{d\tan\theta}{d\theta} d\theta+\int_{\frac\pi4}^{\frac\pi3}(\pi-2\theta)\frac{d\tan\theta}{d\theta} d\theta\\ &=\left[2\theta\tan\theta\right]_0^{\frac\pi4}-2\int_0^{\frac\pi4}\tan\theta d\theta+\left[(\pi-2\theta)\tan\theta\right]_{\frac\pi4}^{\frac\pi3}+2\int_{\frac\pi4}^{\frac\pi3}\tan\theta d\theta\\ &=\frac\pi2-2\left[\ln\sec\theta\right]_0^\frac\pi4+\frac{\sqrt3\pi}{3}-\frac\pi2+2\left[\ln\sec\theta\right]_{\frac\pi4}^{\frac\pi3}\\ &=\frac{\sqrt3\pi}3-\ln2+\ln2\\ &=\frac{\sqrt3\pi}3 \end{align*}