Optimal. Leaf size=32 \[ \sqrt {-\frac {x}{1+x}} (1+x)-\tan ^{-1}\left (\sqrt {-\frac {x}{1+x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1979, 294, 210}
\begin {gather*} \sqrt {-\frac {x}{x+1}} (x+1)-\text {ArcTan}\left (\sqrt {-\frac {x}{x+1}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 294
Rule 1979
Rubi steps
\begin {align*} \int \sqrt {-\frac {x}{1+x}} \, dx &=-\left (2 \text {Subst}\left (\int \frac {x^2}{\left (-1-x^2\right )^2} \, dx,x,\sqrt {-\frac {x}{1+x}}\right )\right )\\ &=\sqrt {-\frac {x}{1+x}} (1+x)+\text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\sqrt {-\frac {x}{1+x}}\right )\\ &=\sqrt {-\frac {x}{1+x}} (1+x)-\tan ^{-1}\left (\sqrt {-\frac {x}{1+x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 49, normalized size = 1.53 \begin {gather*} \frac {\sqrt {-\frac {x}{1+x}} \left (\sqrt {x} (1+x)-\sqrt {1+x} \tanh ^{-1}\left (\sqrt {\frac {x}{1+x}}\right )\right )}{\sqrt {x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 46, normalized size = 1.44
method | result | size |
risch | \(\left (1+x \right ) \sqrt {-\frac {x}{1+x}}-\frac {\arcsin \left (2 x +1\right ) \sqrt {-\frac {x}{1+x}}\, \sqrt {-x \left (1+x \right )}}{2 x}\) | \(45\) |
default | \(\frac {\sqrt {-\frac {x}{1+x}}\, \left (1+x \right ) \left (2 \sqrt {x^{2}+x}-\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )\right )}{2 \sqrt {x \left (1+x \right )}}\) | \(46\) |
trager | \(2 \left (\frac {1}{2}+\frac {x}{2}\right ) \sqrt {-\frac {x}{1+x}}-\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (2 x \RootOf \left (\textit {\_Z}^{2}+1\right )+2 \sqrt {-\frac {x}{1+x}}\, x +\RootOf \left (\textit {\_Z}^{2}+1\right )+2 \sqrt {-\frac {x}{1+x}}\right )}{2}\) | \(69\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 37, normalized size = 1.16 \begin {gather*} -\frac {\sqrt {-\frac {x}{x + 1}}}{\frac {x}{x + 1} - 1} - \arctan \left (\sqrt {-\frac {x}{x + 1}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 28, normalized size = 0.88 \begin {gather*} {\left (x + 1\right )} \sqrt {-\frac {x}{x + 1}} - \arctan \left (\sqrt {-\frac {x}{x + 1}}\right ) \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 \sqrt {- \frac {x}{x + 1}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.59, size = 36, normalized size = 1.12 \begin {gather*} \frac {1}{4} \, \pi \mathrm {sgn}\left (x + 1\right ) + \frac {1}{2} \, \arcsin \left (2 \, x + 1\right ) \mathrm {sgn}\left (x + 1\right ) + \sqrt {-x^{2} - x} \mathrm {sgn}\left (x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.13, size = 37, normalized size = 1.16 \begin {gather*} -\mathrm {atan}\left (\sqrt {-\frac {x}{x+1}}\right )-\frac {\sqrt {-\frac {x}{x+1}}}{\frac {x}{x+1}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________