\[ \int \frac {-8 x \log (9-x) \log (x)+\left (-36+4 x+(36-4 x) \log ^2(9-x)+\left (-36+4 x+(36-4 x) \log ^2(9-x)\right ) \log (x)\right ) \log \left (-1+\log ^2(9-x)\right )}{9-x+(-9+x) \log ^2(9-x)} \, dx \]
Optimal antiderivative \[ -4 x \ln \left (\ln \left (9-x \right )^{2}-1\right ) \ln \left (x \right )-5 \]
command
integrate(((((-4*x+36)*ln(9-x)**2+4*x-36)*ln(x)+(-4*x+36)*ln(9-x)**2+4*x-36)*ln(ln(9-x)**2-1)-8*x*ln(9-x)*ln(x))/((x-9)*ln(9-x)**2+9-x),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \left (- 4 x \log {\left (x \right )} - 9\right ) \log {\left (\log {\left (9 - x \right )}^{2} - 1 \right )} + 9 \log {\left (\log {\left (9 - x \right )}^{2} - 1 \right )} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________