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

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

[Out]

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

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.74025, size = 22, normalized size = 0.76 \[ - 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/((-1-x)/x)**(1/2),x)

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.0235898, size = 43, normalized size = 1.48 \[ \frac{\sqrt{x} (x+1)-\sqrt{x+1} \sinh ^{-1}\left (\sqrt{x}\right )}{\sqrt{x} \sqrt{-\frac{x+1}{x}}} \]

Antiderivative was successfully verified.

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

[Out]

(Sqrt[x]*(1 + x) - Sqrt[1 + x]*ArcSinh[Sqrt[x]])/(Sqrt[x]*Sqrt[-((1 + x)/x)])

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.763151, size = 47, normalized size = 1.62 \[ -\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(1/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.268014, size = 34, normalized size = 1.17 \[ -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(1/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 \frac{1}{\sqrt{\frac{- x - 1}{x}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/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)