Optimal. Leaf size=29 \[ \tan ^{-1}\left (\sqrt {-\frac {x+1}{x}}\right )-x \sqrt {-\frac {x+1}{x}} \]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {1972, 242, 51, 63, 204} \begin {gather*} \tan ^{-1}\left (\sqrt {-\frac {x+1}{x}}\right )-x \sqrt {-\frac {x+1}{x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 51
Rule 63
Rule 204
Rule 242
Rule 1972
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {\frac {-1-x}{x}}} \, dx &=\int \frac {1}{\sqrt {-1-\frac {1}{x}}} \, dx\\ &=-\operatorname {Subst}\left (\int \frac {1}{\sqrt {-1-x} x^2} \, dx,x,\frac {1}{x}\right )\\ &=-x \sqrt {-\frac {1+x}{x}}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1-x} x} \, dx,x,\frac {1}{x}\right )\\ &=-x \sqrt {-\frac {1+x}{x}}-\operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\sqrt {-\frac {1+x}{x}}\right )\\ &=-x \sqrt {-\frac {1+x}{x}}+\tan ^{-1}\left (\sqrt {-\frac {1+x}{x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 43, normalized size = 1.48 \begin {gather*} \frac {\sqrt {x} (x+1)-\sqrt {x+1} \sinh ^{-1}\left (\sqrt {x}\right )}{\sqrt {x} \sqrt {-\frac {x+1}{x}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.03, size = 31, normalized size = 1.07 \begin {gather*} \tan ^{-1}\left (\sqrt {\frac {-x-1}{x}}\right )-\sqrt {\frac {-x-1}{x}} x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 25, normalized size = 0.86 \begin {gather*} -x \sqrt {-\frac {x + 1}{x}} + \arctan \left (\sqrt {-\frac {x + 1}{x}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.46, size = 35, normalized size = 1.21 \begin {gather*} \frac {1}{4} \, \pi \mathrm {sgn}\relax (x) - \frac {\arcsin \left (2 \, x + 1\right )}{2 \, \mathrm {sgn}\relax (x)} - \frac {\sqrt {-x^{2} - x}}{\mathrm {sgn}\relax (x)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 44, normalized size = 1.52 \begin {gather*} \frac {\left (x +1\right ) \left (\arcsin \left (2 x +1\right )+2 \sqrt {-x^{2}-x}\right )}{2 \sqrt {-\frac {x +1}{x}}\, \sqrt {-\left (x +1\right ) x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.97, size = 35, normalized size = 1.21 \begin {gather*} -\frac {\sqrt {-\frac {x + 1}{x}}}{\frac {x + 1}{x} - 1} + \arctan \left (\sqrt {-\frac {x + 1}{x}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.37, size = 23, normalized size = 0.79 \begin {gather*} \mathrm {atan}\left (\sqrt {-\frac {1}{x}-1}\right )-x\,\sqrt {-\frac {1}{x}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {\frac {- x - 1}{x}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________