Optimal. Leaf size=85 \[ \frac {1}{4} \left (\sqrt {2}-2\right ) \tan ^{-1}\left (\frac {\sqrt {3-2 \sqrt {2}} \sqrt {x^3-x}}{x+1}\right )+\frac {1}{4} \left (2+\sqrt {2}\right ) \tan ^{-1}\left (\frac {\sqrt {3+2 \sqrt {2}} \sqrt {x^3-x}}{x+1}\right ) \]
________________________________________________________________________________________
Rubi [C] time = 0.56, antiderivative size = 137, normalized size of antiderivative = 1.61, number of steps used = 9, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2056, 6728, 933, 168, 537} \begin {gather*} -\frac {\sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2+\sqrt {2}};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \left (2+\sqrt {2}\right ) \sqrt {x^3-x}}-\frac {\sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2} \left (2+\sqrt {2}\right );\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \left (2-\sqrt {2}\right ) \sqrt {x^3-x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 168
Rule 537
Rule 933
Rule 2056
Rule 6728
Rubi steps
\begin {align*} \int \frac {1+x}{\left (-1+2 x+x^2\right ) \sqrt {-x+x^3}} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1+x}{\sqrt {x} \sqrt {-1+x^2} \left (-1+2 x+x^2\right )} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \left (\frac {1}{\sqrt {x} \left (2-2 \sqrt {2}+2 x\right ) \sqrt {-1+x^2}}+\frac {1}{\sqrt {x} \left (2+2 \sqrt {2}+2 x\right ) \sqrt {-1+x^2}}\right ) \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{\sqrt {x} \left (2-2 \sqrt {2}+2 x\right ) \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}+\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{\sqrt {x} \left (2+2 \sqrt {2}+2 x\right ) \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\left (\sqrt {x} \sqrt {1-x^2}\right ) \int \frac {1}{\sqrt {1-x} \sqrt {x} \sqrt {1+x} \left (2-2 \sqrt {2}+2 x\right )} \, dx}{\sqrt {-x+x^3}}+\frac {\left (\sqrt {x} \sqrt {1-x^2}\right ) \int \frac {1}{\sqrt {1-x} \sqrt {x} \sqrt {1+x} \left (2+2 \sqrt {2}+2 x\right )} \, dx}{\sqrt {-x+x^3}}\\ &=-\frac {\left (2 \sqrt {x} \sqrt {1-x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (2 \left (2-\sqrt {2}\right )-2 x^2\right ) \sqrt {1-x^2} \sqrt {2-x^2}} \, dx,x,\sqrt {1-x}\right )}{\sqrt {-x+x^3}}-\frac {\left (2 \sqrt {x} \sqrt {1-x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (2 \left (2+\sqrt {2}\right )-2 x^2\right ) \sqrt {1-x^2} \sqrt {2-x^2}} \, dx,x,\sqrt {1-x}\right )}{\sqrt {-x+x^3}}\\ &=-\frac {\sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2+\sqrt {2}};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \left (2+\sqrt {2}\right ) \sqrt {-x+x^3}}-\frac {\sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2} \left (2+\sqrt {2}\right );\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \left (2-\sqrt {2}\right ) \sqrt {-x+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.78, size = 89, normalized size = 1.05 \begin {gather*} -\frac {\sqrt {1-\frac {1}{x^2}} x^{3/2} \left (-2 F\left (\left .\sin ^{-1}\left (\frac {1}{\sqrt {x}}\right )\right |-1\right )-\left (\sqrt {2}-1\right ) \Pi \left (-1-\sqrt {2};\left .\sin ^{-1}\left (\frac {1}{\sqrt {x}}\right )\right |-1\right )+\left (1+\sqrt {2}\right ) \Pi \left (-1+\sqrt {2};\left .\sin ^{-1}\left (\frac {1}{\sqrt {x}}\right )\right |-1\right )\right )}{\sqrt {x \left (x^2-1\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.59, size = 73, normalized size = 0.86 \begin {gather*} \frac {1}{4} \left (\sqrt {2}-2\right ) \tan ^{-1}\left (\frac {\left (\sqrt {2}-1\right ) \sqrt {x^3-x}}{x+1}\right )+\frac {1}{4} \left (2+\sqrt {2}\right ) \tan ^{-1}\left (\frac {\left (1+\sqrt {2}\right ) \sqrt {x^3-x}}{x+1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 101, normalized size = 1.19 \begin {gather*} \frac {1}{4} \, \sqrt {2} \sqrt {2 \, \sqrt {2} + 3} \arctan \left (\frac {\sqrt {x^{3} - x} \sqrt {2 \, \sqrt {2} + 3} {\left (2 \, \sqrt {2} - 3\right )}}{x^{2} - x}\right ) + \frac {1}{4} \, \sqrt {2} \sqrt {-2 \, \sqrt {2} + 3} \arctan \left (\frac {\sqrt {x^{3} - x} {\left (2 \, \sqrt {2} + 3\right )} \sqrt {-2 \, \sqrt {2} + 3}}{x^{2} - x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x + 1}{\sqrt {x^{3} - x} {\left (x^{2} + 2 \, x - 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.03, size = 96, normalized size = 1.13 \begin {gather*} -\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \sqrt {2}\, \EllipticPi \left (\sqrt {1+x}, \frac {\sqrt {2}}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}+\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \sqrt {2}\, \EllipticPi \left (\sqrt {1+x}, -\frac {\sqrt {2}}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}} \end {gather*}
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*} \int \frac {x + 1}{\sqrt {x^{3} - x} {\left (x^{2} + 2 \, x - 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 102, normalized size = 1.20 \begin {gather*} \frac {\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (-\frac {1}{\sqrt {2}-1};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{\sqrt {x^3-x}\,\left (\sqrt {2}-1\right )}-\frac {\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (\frac {1}{\sqrt {2}+1};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{\sqrt {x^3-x}\,\left (\sqrt {2}+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 \frac {x + 1}{\sqrt {x \left (x - 1\right ) \left (x + 1\right )} \left (x^{2} + 2 x - 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________