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

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

[Out]

Sqrt[-1 + x^(-1)]*x - ArcTan[Sqrt[-1 + x^(-1)]]

_______________________________________________________________________________________

Rubi [A]  time = 0.0293924, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385 \[ \sqrt{\frac{1}{x}-1} x-\tan ^{-1}\left (\sqrt{\frac{1}{x}-1}\right ) \]

Antiderivative was successfully verified.

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

[Out]

Sqrt[-1 + x^(-1)]*x - ArcTan[Sqrt[-1 + x^(-1)]]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.60218, size = 19, normalized size = 0.79 \[ x \sqrt{-1 + \frac{1}{x}} - \operatorname{atan}{\left (\sqrt{-1 + \frac{1}{x}} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.0229767, size = 40, normalized size = 1.67 \[ \sqrt{\frac{1}{x}-1} x-\frac{1}{2} \tan ^{-1}\left (\frac{\sqrt{\frac{1}{x}-1} (2 x-1)}{2 (x-1)}\right ) \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.767678, size = 50, normalized size = 2.08 \[ -\frac{\sqrt{-\frac{x - 1}{x}}}{\frac{x - 1}{x} - 1} - \arctan \left (\sqrt{-\frac{x - 1}{x}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-sqrt(-(x - 1)/x)/((x - 1)/x - 1) - arctan(sqrt(-(x - 1)/x))

_______________________________________________________________________________________

Fricas [A]  time = 0.269147, size = 35, normalized size = 1.46 \[ x \sqrt{-\frac{x - 1}{x}} - \arctan \left (\sqrt{-\frac{x - 1}{x}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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