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 ?

• Are you asking why $\sin^{-1}\frac{2x}{1+x^2}=2\tan^{-1}x$? – A.Γ. May 15 '18 at 8:50
• @A.Γ. i mean my reference seems to take only that. But, what about the other two cases ? – ss1729 May 15 '18 at 8:55

You're right; but it depends on what the full question is; if one is asked to compute $$\int_{0}^{1}\arcsin\frac{2x}{1+x^2}\,dx$$ then just the antiderivative $2\arctan x$ is sufficient. Not if one wants to compute an integral involving points outside the interval $[-1,1]$.

Here's a shorter way to get at your result.

Consider $$f(x)=\arcsin\frac{2x}{1+x^2}$$ Then $$f'(x)=\frac{1}{\sqrt{1-\dfrac{4x^2}{(1+x^2)^2}}}\frac{2(1+x^2)-4x^2}{(1+x^2)^2} =\frac{1+x^2}{|1-x^2|}\frac{2(1-x^2)}{(1+x^2)^2}$$ hence $$f'(x)=\begin{cases} \dfrac{2}{1+x^2} & x\in(-1,1) \\[4px] -\dfrac{2}{1+x^2} & x\in(-\infty,-1)\cup(1,\infty) \end{cases}$$ Therefore, knowing that $f(0)=0$, $$f(x)=\begin{cases} -\pi-2\arctan x & x<-1 \\[4px] 2\arctan x & -1\le x\le 1 \\[4px] \pi-2\arctan x & x>1 \end{cases}$$

In order to find an antiderivative we can consider $$\int\arctan x\,dx=x\arctan x-\int\frac{x}{1+x^2}\,dx =x\arctan x-\frac{1}{2}\log(1+x^2)$$ Thus an antiderivative of $f$ has the form $$F(x)=\begin{cases} c_- -\pi x-2x\arctan x+\log(1+x^2) &\qquad x<-1 \\[4px] 2x\arctan x-\log(1+x^2) &\qquad -1\le x\le 1 \\[4px] c_+ +\pi x-2x\arctan x+\log(1+x^2) &\qquad x>1 \end{cases}$$ and you just need to determine $c_-$ and $c_+$ to ensure continuity at $-1$ and $1$.

The other antiderivatives differ from $F$ by a constant.

• thanx. I like ur observation about the function from the derivative. thats something i never thought of, though i have seen it many times. – ss1729 May 16 '18 at 4:43

The "identity"

$$\arcsin\left(2x\over1+x^2\right)=2\arctan x$$

does not hold for all $x$. You can see this by comparing the ranges of the two sides. The arcsine function has $[-\pi/2,\pi/2]$ as its range, but twice the arctangent function has $(-\pi,\pi)$ as its range. In particular, if $x\gt1$, then $2\arctan x\gt\pi/2$, and likewise if $x\lt-1$ then $2\arctan x\lt-\pi/2$ (since $\arctan1=\pi/4$).

The correct identity is

$$\arcsin\left(2x\over1+x^2\right)= \begin{cases} \pi-2\arctan x\qquad\text{if }x\ge1\\ 2\arctan x\qquad\quad\text{ }\text{ if }-1\le x\le1\\ -\pi-2\arctan x\quad\text{ if }x\le-1 \end{cases}$$

(Note, I've intentionally overlapped the intervals at $x=\pm1$ to stress the agreement of $\pi-2\arctan1=2\arctan1$ and $2\arctan(-1)=-\pi-2\arctan(-1)$.) The OP's observations regarding the integral follow.

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}

• It follows that $\arcsin\frac{2x}{1+x^2}=2\arctan x$, for all $x$, which is obviously false. – egreg May 16 '18 at 6:52
• @egreg : It's true if $-1\le x\le1,$ so I guess some piecewise stuff needs to be added$\,\ldots\qquad$ – Michael Hardy May 16 '18 at 16:30

We know that $\tan(\theta/2) = \frac{\sin(\theta)}{1+\cos(\theta)}$ and $\cos(\theta) = \sqrt{1-\sin^2(\theta)}$. So, letting $x = \sin(\theta)$ $(\implies \theta = \arcsin(x))$ we have:

$\tan(\theta/2) = \frac{x}{1+\sqrt{1-x^2}} \implies \frac{\theta}{2} = \arctan\left(\frac{x}{1+\sqrt{1-x^2}}\right) \implies \arcsin(x) = 2\arctan\left(\frac{x}{1+\sqrt{1-x^2}}\right)$.

With that in hands, we just have to calculate $\arcsin\left(\frac{2x}{1+x^2}\right) = 2\arctan\left(\frac{\frac{2x}{1+x^2}}{1+\sqrt{1-\frac{4x^2}{1+2x^2+x^4}}}\right)$.

Now observe that $\frac{\frac{2x}{1+x^2}}{1+\sqrt{1-\frac{4x^2}{1+2x^2+x^4}}} = \frac{\frac{2x}{1+x^2}}{1+\sqrt{\frac{1-2x^2+x^4}{1+2x^2+x^4}}} = \frac{\frac{2x}{1+x^2}}{1+\frac{1-x^2}{1+x^2}} = \frac{\frac{2x}{1+x^2}}{\frac{2}{1+x²}} = x$. I thik this solve the equality you were struggling with.

• It is true only for $x\in[-1\ 1]$ (otherwise $\arcsin x$ is not defined). Compare the graphs. – A.Γ. May 15 '18 at 11:13
• For all $x \in \mathbb{R}$ we have $2x/(1+x^2) \in [-1,1]$, otherwise $2x/(1+x²) < -1 \implies 2x < -1-x^2 \implies 0 < -(1+x)^2$. Contradiction. Analogously we can't have $1 < 2x/(1+x^2) \implies 1+x^2 < 2x \implies (1-x)^2 < 0$. – Xablau123 May 15 '18 at 11:36
• i'm sorry i dont get wht u r trying to say. my doubt wht was whether it has three cases for the solution ? – ss1729 May 15 '18 at 12:29
• When you take your solution and derivate it, you'll have $2\arctan(x)$. What I showed is that actually $2\arctan(x) = \arcsin(\frac{2x}{1+x^2})$ for every $x \in \mathbb{R}$ and, by my previously comment, it's "well-defined". – Xablau123 May 15 '18 at 12:42
• @Xablau123 ... and you will notice that it is not true if you look at their graphs in the link in my previous comment.Your mistake: when you take the square root you will get $|1-x^2|$. You forgot the absolute value there. – A.Γ. May 15 '18 at 13:36