\[ \int \frac {e^x \left (10 x^3-10 x^4+e^3 \left (-10 x^2+10 x^3\right )\right )+e^x \left (20 e^3 x^2-20 x^3\right ) \log \left (e^3-x\right )+e^x \left (10 e^3 x-10 x^2\right ) \log ^2\left (e^3-x\right )+\log \left (-9+5 e^x\right ) \left (-54 x^3+e^3 \left (-36 x+54 x^2\right )+e^x \left (30 x^3+e^3 \left (20 x-30 x^2\right )\right )+\left (-36 x+72 e^3 x-72 x^2+e^x \left (20 x-40 e^3 x+40 x^2\right )\right ) \log \left (e^3-x\right )+\left (18 e^3-18 x+e^x \left (-10 e^3+10 x\right )\right ) \log ^2\left (e^3-x\right )\right )}{9 x^5-18 x^6+9 x^7+e^3 \left (-9 x^4+18 x^5-9 x^6\right )+e^x \left (-5 x^5+10 x^6-5 x^7+e^3 \left (5 x^4-10 x^5+5 x^6\right )\right )+\left (-36 x^5+36 x^6+e^3 \left (36 x^4-36 x^5\right )+e^x \left (20 x^5-20 x^6+e^3 \left (-20 x^4+20 x^5\right )\right )\right ) \log \left (e^3-x\right )+\left (-18 x^4+54 x^5+e^3 \left (18 x^3-54 x^4\right )+e^x \left (10 x^4-30 x^5+e^3 \left (-10 x^3+30 x^4\right )\right )\right ) \log ^2\left (e^3-x\right )+\left (-36 e^3 x^3+36 x^4+e^x \left (20 e^3 x^3-20 x^4\right )\right ) \log ^3\left (e^3-x\right )+\left (-9 e^3 x^2+9 x^3+e^x \left (5 e^3 x^2-5 x^3\right )\right ) \log ^4\left (e^3-x\right )} \, dx \]
Optimal antiderivative \[ \frac {\ln \! \left (5 \,{\mathrm e}^{x}-9\right )}{x \left (\frac {\left (\ln \left (-x +{\mathrm e}^{3}\right )+x \right )^{2}}{2}-\frac {x}{2}\right )} \]
command
integrate(((((-10*exp(3)+10*x)*exp(x)+18*exp(3)-18*x)*ln(-x+exp(3))**2+((-40*x*exp(3)+40*x**2+20*x)*exp(x)+72*x*exp(3)-72*x**2-36*x)*ln(-x+exp(3))+((-30*x**2+20*x)*exp(3)+30*x**3)*exp(x)+(54*x**2-36*x)*exp(3)-54*x**3)*ln(5*exp(x)-9)+(10*x*exp(3)-10*x**2)*exp(x)*ln(-x+exp(3))**2+(20*x**2*exp(3)-20*x**3)*exp(x)*ln(-x+exp(3))+((10*x**3-10*x**2)*exp(3)-10*x**4+10*x**3)*exp(x))/(((5*x**2*exp(3)-5*x**3)*exp(x)-9*x**2*exp(3)+9*x**3)*ln(-x+exp(3))**4+((20*x**3*exp(3)-20*x**4)*exp(x)-36*x**3*exp(3)+36*x**4)*ln(-x+exp(3))**3+(((30*x**4-10*x**3)*exp(3)-30*x**5+10*x**4)*exp(x)+(-54*x**4+18*x**3)*exp(3)+54*x**5-18*x**4)*ln(-x+exp(3))**2+(((20*x**5-20*x**4)*exp(3)-20*x**6+20*x**5)*exp(x)+(-36*x**5+36*x**4)*exp(3)+36*x**6-36*x**5)*ln(-x+exp(3))+((5*x**6-10*x**5+5*x**4)*exp(3)-5*x**7+10*x**6-5*x**5)*exp(x)+(-9*x**6+18*x**5-9*x**4)*exp(3)+9*x**7-18*x**6+9*x**5),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 {2 \log {\left (5 e^{x} - 9 \right )}}{x^{3} + 2 x^{2} \log {\left (- x + e^{3} \right )} - x^{2} + x \log {\left (- x + e^{3} \right )}^{2}} \]