\[ \int \frac {128-32 x+64 x^2-16 x^3+8 x^4-2 x^5+\left (40-530 x+280 x^2-545 x^3+258 x^4-128 x^5+48 x^6-6 x^7\right ) \log (x)+\left (2-296 x+82 x^2-258 x^3+64 x^4-48 x^5+12 x^6\right ) \log ^2(x)+\left (-49 x+4 x^2-32 x^3-6 x^5\right ) \log ^3(x)-2 x \log ^4(x)+\left (\left (52-x+88 x^2-16 x^3+19 x^4-4 x^5\right ) \log (x)+\left (20+24 x^2+5 x^4\right ) \log ^2(x)+\log ^3(x)\right ) \log \left (\log ^2(x)\right )}{\left (16-8 x+x^2\right ) \log (x)+(8-2 x) \log ^2(x)+\log ^3(x)} \, dx \]
Optimal antiderivative \[ \left (\left (x^{2}+4\right )^{2}+\ln \! \left (x \right )\right ) x \left (\frac {\ln \! \left (\ln \! \left (x \right )^{2}\right )}{\ln \! \left (x \right )-x +4}-x \right ) \]
command
integrate(((ln(x)**3+(5*x**4+24*x**2+20)*ln(x)**2+(-4*x**5+19*x**4-16*x**3+88*x**2-x+52)*ln(x))*ln(ln(x)**2)-2*x*ln(x)**4+(-6*x**5-32*x**3+4*x**2-49*x)*ln(x)**3+(12*x**6-48*x**5+64*x**4-258*x**3+82*x**2-296*x+2)*ln(x)**2+(-6*x**7+48*x**6-128*x**5+258*x**4-545*x**3+280*x**2-530*x+40)*ln(x)-2*x**5+8*x**4-16*x**3+64*x**2-32*x+128)/(ln(x)**3+(-2*x+8)*ln(x)**2+(x**2-8*x+16)*ln(x)),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Exception raised: TypeError} \]
Sympy 1.8 under Python 3.8.8 output
\[ - x^{6} - 8 x^{4} - x^{2} \log {\left (x \right )} - 16 x^{2} + \frac {\left (- x^{5} - 8 x^{3} - x \log {\left (x \right )} - 16 x\right ) \log {\left (\log {\left (x \right )}^{2} \right )}}{x - \log {\left (x \right )} - 4} \]