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