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

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

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0368016, antiderivative size = 38, 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 \[ \sqrt{\frac{1-x}{x+1}} (x+1)-2 \tan ^{-1}\left (\sqrt{\frac{1-x}{x+1}}\right ) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 2.13615, size = 32, normalized size = 0.84 \[ \frac{2 \sqrt{\frac{- x + 1}{x + 1}}}{\frac{- x + 1}{x + 1} + 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))/((-x + 1)/(x + 1) + 1) - 2*atan(sqrt((-x + 1)/(x + 1)))

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.006, size = 39, 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 = 0.79345, size = 58, normalized size = 1.53 \[ -\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.271832, size = 43, normalized size = 1.13 \[{\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.272988, size = 39, normalized size = 1.03 \[ \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)