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