3
$\begingroup$

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

$$\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}xdx&\text{ if }|x|\leq{1}\\\int\pi dx-\int2\tan^{-1}xdx&\text{ if }|x|>{1}&\text{ and }x>0\\-\int\pi dx-\int2\tan^{-1}xdx&\text{ if }|x|>{1}&\text{ and }x<0\end{cases}=\begin{cases}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}$$

How do I obtain the case by case result for this type of indefinite integral ?

I tried

Integrate[ArcSin[2*x/(1 + x^2)], x]

which is not giving the required result.

$\endgroup$
8
  • $\begingroup$ Is $\sin^{-1}x$ supposed to be $\asin x$? That would be really helpful to differentiate from $(\sin x) ^{-1}$ $\endgroup$
    – LLlAMnYP
    May 15, 2018 at 16:37
  • 1
    $\begingroup$ @LLlAMnYP $\sin^{-1}\equiv\arcsin$ $\endgroup$
    – Sooraj S
    May 15, 2018 at 16:38
  • 1
    $\begingroup$ Many would disagree :-) $\endgroup$
    – LLlAMnYP
    May 15, 2018 at 17:10
  • 1
    $\begingroup$ Probably is not exactly what you were looking for, but you can try breaking the integral in the three different cases: FullSimplify[Integrate[ArcSin[(2 x)/(1 + x^2)], x], -1 <= x <= 1] FullSimplify[Integrate[ArcSin[(2 x)/(1 + x^2)], x], x > 1] FullSimplify[Integrate[ArcSin[(2 x)/(1 + x^2)], x], x < -1] $\endgroup$
    – Fraccalo
    May 15, 2018 at 17:12
  • 4
    $\begingroup$ @LLlAMnYP why 'd that be ?. $(\sin x)^{-1}$ is not same as $\sin^{-1}x$. Rather $(\sin x)^{-1}=\frac{1}{\sin x}$ and $\sin^{-1}x=\arcsin x$. I think this is how it is commonly defined. $\endgroup$
    – Sooraj S
    May 15, 2018 at 17:19

1 Answer 1

7
$\begingroup$
FullSimplify[ComplexExpand[ArcSin[(2 x)/(1 + x^2)], TargetFunctions->{Re, Im}], x ∈ Reals]
Integrate[% /. Abs -> RealAbs, x]
% // Simplify
Resolve[ForAll[x, Evaluate[ArcSin[(2 x)/(1 + x^2)] == D[%, x]]], Reals]

ArcTan[Abs[-1 + x^2], 2 x]

$\begin{array}{cc} \{ & \begin{array}{cc} x \tan ^{-1}\left(x^2-1,2 x\right)+\log \left(x^2+1\right) & x\leq -1 \\ x \tan ^{-1}\left(1-x^2,2 x\right)-\log \left(x^2+1\right)+2 \log (2) & -1<x\leq 1 \\ x \tan ^{-1}\left(x^2-1,2 x\right)+\log \left(x^2+1\right) & \text{True} \\ \end{array} \\ \end{array}$

$\begin{array}{cc} \{ & \begin{array}{cc} x \tan ^{-1}\left(1-x^2,2 x\right)-\log \left(x^2+1\right)+\log (4) & -1<x\leq 1 \\ x \tan ^{-1}\left(x^2-1,2 x\right)+\log \left(x^2+1\right) & \text{True} \\ \end{array} \\ \end{array}$

True

Another way: $$\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}=\begin{cases}2\tan^{-1}x&\text{ if }|x|\leq{1}\\2 \tan ^{-1}\left(\frac{1}{x}\right)&\text{ if }x > 1&\text{or } x < -1\end{cases}$$ This can be verified with Mathematica

FullSimplify[π - 2 ArcTan[x] == 2 ArcTan[1/x], {Abs[x] > 1, x > 0}]
FullSimplify[-π - 2 ArcTan[x] == 2 ArcTan[1/x], {Abs[x] > 1, x < 0}]
Reduce[(Abs[x] > 1 && x > 0) || (Abs[x] > 1 && x < 0), x, Reals]

True

True

x < -1 || x > 1

expr = ArcSin[(2 x)/(1 + x^2)];
sol = Solve[Reduce[{y == expr}, x, Reals] // Simplify, y, Reals(*,MaxExtraConditions -> All*)]
pw = y /. sol /. ConditionalExpression -> List // Piecewise
int = Integrate[pw, x] // Simplify
Resolve[ForAll[x, Evaluate[expr == D[int, x]]], Reals]

{{y -> ConditionalExpression[2 ArcTan[1/x], x > 1 || x < -1]},

{y -> ConditionalExpression[2 ArcTan[x], -1 < x < 0 || 0 < x < 1]}}

$\begin{array}{cc} \{ & \begin{array}{cc} -\log \left(x^2+1\right)+2 x \tan ^{-1}(x)+\log (4) & -1<x\leq 1 \\ \log \left(x^2+1\right)+2 x \tan ^{-1}\left(\frac{1}{x}\right) & \text{True} \\ \end{array} \\ \end{array}$

True

$\endgroup$
1
  • $\begingroup$ If you want to avoid conversion to RealAbs, you can do Assuming[x ∈ Reals, PiecewiseExpand[ FullSimplify[ ComplexExpand[ArcSin[(2 x)/(1 + x^2)], TargetFunctions -> {Re, Im}]]]] and then Integrate[%, x] gives a piecewise result with 3 terms. $\endgroup$
    – Greg Hurst
    May 16, 2018 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.