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