\[ \int \frac {9 x+12 x^2+18 x^3-6 x^4-6 x^2 \log (x)+\left (24 x^2-12 x^4-12 x^2 \log (x)+\left (-36 x+18 x^3+18 x \log (x)\right ) \log \left (-2+x^2+\log (x)\right )\right ) \log \left (-2 x+3 \log \left (-2+x^2+\log (x)\right )\right )}{4 x-2 x^3-2 x \log (x)+\left (-6+3 x^2+3 \log (x)\right ) \log \left (-2+x^2+\log (x)\right )} \, dx \]
Optimal antiderivative \[ 3 x^{2} \ln \! \left (3 \ln \! \left (\ln \! \left (x \right )+x^{2}-2\right )-2 x \right ) \]
command
integrate((((18*x*ln(x)+18*x**3-36*x)*ln(ln(x)+x**2-2)-12*x**2*ln(x)-12*x**4+24*x**2)*ln(3*ln(ln(x)+x**2-2)-2*x)-6*x**2*ln(x)-6*x**4+18*x**3+12*x**2+9*x)/((3*ln(x)+3*x**2-6)*ln(ln(x)+x**2-2)-2*x*ln(x)-2*x**3+4*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
\[ 3 x^{2} \log {\left (- 2 x + 3 \log {\left (x^{2} + \log {\left (x \right )} - 2 \right )} \right )} \]