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