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