Optimal. Leaf size=46 \[ \frac {2}{3} \tanh ^{-1}\left (\frac {(x-1) \left (x^3-2\right )}{x \sqrt {x^6-2 x^5+x^4-2 x^3+4 x^2-2 x}}\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.61, antiderivative size = 113, normalized size of antiderivative = 2.46, number of steps used = 8, number of rules used = 8, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.216, Rules used = {1593, 2056, 6688, 6719, 329, 275, 217, 206} \begin {gather*} -\frac {2 (1-x) \sqrt {x} \sqrt {x^3-2} \sqrt {x^5-2 x^4+x^3-2 x^2+4 x-2} \tanh ^{-1}\left (\frac {x^{3/2}}{\sqrt {x^3-2}}\right )}{3 \sqrt {-(1-x)^2 \left (2-x^3\right )} \sqrt {x^6-2 x^5+x^4-2 x^3+4 x^2-2 x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 217
Rule 275
Rule 329
Rule 1593
Rule 2056
Rule 6688
Rule 6719
Rubi steps
\begin {align*} \int \frac {-x+x^2}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}} \, dx &=\int \frac {(-1+x) x}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}} \, dx\\ &=\frac {\left (\sqrt {x} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \int \frac {(-1+x) \sqrt {x}}{\sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}} \, dx}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (\sqrt {x} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \int \frac {(-1+x) \sqrt {x}}{\sqrt {(-1+x)^2 \left (-2+x^3\right )}} \, dx}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left ((-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \int \frac {\sqrt {x}}{\sqrt {-2+x^3}} \, dx}{\sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (2 (-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \operatorname {Subst}\left (\int \frac {x^2}{\sqrt {-2+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (2 (-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-2+x^2}} \, dx,x,x^{3/2}\right )}{3 \sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (2 (-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x^{3/2}}{\sqrt {-2+x^3}}\right )}{3 \sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=-\frac {2 (1-x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5} \tanh ^{-1}\left (\frac {x^{3/2}}{\sqrt {-2+x^3}}\right )}{3 \sqrt {-(1-x)^2 \left (2-x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 53, normalized size = 1.15 \begin {gather*} \frac {2 (x-1) \sqrt {x} \sqrt {x^3-2} \tanh ^{-1}\left (\frac {x^{3/2}}{\sqrt {x^3-2}}\right )}{3 \sqrt {(x-1)^2 x \left (x^3-2\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.39, size = 46, normalized size = 1.00 \begin {gather*} \frac {2}{3} \tanh ^{-1}\left (\frac {(-1+x) \left (-2+x^3\right )}{x \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 52, normalized size = 1.13 \begin {gather*} \frac {1}{3} \, \log \left (-\frac {x^{4} - x^{3} + \sqrt {x^{6} - 2 \, x^{5} + x^{4} - 2 \, x^{3} + 4 \, x^{2} - 2 \, x} x - x + 1}{x - 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 42, normalized size = 0.91 \begin {gather*} \frac {\log \left (\sqrt {-\frac {2}{x^{3}} + 1} + 1\right ) - \log \left ({\left | \sqrt {-\frac {2}{x^{3}} + 1} - 1 \right |}\right )}{3 \, \mathrm {sgn}\left (\frac {1}{x^{3}} - \frac {1}{x^{4}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.50, size = 53, normalized size = 1.15
method | result | size |
trager | \(\frac {\ln \left (-\frac {x^{4}-x^{3}+x \sqrt {x^{6}-2 x^{5}+x^{4}-2 x^{3}+4 x^{2}-2 x}-x +1}{-1+x}\right )}{3}\) | \(53\) |
default | \(-\frac {4 \left (-1+x \right ) \sqrt {x \left (x^{3}-2\right )}\, \left (1+i \sqrt {3}\right ) \sqrt {-\frac {\left (3+i \sqrt {3}\right ) x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}\, \left (-x +2^{\frac {1}{3}}\right )^{2} \sqrt {\frac {i \sqrt {3}\, 2^{\frac {1}{3}}-2^{\frac {1}{3}}-2 x}{\left (i \sqrt {3}-1\right ) \left (-x +2^{\frac {1}{3}}\right )}}\, \sqrt {\frac {i \sqrt {3}\, 2^{\frac {1}{3}}+2^{\frac {1}{3}}+2 x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}\, \left (\EllipticF \left (\sqrt {-\frac {\left (3+i \sqrt {3}\right ) x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}, \sqrt {\frac {\left (-3+i \sqrt {3}\right ) \left (1+i \sqrt {3}\right )}{\left (i \sqrt {3}-1\right ) \left (3+i \sqrt {3}\right )}}\right )-\EllipticPi \left (\sqrt {-\frac {\left (3+i \sqrt {3}\right ) x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}, \frac {1+i \sqrt {3}}{3+i \sqrt {3}}, \sqrt {\frac {\left (-3+i \sqrt {3}\right ) \left (1+i \sqrt {3}\right )}{\left (i \sqrt {3}-1\right ) \left (3+i \sqrt {3}\right )}}\right )\right )}{\sqrt {x^{6}-2 x^{5}+x^{4}-2 x^{3}+4 x^{2}-2 x}\, \left (3+i \sqrt {3}\right ) \sqrt {x \left (-x +2^{\frac {1}{3}}\right ) \left (i \sqrt {3}\, 2^{\frac {1}{3}}-2^{\frac {1}{3}}-2 x \right ) \left (i \sqrt {3}\, 2^{\frac {1}{3}}+2^{\frac {1}{3}}+2 x \right )}}\) | \(390\) |
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}{\sqrt {x^{6} - 2 \, x^{5} + x^{4} - 2 \, x^{3} + 4 \, x^{2} - 2 \, x}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int -\frac {x-x^2}{\sqrt {x^6-2\,x^5+x^4-2\,x^3+4\,x^2-2\,x}} \,d 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 \left (x - 1\right )}{\sqrt {x \left (x - 1\right )^{2} \left (x^{3} - 2\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________