\[ \int \frac {\left (-1+x^3\right ) \sqrt [3]{1+x^6}}{x^2 \left (1+x^3\right )} \, dx \]
Optimal antiderivative \[ \frac {\left (x^{6}+1\right )^{\frac {1}{3}}}{x}+\frac {2^{\frac {1}{3}} \arctan \left (\frac {\sqrt {3}\, x}{-x +2^{\frac {2}{3}} \left (x^{6}+1\right )^{\frac {1}{3}}}\right ) \sqrt {3}}{3}-\frac {2^{\frac {1}{3}} \ln \left (2 x +2^{\frac {2}{3}} \left (x^{6}+1\right )^{\frac {1}{3}}\right )}{3}+\frac {\ln \left (-2 x^{2}+2^{\frac {2}{3}} x \left (x^{6}+1\right )^{\frac {1}{3}}-2^{\frac {1}{3}} \left (x^{6}+1\right )^{\frac {2}{3}}\right ) 2^{\frac {1}{3}}}{6} \]
command
Integrate[((-1 + x^3)*(1 + x^6)^(1/3))/(x^2*(1 + x^3)),x]
Mathematica 13.1 output
\[ \frac {\sqrt [3]{1+x^6}}{x}+\frac {\sqrt [3]{2} \text {ArcTan}\left (\frac {\sqrt {3} x}{-x+2^{2/3} \sqrt [3]{1+x^6}}\right )}{\sqrt {3}}-\frac {1}{3} \sqrt [3]{2} \log \left (2 x+2^{2/3} \sqrt [3]{1+x^6}\right )+\frac {\log \left (-2 x^2+2^{2/3} x \sqrt [3]{1+x^6}-\sqrt [3]{2} \left (1+x^6\right )^{2/3}\right )}{3\ 2^{2/3}} \]
Mathematica 12.3 output
\[ \int \frac {\left (-1+x^3\right ) \sqrt [3]{1+x^6}}{x^2 \left (1+x^3\right )} \, dx \]________________________________________________________________________________________