\[ \int e^{-x^2} \left (-4 e^{x^2} x^3+e^{2 e^{-x^2} \left (3 e^{x^2}+x\right )} \left (-2 e^{x^2} x-2 x^2+4 x^4\right )+e^{e^{-x^2} \left (3 e^{x^2}+x\right )} \left (6 e^{x^2} x^2+2 x^3-4 x^5\right )\right ) \, dx \]
Optimal antiderivative \[ 6-x^{2} \left ({\mathrm e}^{x \,{\mathrm e}^{-x^{2}}+3}-x \right )^{2} \]
command
integrate(((-2*exp(x**2)*x+4*x**4-2*x**2)*exp((3*exp(x**2)+x)/exp(x**2))**2+(6*x**2*exp(x**2)-4*x**5+2*x**3)*exp((3*exp(x**2)+x)/exp(x**2))-4*x**3*exp(x**2))/exp(x**2),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Timed out} \]
Sympy 1.8 under Python 3.8.8 output
\[ - x^{4} + 2 x^{3} e^{\left (x + 3 e^{x^{2}}\right ) e^{- x^{2}}} - x^{2} e^{2 \left (x + 3 e^{x^{2}}\right ) e^{- x^{2}}} \]