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