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