Optimal. Leaf size=25 \[ -\left (\left (2+\sqrt {x}\right ) \sqrt {1-x}\right )+\sin ^{-1}\left (\sqrt {x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {1412, 799, 794,
222} \begin {gather*} \text {ArcSin}\left (\sqrt {x}\right )-\left (\sqrt {x}+2\right ) \sqrt {1-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 222
Rule 794
Rule 799
Rule 1412
Rubi steps
\begin {align*} \int \frac {\sqrt {1-x}}{1-\sqrt {x}} \, dx &=2 \text {Subst}\left (\int \frac {x \sqrt {1-x^2}}{1-x} \, dx,x,\sqrt {x}\right )\\ &=-\left (2 \text {Subst}\left (\int \frac {(-1-x) x}{\sqrt {1-x^2}} \, dx,x,\sqrt {x}\right )\right )\\ &=-\left (2+\sqrt {x}\right ) \sqrt {1-x}+\text {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,\sqrt {x}\right )\\ &=-\left (2+\sqrt {x}\right ) \sqrt {1-x}+\sin ^{-1}\left (\sqrt {x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 42, normalized size = 1.68 \begin {gather*} \left (-2-\sqrt {x}\right ) \sqrt {1-x}+2 \tan ^{-1}\left (\frac {\sqrt {x}}{-1+\sqrt {1-x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(47\) vs.
\(2(19)=38\).
time = 0.25, size = 48, normalized size = 1.92
method | result | size |
default | \(-2 \sqrt {1-x}+\frac {\sqrt {1-x}\, \sqrt {x}\, \left (-2 \sqrt {-x \left (-1+x \right )}+\arcsin \left (2 x -1\right )\right )}{2 \sqrt {-x \left (-1+x \right )}}\) | \(48\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 36, normalized size = 1.44 \begin {gather*} -\sqrt {x} \sqrt {-x + 1} - 2 \, \sqrt {-x + 1} - \arctan \left (\frac {\sqrt {-x + 1}}{\sqrt {x}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 2.18, size = 87, normalized size = 3.48 \begin {gather*} 2 \left (\begin {cases} - \sqrt {1 - x} + \frac {i \operatorname {acosh}{\left (\sqrt {1 - x} \right )}}{2} - \frac {i \left (1 - x\right )^{\frac {3}{2}}}{2 \sqrt {- x}} + \frac {i \sqrt {1 - x}}{2 \sqrt {- x}} & \text {for}\: \left |{x - 1}\right | > 1 \\\frac {\sqrt {x} \sqrt {1 - x}}{2} - \sqrt {1 - x} + \frac {\operatorname {asin}{\left (\sqrt {1 - x} \right )}}{2} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.84, size = 32, normalized size = 1.28 \begin {gather*} -\sqrt {x} \sqrt {-x + 1} - 2 \, \sqrt {-x + 1} - \arcsin \left (\sqrt {-x + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.65, size = 40, normalized size = 1.60 \begin {gather*} 2\,\mathrm {atan}\left (\frac {\sqrt {x}}{\sqrt {1-x}-1}\right )-2\,\sqrt {1-x}-\sqrt {x}\,\sqrt {1-x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________