# 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$$?

The fact that $$\arcsin(\sin(2\theta))=2\theta$$ holds or not depends on the range of $$\theta$$, hence on the range of $$x$$.
Actually $$\arcsin(\sin z)=z$$ holds for $$z\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$$, so we get $$\theta\in\left[-\frac{\pi}{4},\frac{\pi}{4}\right]$$ and if the integration range is a subrange of $$[-1,1]$$ we are allowed to state $$\int \arcsin\left(\frac{2x}{1+x^2}\right)\,dx \stackrel{x\mapsto \tan\theta}{=}\int \frac{2\theta}{\cos^2\theta}\,d\theta\stackrel{\text{IBP}}{=}C+2\left[\log\cos\theta+\theta\tan\theta\right]$$ and $$2\left[\log\cos\theta+\theta\tan\theta\right]=2\left[\log\cos\arctan(x)+x\arctan(x)\right]=2x\arctan(x)-\log(1+x^2).$$

• but here we don't know what is $x$ right? – user3290550 Jan 2 at 17:20

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'$$

In integration, when you apply reverse substitution, which is $$x = g(t)$$, (for example, in your case you substituted $$x = \tan(\theta)$$), you have to keep in mind that the function you are using in place for $$x$$ is one-one and onto (and, if not, you have to restrict the range of the input variable i.e. $$t$$).

So, to cure your problem, what you do is restrict $$\theta$$ in the interval $$[-\frac{\pi}{2}, \frac{\pi}{2}] \implies x \space \in \space \mathbb R.$$ Then, you can easily handle the 3 separate cases of $$\theta \in [-\frac{\pi}{2}, -\frac{\pi}{4}), \in [-\frac{\pi}{4}, \frac{\pi}{4}], \in (\frac{\pi}{4}, \frac{\pi}{2}]$$. The only thing that seperates the cases is what comes in place of $$\sin^{-1}\sin(2\theta)$$. For example, in the third case, it will be $$\pi - 2\theta$$. Then, using IBP will solve the problem.

• Why the downvote? Do tell me if you find anything wrong/confusing. P.S. @Iabbhattacharjee and I have essentially the same solution and I posted it 5 mins before him, so, it doesn’t really make sense to downvote this solution. – Hardik Kalra Jan 2 at 19:08

The function to find an antiderivative of can be rewritten as $$f(x)=\begin{cases} -\pi-2\arctan x & x<-1 \\[6px] 2\arctan x & -1\le x\le 1 \\[6px] \pi-2\arctan x & x>1 \end{cases}$$ It's sufficient to see that the derivative is $$f'(x)=\dfrac{1-x^2}{|1-x^2|}\dfrac{2}{1+x^2}$$ Thus an antiderivative is $$F(x)=\int_0^x f(t)\,dt$$ Since the function $$f$$ is odd, we can state that $$F$$ is even, so we can assume $$x>0$$.

Recalling that, with integration by parts, $$\int 2\arctan x\,dx=2x\arctan x-\log(1+x^2)$$ we have, for $$0\le x\le 1$$, $$F(x)=\Bigl[2t\arctan t-\log(1+t^2)\Bigr]_0^x=2x\arctan x-\log(1+x^2)$$ and $$F(1)=\pi/2-\log2$$. For $$x>1$$, we have \begin{align} F(x) &=F(1)+\int_1^x (\pi-2\arctan t)\,dt \\[6px] &=F(1)+\Bigl[\pi t-2t\arctan t+\log(1+t^2)\Bigr]_1^x \\[6px] &=\frac{\pi}{2}-\log2+\pi x-2x\arctan x+\log(1+x^2)-\pi+\frac{\pi}{2}-\log2 \\[6px] &=-2\log2+\pi x-2x\arctan x+\log(1+x^2) \end{align} Thus the most general antiderivative is $$F(x)+c$$, where $$F(x)=\begin{cases} 2x\arctan x-\log(1+x^2) & |x|\le 1 \\[6px] -2\log2+\pi|x|-2x\arctan x+\log(1+x^2) & |x|>1 \end{cases}$$

If $$y=\arctan x,x=\tan y$$

$$f(x)=\sin^{-1}\dfrac{2x}{1+x^2}=\arcsin(\sin2y)$$

$$-\pi<2y<\pi$$

So, $$f(x)=2y$$ if $$-\dfrac\pi2\le2y\le\dfrac\pi2$$

$$f(x)=\pi-2y$$ if $$-\dfrac\pi2\le2y-\pi\le\dfrac\pi2\iff 2y\ge\dfrac\pi2$$

If $$f(x)=-\pi-2y$$ if $$-\dfrac\pi2\le2y+\pi\le\dfrac\pi2\iff 2y\le-\dfrac\pi2$$