3.322 \(\int \sqrt{\frac{1+x}{1-x}} \, dx\)

Optimal. Leaf size=41 \[ 2 \tan ^{-1}\left (\sqrt{\frac{x+1}{1-x}}\right )-(1-x) \sqrt{\frac{x+1}{1-x}} \]

[Out]

-((1 - x)*Sqrt[(1 + x)/(1 - x)]) + 2*ArcTan[Sqrt[(1 + x)/(1 - x)]]

_______________________________________________________________________________________

Rubi [A]  time = 0.0304611, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ 2 \tan ^{-1}\left (\sqrt{\frac{x+1}{1-x}}\right )-(1-x) \sqrt{\frac{x+1}{1-x}} \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[(1 + x)/(1 - x)],x]

[Out]

-((1 - x)*Sqrt[(1 + x)/(1 - x)]) + 2*ArcTan[Sqrt[(1 + x)/(1 - x)]]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.69038, size = 32, normalized size = 0.78 \[ - \frac{2 \sqrt{\frac{x + 1}{- x + 1}}}{1 + \frac{x + 1}{- x + 1}} + 2 \operatorname{atan}{\left (\sqrt{\frac{x + 1}{- x + 1}} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(((1+x)/(1-x))**(1/2),x)

[Out]

-2*sqrt((x + 1)/(-x + 1))/(1 + (x + 1)/(-x + 1)) + 2*atan(sqrt((x + 1)/(-x + 1))
)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0419962, size = 60, normalized size = 1.46 \[ \frac{\sqrt{\frac{x+1}{1-x}} \left (\sqrt{x+1} (x-1)+2 \sqrt{1-x} \sin ^{-1}\left (\frac{\sqrt{x+1}}{\sqrt{2}}\right )\right )}{\sqrt{x+1}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[(1 + x)/(1 - x)],x]

[Out]

(Sqrt[(1 + x)/(1 - x)]*((-1 + x)*Sqrt[1 + x] + 2*Sqrt[1 - x]*ArcSin[Sqrt[1 + x]/
Sqrt[2]]))/Sqrt[1 + x]

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 41, normalized size = 1. \[{(-1+x)\sqrt{-{\frac{1+x}{-1+x}}} \left ( \sqrt{-{x}^{2}+1}-\arcsin \left ( x \right ) \right ){\frac{1}{\sqrt{- \left ( -1+x \right ) \left ( 1+x \right ) }}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(((1+x)/(1-x))^(1/2),x)

[Out]

(-(1+x)/(-1+x))^(1/2)*(-1+x)/(-(-1+x)*(1+x))^(1/2)*((-x^2+1)^(1/2)-arcsin(x))

_______________________________________________________________________________________

Maxima [A]  time = 1.53034, size = 58, normalized size = 1.41 \[ \frac{2 \, \sqrt{-\frac{x + 1}{x - 1}}}{\frac{x + 1}{x - 1} - 1} + 2 \, \arctan \left (\sqrt{-\frac{x + 1}{x - 1}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(-(x + 1)/(x - 1)),x, algorithm="maxima")

[Out]

2*sqrt(-(x + 1)/(x - 1))/((x + 1)/(x - 1) - 1) + 2*arctan(sqrt(-(x + 1)/(x - 1))
)

_______________________________________________________________________________________

Fricas [A]  time = 0.208365, size = 43, normalized size = 1.05 \[{\left (x - 1\right )} \sqrt{-\frac{x + 1}{x - 1}} + 2 \, \arctan \left (\sqrt{-\frac{x + 1}{x - 1}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(-(x + 1)/(x - 1)),x, algorithm="fricas")

[Out]

(x - 1)*sqrt(-(x + 1)/(x - 1)) + 2*arctan(sqrt(-(x + 1)/(x - 1)))

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{\frac{x + 1}{- x + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((1+x)/(1-x))**(1/2),x)

[Out]

Integral(sqrt((x + 1)/(-x + 1)), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.210591, size = 41, normalized size = 1. \[ \frac{1}{2} \, \pi{\rm sign}\left (x - 1\right ) - \arcsin \left (x\right ){\rm sign}\left (x - 1\right ) + \sqrt{-x^{2} + 1}{\rm sign}\left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(-(x + 1)/(x - 1)),x, algorithm="giac")

[Out]

1/2*pi*sign(x - 1) - arcsin(x)*sign(x - 1) + sqrt(-x^2 + 1)*sign(x - 1)