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