\[ \int \frac {-8 x+8 x^2+\left (8 x-16 x^2\right ) \log (x)+\frac {e^{-3+x^2} \left (-2 x+2 x^2+\left (6 x-4 x^2-8 x^3\right ) \log (x)\right )}{x}+\left (16 x-16 x \log (x)+\frac {e^{-3+x^2} \left (4 x+\left (4-4 x-8 x^2\right ) \log (x)\right )}{x}\right ) \log \left (4 \log (5)+\frac {e^{-3+x^2} \log (5)}{x}\right )+\left (8+\frac {2 e^{-3+x^2}}{x}\right ) \log ^2\left (4 \log (5)+\frac {e^{-3+x^2} \log (5)}{x}\right )}{e^{-3+x^2} \log ^2(x)+4 x \log ^2(x)} \, dx \]
Optimal antiderivative \[ \frac {2 x -2 \left (\ln \! \left (\left (4+{\mathrm e}^{-\ln \left (x \right )+x^{2}-3}\right ) \ln \! \left (5\right )\right )+x \right )^{2}}{\ln \! \left (x \right )} \]
command
integrate(((2*exp(-ln(x)+x**2-3)+8)*ln(ln(5)*exp(-ln(x)+x**2-3)+4*ln(5))**2+(((-8*x**2-4*x+4)*ln(x)+4*x)*exp(-ln(x)+x**2-3)-16*x*ln(x)+16*x)*ln(ln(5)*exp(-ln(x)+x**2-3)+4*ln(5))+((-8*x**3-4*x**2+6*x)*ln(x)+2*x**2-2*x)*exp(-ln(x)+x**2-3)+(-16*x**2+8*x)*ln(x)+8*x**2-8*x)/(x*ln(x)**2*exp(-ln(x)+x**2-3)+4*x*ln(x)**2),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Exception raised: TypeError} \]
Sympy 1.8 under Python 3.8.8 output
\[ - \frac {4 x \log {\left (4 \log {\left (5 \right )} + \frac {e^{x^{2} - 3} \log {\left (5 \right )}}{x} \right )}}{\log {\left (x \right )}} + \frac {- 2 x^{2} + 2 x}{\log {\left (x \right )}} - \frac {2 \log {\left (4 \log {\left (5 \right )} + \frac {e^{x^{2} - 3} \log {\left (5 \right )}}{x} \right )}^{2}}{\log {\left (x \right )}} \]