Optimal. Leaf size=24 \[ \sqrt{\frac{1}{x}-1} x-\tan ^{-1}\left (\sqrt{\frac{1}{x}-1}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0089003, 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, Rules used = {1972, 242, 47, 63, 203} \[ \sqrt{\frac{1}{x}-1} x-\tan ^{-1}\left (\sqrt{\frac{1}{x}-1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1972
Rule 242
Rule 47
Rule 63
Rule 203
Rubi steps
\begin{align*} \int \sqrt{\frac{1-x}{x}} \, dx &=\int \sqrt{-1+\frac{1}{x}} \, dx\\ &=-\operatorname{Subst}\left (\int \frac{\sqrt{-1+x}}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{-1+\frac{1}{x}} x-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{\sqrt{-1+x} x} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{-1+\frac{1}{x}} x-\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sqrt{-1+\frac{1}{x}}\right )\\ &=\sqrt{-1+\frac{1}{x}} x-\tan ^{-1}\left (\sqrt{-1+\frac{1}{x}}\right )\\ \end{align*}
Mathematica [A] time = 0.0074142, size = 24, normalized size = 1. \[ \sqrt{\frac{1}{x}-1} x-\tan ^{-1}\left (\sqrt{\frac{1}{x}-1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 40, normalized size = 1.7 \begin{align*}{\frac{x}{2}\sqrt{-{\frac{x-1}{x}}} \left ( 2\,\sqrt{-{x}^{2}+x}+\arcsin \left ( 2\,x-1 \right ) \right ){\frac{1}{\sqrt{-x \left ( x-1 \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.63696, size = 50, normalized size = 2.08 \begin{align*} -\frac{\sqrt{-\frac{x - 1}{x}}}{\frac{x - 1}{x} - 1} - \arctan \left (\sqrt{-\frac{x - 1}{x}}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.47866, size = 63, normalized size = 2.62 \begin{align*} x \sqrt{-\frac{x - 1}{x}} - \arctan \left (\sqrt{-\frac{x - 1}{x}}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\frac{1 - x}{x}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17534, size = 38, normalized size = 1.58 \begin{align*} \frac{1}{4} \, \pi \mathrm{sgn}\left (x\right ) + \frac{1}{2} \, \arcsin \left (2 \, x - 1\right ) \mathrm{sgn}\left (x\right ) + \sqrt{-x^{2} + x} \mathrm{sgn}\left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]