Optimal. Leaf size=58 \[ -\frac {3}{4} \tan ^{-1}\left (\frac {2 \sqrt {x^3-x}}{x^2-2 x-1}\right )-\frac {1}{4} \tanh ^{-1}\left (\frac {\frac {x^2}{2}+x-\frac {1}{2}}{\sqrt {x^3-x}}\right ) \]
________________________________________________________________________________________
Rubi [C] time = 0.69, antiderivative size = 182, normalized size of antiderivative = 3.14, number of steps used = 13, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {2056, 6725, 329, 222, 933, 168, 537} \begin {gather*} \frac {\sqrt {2} \sqrt {x-1} \sqrt {x} \sqrt {x+1} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {x-1}}\right )|\frac {1}{2}\right )}{\sqrt {x^3-x}}+\frac {\left (\frac {1}{2}+\frac {3 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}-\frac {i}{2};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {x^3-x}}+\frac {\left (\frac {1}{2}-\frac {3 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}+\frac {i}{2};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {x^3-x}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 168
Rule 222
Rule 329
Rule 537
Rule 933
Rule 2056
Rule 6725
Rubi steps
\begin {align*} \int \frac {-1+x+x^2}{\left (1+x^2\right ) \sqrt {-x+x^3}} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {-1+x+x^2}{\sqrt {x} \sqrt {-1+x^2} \left (1+x^2\right )} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \left (\frac {1}{\sqrt {x} \sqrt {-1+x^2}}-\frac {2-x}{\sqrt {x} \sqrt {-1+x^2} \left (1+x^2\right )}\right ) \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{\sqrt {x} \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {2-x}{\sqrt {x} \sqrt {-1+x^2} \left (1+x^2\right )} \, dx}{\sqrt {-x+x^3}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \left (\frac {\frac {1}{2}+i}{(i-x) \sqrt {x} \sqrt {-1+x^2}}-\frac {\frac {1}{2}-i}{\sqrt {x} (i+x) \sqrt {-1+x^2}}\right ) \, dx}{\sqrt {-x+x^3}}+\frac {\left (2 \sqrt {x} \sqrt {-1+x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}--\frac {\left (\left (\frac {1}{2}-i\right ) \sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{\sqrt {x} (i+x) \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}-\frac {\left (\left (\frac {1}{2}+i\right ) \sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{(i-x) \sqrt {x} \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}--\frac {\left (\left (\frac {1}{2}-i\right ) \sqrt {x} \sqrt {1-x^2}\right ) \int \frac {1}{\sqrt {1-x} \sqrt {x} (i+x) \sqrt {1+x}} \, dx}{\sqrt {-x+x^3}}-\frac {\left (\left (\frac {1}{2}+i\right ) \sqrt {x} \sqrt {1-x^2}\right ) \int \frac {1}{(i-x) \sqrt {1-x} \sqrt {x} \sqrt {1+x}} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}--\frac {\left ((1+2 i) \sqrt {x} \sqrt {1-x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {2-x^2} \left ((-1+i)+x^2\right )} \, dx,x,\sqrt {1-x}\right )}{\sqrt {-x+x^3}}-\frac {\left ((1-2 i) \sqrt {x} \sqrt {1-x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \left ((1+i)-x^2\right ) \sqrt {2-x^2}} \, dx,x,\sqrt {1-x}\right )}{\sqrt {-x+x^3}}\\ &=\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}+\frac {\left (\frac {1}{2}+\frac {3 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}-\frac {i}{2};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {-x+x^3}}+\frac {\left (\frac {1}{2}-\frac {3 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}+\frac {i}{2};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {-x+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.19, size = 95, normalized size = 1.64 \begin {gather*} \frac {2 x \sqrt {1-x^2} \left (x \left (5 F_1\left (\frac {3}{4};\frac {1}{2},1;\frac {7}{4};x^2,-x^2\right )+3 x F_1\left (\frac {5}{4};\frac {1}{2},1;\frac {9}{4};x^2,-x^2\right )\right )-15 F_1\left (\frac {1}{4};\frac {1}{2},1;\frac {5}{4};x^2,-x^2\right )\right )}{15 \sqrt {x \left (x^2-1\right )}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.26, size = 58, normalized size = 1.00 \begin {gather*} -\frac {3}{4} \tan ^{-1}\left (\frac {2 \sqrt {x^3-x}}{x^2-2 x-1}\right )-\frac {1}{4} \tanh ^{-1}\left (\frac {\frac {x^2}{2}+x-\frac {1}{2}}{\sqrt {x^3-x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 76, normalized size = 1.31 \begin {gather*} \frac {3}{4} \, \arctan \left (\frac {x^{2} - 2 \, x - 1}{2 \, \sqrt {x^{3} - x}}\right ) + \frac {1}{8} \, \log \left (\frac {x^{4} + 8 \, x^{3} + 2 \, x^{2} - 4 \, \sqrt {x^{3} - x} {\left (x^{2} + 2 \, x - 1\right )} - 8 \, x + 1}{x^{4} + 2 \, x^{2} + 1}\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^{2} + x - 1}{\sqrt {x^{3} - x} {\left (x^{2} + 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.03, size = 210, normalized size = 3.62 \begin {gather*} \frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticF \left (\sqrt {1+x}, \frac {\sqrt {2}}{2}\right )}{\sqrt {x^{3}-x}}-\frac {3 \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {3 \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}+\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{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^{2} + x - 1}{\sqrt {x^{3} - x} {\left (x^{2} + 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.56, size = 100, normalized size = 1.72 \begin {gather*} \frac {-2\,\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\mathrm {F}\left (\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )+\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (-\mathrm {i};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )\,\left (2+1{}\mathrm {i}\right )+\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (1{}\mathrm {i};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )\,\left (2-\mathrm {i}\right )}{\sqrt {x^3-x}} \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^{2} + x - 1}{\sqrt {x \left (x - 1\right ) \left (x + 1\right )} \left (x^{2} + 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________