Optimal. Leaf size=140 \[ -\frac {1}{2} \text {RootSum}\left [\text {$\#$1}^6-2 \text {$\#$1}^3+2\& ,\frac {\log \left (\sqrt [3]{x^3-x^2}-\text {$\#$1} x\right )-\log (x)}{\text {$\#$1}}\& \right ]-\log \left (\sqrt [3]{x^3-x^2}-x\right )+\frac {1}{2} \log \left (x^2+\sqrt [3]{x^3-x^2} x+\left (x^3-x^2\right )^{2/3}\right )+\sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} x}{2 \sqrt [3]{x^3-x^2}+x}\right ) \]
________________________________________________________________________________________
Rubi [C] time = 0.51, antiderivative size = 489, normalized size of antiderivative = 3.49, number of steps used = 8, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {2056, 6725, 59, 912, 91} \begin {gather*} -\frac {3 \sqrt [3]{x-1} x^{2/3} \log \left (\frac {\sqrt [3]{x-1}}{\sqrt [3]{x}}-1\right )}{2 \sqrt [3]{x^3-x^2}}-\frac {3 \sqrt [3]{x-1} x^{2/3} \log \left (-\sqrt [3]{x}+\frac {\sqrt [3]{x-1}}{\sqrt [3]{1-i}}\right )}{4 \sqrt [3]{1-i} \sqrt [3]{x^3-x^2}}-\frac {3 \sqrt [3]{x-1} x^{2/3} \log \left (-\sqrt [3]{x}+\frac {\sqrt [3]{x-1}}{\sqrt [3]{1+i}}\right )}{4 \sqrt [3]{1+i} \sqrt [3]{x^3-x^2}}+\frac {\sqrt [3]{x-1} x^{2/3} \log (-x+i)}{4 \sqrt [3]{1+i} \sqrt [3]{x^3-x^2}}-\frac {\sqrt [3]{x-1} x^{2/3} \log (x)}{2 \sqrt [3]{x^3-x^2}}+\frac {\sqrt [3]{x-1} x^{2/3} \log (x+i)}{4 \sqrt [3]{1-i} \sqrt [3]{x^3-x^2}}-\frac {\sqrt {3} \sqrt [3]{x-1} x^{2/3} \tan ^{-1}\left (\frac {2 \sqrt [3]{x-1}}{\sqrt {3} \sqrt [3]{x}}+\frac {1}{\sqrt {3}}\right )}{\sqrt [3]{x^3-x^2}}-\frac {\sqrt {3} \sqrt [3]{x-1} x^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{x-1}}{\sqrt [3]{1-i} \sqrt {3} \sqrt [3]{x}}\right )}{2 \sqrt [3]{1-i} \sqrt [3]{x^3-x^2}}-\frac {\sqrt {3} \sqrt [3]{x-1} x^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{x-1}}{\sqrt [3]{1+i} \sqrt {3} \sqrt [3]{x}}\right )}{2 \sqrt [3]{1+i} \sqrt [3]{x^3-x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 59
Rule 91
Rule 912
Rule 2056
Rule 6725
Rubi steps
\begin {align*} \int \frac {2+x^2}{\left (1+x^2\right ) \sqrt [3]{-x^2+x^3}} \, dx &=\frac {\left (\sqrt [3]{-1+x} x^{2/3}\right ) \int \frac {2+x^2}{\sqrt [3]{-1+x} x^{2/3} \left (1+x^2\right )} \, dx}{\sqrt [3]{-x^2+x^3}}\\ &=\frac {\left (\sqrt [3]{-1+x} x^{2/3}\right ) \int \left (\frac {1}{\sqrt [3]{-1+x} x^{2/3}}+\frac {1}{\sqrt [3]{-1+x} x^{2/3} \left (1+x^2\right )}\right ) \, dx}{\sqrt [3]{-x^2+x^3}}\\ &=\frac {\left (\sqrt [3]{-1+x} x^{2/3}\right ) \int \frac {1}{\sqrt [3]{-1+x} x^{2/3}} \, dx}{\sqrt [3]{-x^2+x^3}}+\frac {\left (\sqrt [3]{-1+x} x^{2/3}\right ) \int \frac {1}{\sqrt [3]{-1+x} x^{2/3} \left (1+x^2\right )} \, dx}{\sqrt [3]{-x^2+x^3}}\\ &=-\frac {\sqrt {3} \sqrt [3]{-1+x} x^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{-1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{-x^2+x^3}}-\frac {3 \sqrt [3]{-1+x} x^{2/3} \log \left (-1+\frac {\sqrt [3]{-1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{-x^2+x^3}}-\frac {\sqrt [3]{-1+x} x^{2/3} \log (x)}{2 \sqrt [3]{-x^2+x^3}}+\frac {\left (\sqrt [3]{-1+x} x^{2/3}\right ) \int \left (\frac {i}{2 (i-x) \sqrt [3]{-1+x} x^{2/3}}+\frac {i}{2 \sqrt [3]{-1+x} x^{2/3} (i+x)}\right ) \, dx}{\sqrt [3]{-x^2+x^3}}\\ &=-\frac {\sqrt {3} \sqrt [3]{-1+x} x^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{-1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{-x^2+x^3}}-\frac {3 \sqrt [3]{-1+x} x^{2/3} \log \left (-1+\frac {\sqrt [3]{-1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{-x^2+x^3}}-\frac {\sqrt [3]{-1+x} x^{2/3} \log (x)}{2 \sqrt [3]{-x^2+x^3}}+\frac {\left (i \sqrt [3]{-1+x} x^{2/3}\right ) \int \frac {1}{(i-x) \sqrt [3]{-1+x} x^{2/3}} \, dx}{2 \sqrt [3]{-x^2+x^3}}+\frac {\left (i \sqrt [3]{-1+x} x^{2/3}\right ) \int \frac {1}{\sqrt [3]{-1+x} x^{2/3} (i+x)} \, dx}{2 \sqrt [3]{-x^2+x^3}}\\ &=-\frac {\sqrt {3} \sqrt [3]{-1+x} x^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{-1+x}}{\sqrt {3} \sqrt [3]{x}}\right )}{\sqrt [3]{-x^2+x^3}}-\frac {\sqrt {3} \sqrt [3]{-1+x} x^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{-1+x}}{\sqrt [3]{1-i} \sqrt {3} \sqrt [3]{x}}\right )}{2 \sqrt [3]{1-i} \sqrt [3]{-x^2+x^3}}-\frac {\sqrt {3} \sqrt [3]{-1+x} x^{2/3} \tan ^{-1}\left (\frac {1}{\sqrt {3}}+\frac {2 \sqrt [3]{-1+x}}{\sqrt [3]{1+i} \sqrt {3} \sqrt [3]{x}}\right )}{2 \sqrt [3]{1+i} \sqrt [3]{-x^2+x^3}}-\frac {3 \sqrt [3]{-1+x} x^{2/3} \log \left (-1+\frac {\sqrt [3]{-1+x}}{\sqrt [3]{x}}\right )}{2 \sqrt [3]{-x^2+x^3}}-\frac {3 \sqrt [3]{-1+x} x^{2/3} \log \left (\frac {\sqrt [3]{-1+x}}{\sqrt [3]{1-i}}-\sqrt [3]{x}\right )}{4 \sqrt [3]{1-i} \sqrt [3]{-x^2+x^3}}-\frac {3 \sqrt [3]{-1+x} x^{2/3} \log \left (\frac {\sqrt [3]{-1+x}}{\sqrt [3]{1+i}}-\sqrt [3]{x}\right )}{4 \sqrt [3]{1+i} \sqrt [3]{-x^2+x^3}}+\frac {\sqrt [3]{-1+x} x^{2/3} \log (i-x)}{4 \sqrt [3]{1+i} \sqrt [3]{-x^2+x^3}}-\frac {\sqrt [3]{-1+x} x^{2/3} \log (x)}{2 \sqrt [3]{-x^2+x^3}}+\frac {\sqrt [3]{-1+x} x^{2/3} \log (i+x)}{4 \sqrt [3]{1-i} \sqrt [3]{-x^2+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.08, size = 95, normalized size = 0.68 \begin {gather*} \frac {\left (\frac {3}{8}+\frac {3 i}{8}\right ) \left ((x-1) x^2\right )^{2/3} \left ((2-2 i) x^{2/3} \, _2F_1\left (\frac {2}{3},\frac {2}{3};\frac {5}{3};1-x\right )-i \, _2F_1\left (\frac {2}{3},1;\frac {5}{3};\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) (x-1)}{x}\right )+\, _2F_1\left (\frac {2}{3},1;\frac {5}{3};\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (x-1)}{x}\right )\right )}{x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.35, size = 140, normalized size = 1.00 \begin {gather*} \sqrt {3} \tan ^{-1}\left (\frac {\sqrt {3} x}{x+2 \sqrt [3]{-x^2+x^3}}\right )-\log \left (-x+\sqrt [3]{-x^2+x^3}\right )+\frac {1}{2} \log \left (x^2+x \sqrt [3]{-x^2+x^3}+\left (-x^2+x^3\right )^{2/3}\right )-\frac {1}{2} \text {RootSum}\left [2-2 \text {$\#$1}^3+\text {$\#$1}^6\&,\frac {-\log (x)+\log \left (\sqrt [3]{-x^2+x^3}-x \text {$\#$1}\right )}{\text {$\#$1}}\&\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.74, size = 1652, normalized size = 11.80
result too large to display
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} + 2}{{\left (x^{3} - x^{2}\right )}^{\frac {1}{3}} {\left (x^{2} + 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 25.66, size = 12421, normalized size = 88.72
method | result | size |
trager | \(\text {Expression too large to display}\) | \(12421\) |
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} + 2}{{\left (x^{3} - x^{2}\right )}^{\frac {1}{3}} {\left (x^{2} + 1\right )}}\,{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.01 \begin {gather*} \int \frac {x^2+2}{\left (x^2+1\right )\,{\left (x^3-x^2\right )}^{1/3}} \,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^{2} + 2}{\sqrt [3]{x^{2} \left (x - 1\right )} \left (x^{2} + 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________