Optimal. Leaf size=107 \[ \frac {3 \sqrt [3]{x+x^3}}{4 x}-\frac {1}{8} \text {RootSum}\left [7-10 \text {$\#$1}^3+4 \text {$\#$1}^6\& ,\frac {-7 \log (x)+7 \log \left (\sqrt [3]{x+x^3}-x \text {$\#$1}\right )+4 \log (x) \text {$\#$1}^3-4 \log \left (\sqrt [3]{x+x^3}-x \text {$\#$1}\right ) \text {$\#$1}^3}{-5 \text {$\#$1}^2+4 \text {$\#$1}^5}\& \right ] \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains complex when optimal does not.
time = 0.75, antiderivative size = 763, normalized size of antiderivative = 7.13, number of steps
used = 13, number of rules used = 7, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {2081, 6860,
477, 476, 486, 12, 503} \begin {gather*} -\frac {\left (1-i \sqrt {3}\right ) \sqrt [3]{x^3+x} \text {ArcTan}\left (\frac {1+\frac {2 x^{2/3}}{\sqrt [3]{\frac {-\sqrt {3}+i}{-\sqrt {3}+2 i}} \sqrt [3]{x^2+1}}}{\sqrt {3}}\right )}{4 \left (-\sqrt {3}+i\right ) \sqrt [3]{\frac {-\sqrt {3}+i}{-\sqrt {3}+2 i}} \sqrt [3]{x} \sqrt [3]{x^2+1}}+\frac {\left (1+i \sqrt {3}\right ) \sqrt [3]{x^3+x} \text {ArcTan}\left (\frac {1+\frac {2 x^{2/3}}{\sqrt [3]{\frac {\sqrt {3}+i}{\sqrt {3}+2 i}} \sqrt [3]{x^2+1}}}{\sqrt {3}}\right )}{4 \left (\sqrt {3}+i\right ) \sqrt [3]{\frac {\sqrt {3}+i}{\sqrt {3}+2 i}} \sqrt [3]{x} \sqrt [3]{x^2+1}}+\frac {\left (\sqrt {3}+3 i\right ) \sqrt [3]{x^3+x}}{4 \left (\sqrt {3}+i\right ) x}+\frac {\left (-\sqrt {3}+3 i\right ) \sqrt [3]{x^3+x}}{4 \left (-\sqrt {3}+i\right ) x}-\frac {\left (\sqrt {3}+3 i\right ) \sqrt [3]{x^3+x} \log \left (-x^2-i \sqrt {3}+1\right )}{24 \left (\sqrt {3}+i\right ) \sqrt [3]{\frac {\sqrt {3}+i}{\sqrt {3}+2 i}} \sqrt [3]{x} \sqrt [3]{x^2+1}}-\frac {\left (-\sqrt {3}+3 i\right ) \sqrt [3]{x^3+x} \log \left (-x^2+i \sqrt {3}+1\right )}{24 \left (-\sqrt {3}+i\right ) \sqrt [3]{\frac {-\sqrt {3}+i}{-\sqrt {3}+2 i}} \sqrt [3]{x} \sqrt [3]{x^2+1}}+\frac {\left (-\sqrt {3}+3 i\right ) \sqrt [3]{x^3+x} \log \left (x^{2/3}-\sqrt [3]{\frac {-\sqrt {3}+i}{-\sqrt {3}+2 i}} \sqrt [3]{x^2+1}\right )}{8 \left (-\sqrt {3}+i\right ) \sqrt [3]{\frac {-\sqrt {3}+i}{-\sqrt {3}+2 i}} \sqrt [3]{x} \sqrt [3]{x^2+1}}+\frac {\left (\sqrt {3}+3 i\right ) \sqrt [3]{x^3+x} \log \left (x^{2/3}-\sqrt [3]{\frac {\sqrt {3}+i}{\sqrt {3}+2 i}} \sqrt [3]{x^2+1}\right )}{8 \left (\sqrt {3}+i\right ) \sqrt [3]{\frac {\sqrt {3}+i}{\sqrt {3}+2 i}} \sqrt [3]{x} \sqrt [3]{x^2+1}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 476
Rule 477
Rule 486
Rule 503
Rule 2081
Rule 6860
Rubi steps
\begin {align*} \int \frac {\left (-2+x^2\right ) \sqrt [3]{x+x^3}}{x^2 \left (4-2 x^2+x^4\right )} \, dx &=\frac {\sqrt [3]{x+x^3} \int \frac {\left (-2+x^2\right ) \sqrt [3]{1+x^2}}{x^{5/3} \left (4-2 x^2+x^4\right )} \, dx}{\sqrt [3]{x} \sqrt [3]{1+x^2}}\\ &=\frac {\sqrt [3]{x+x^3} \int \left (\frac {\left (1+\frac {i}{\sqrt {3}}\right ) \sqrt [3]{1+x^2}}{x^{5/3} \left (-2-2 i \sqrt {3}+2 x^2\right )}+\frac {\left (1-\frac {i}{\sqrt {3}}\right ) \sqrt [3]{1+x^2}}{x^{5/3} \left (-2+2 i \sqrt {3}+2 x^2\right )}\right ) \, dx}{\sqrt [3]{x} \sqrt [3]{1+x^2}}\\ &=\frac {\left (\left (3-i \sqrt {3}\right ) \sqrt [3]{x+x^3}\right ) \int \frac {\sqrt [3]{1+x^2}}{x^{5/3} \left (-2+2 i \sqrt {3}+2 x^2\right )} \, dx}{3 \sqrt [3]{x} \sqrt [3]{1+x^2}}+\frac {\left (\left (3+i \sqrt {3}\right ) \sqrt [3]{x+x^3}\right ) \int \frac {\sqrt [3]{1+x^2}}{x^{5/3} \left (-2-2 i \sqrt {3}+2 x^2\right )} \, dx}{3 \sqrt [3]{x} \sqrt [3]{1+x^2}}\\ &=\frac {\left (\left (3-i \sqrt {3}\right ) \sqrt [3]{x+x^3}\right ) \text {Subst}\left (\int \frac {\sqrt [3]{1+x^6}}{x^3 \left (-2+2 i \sqrt {3}+2 x^6\right )} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1+x^2}}+\frac {\left (\left (3+i \sqrt {3}\right ) \sqrt [3]{x+x^3}\right ) \text {Subst}\left (\int \frac {\sqrt [3]{1+x^6}}{x^3 \left (-2-2 i \sqrt {3}+2 x^6\right )} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{x} \sqrt [3]{1+x^2}}\\ &=\frac {\left (\left (3-i \sqrt {3}\right ) \sqrt [3]{x+x^3}\right ) \text {Subst}\left (\int \frac {\sqrt [3]{1+x^3}}{x^2 \left (-2+2 i \sqrt {3}+2 x^3\right )} \, dx,x,x^{2/3}\right )}{2 \sqrt [3]{x} \sqrt [3]{1+x^2}}+\frac {\left (\left (3+i \sqrt {3}\right ) \sqrt [3]{x+x^3}\right ) \text {Subst}\left (\int \frac {\sqrt [3]{1+x^3}}{x^2 \left (-2-2 i \sqrt {3}+2 x^3\right )} \, dx,x,x^{2/3}\right )}{2 \sqrt [3]{x} \sqrt [3]{1+x^2}}\\ &=\frac {\left (3 i+\sqrt {3}\right ) \sqrt [3]{1-\frac {x^2}{1-i \sqrt {3}}} \sqrt [3]{x+x^3} \, _2F_1\left (-\frac {1}{3},-\frac {1}{3};\frac {2}{3};-\frac {x^2+\frac {x^2}{1-i \sqrt {3}}}{1-\frac {x^2}{1-i \sqrt {3}}}\right )}{4 \left (i+\sqrt {3}\right ) x \sqrt [3]{1+x^2}}+\frac {\left (3 i-\sqrt {3}\right ) \sqrt [3]{1-\frac {x^2}{1+i \sqrt {3}}} \sqrt [3]{x+x^3} \, _2F_1\left (-\frac {1}{3},-\frac {1}{3};\frac {2}{3};-\frac {x^2+\frac {x^2}{1+i \sqrt {3}}}{1-\frac {x^2}{1+i \sqrt {3}}}\right )}{4 \left (i-\sqrt {3}\right ) x \sqrt [3]{1+x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 140, normalized size = 1.31 \begin {gather*} \frac {\sqrt [3]{x+x^3} \left (6 \sqrt [3]{1+x^2}-\frac {1}{3} x^{2/3} \text {RootSum}\left [7-10 \text {$\#$1}^3+4 \text {$\#$1}^6\&,\frac {-14 \log (x)+21 \log \left (\sqrt [3]{1+x^2}-x^{2/3} \text {$\#$1}\right )+8 \log (x) \text {$\#$1}^3-12 \log \left (\sqrt [3]{1+x^2}-x^{2/3} \text {$\#$1}\right ) \text {$\#$1}^3}{-5 \text {$\#$1}^2+4 \text {$\#$1}^5}\&\right ]\right )}{8 x \sqrt [3]{1+x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 180.00, size = 0, normalized size = 0.00 \[\int \frac {\left (x^{2}-2\right ) \left (x^{3}+x \right )^{\frac {1}{3}}}{x^{2} \left (x^{4}-2 x^{2}+4\right )}\, dx\]
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 [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \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 {\sqrt [3]{x \left (x^{2} + 1\right )} \left (x^{2} - 2\right )}{x^{2} \left (x^{4} - 2 x^{2} + 4\right )}\, dx \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*} \text {could not integrate} \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 {\left (x^2-2\right )\,{\left (x^3+x\right )}^{1/3}}{x^2\,\left (x^4-2\,x^2+4\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________