\(\int \frac {(80-40 x-2 x^2+x^3) \log (-2+x)+e^{3 e^x+x} (-60 x^2+30 x^3) \log (-2+x)+(-40 x-10 e^{3 e^x} x^2-x^3) \log (\frac {40+10 e^{3 e^x} x+x^2}{x})}{e^{3 e^x} (-20 x^2+10 x^3) \log ^2(-2+x)+(-80 x+40 x^2-2 x^3+x^4) \log ^2(-2+x)} \, dx\) [8523]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F(-2)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 139, antiderivative size = 27 \[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=-5+\frac {\log \left (10 \left (e^{3 e^x}+\frac {4}{x}\right )+x\right )}{\log (-2+x)} \]

[Out]

ln(10*exp(3*exp(x))+40/x+x)/ln(-2+x)-5

Rubi [F]

\[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=\int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx \]

[In]

Int[((80 - 40*x - 2*x^2 + x^3)*Log[-2 + x] + E^(3*E^x + x)*(-60*x^2 + 30*x^3)*Log[-2 + x] + (-40*x - 10*E^(3*E
^x)*x^2 - x^3)*Log[(40 + 10*E^(3*E^x)*x + x^2)/x])/(E^(3*E^x)*(-20*x^2 + 10*x^3)*Log[-2 + x]^2 + (-80*x + 40*x
^2 - 2*x^3 + x^4)*Log[-2 + x]^2),x]

[Out]

-40*Defer[Int][1/(x*(40 + 10*E^(3*E^x)*x + x^2)*Log[-2 + x]), x] + Defer[Int][x/((40 + 10*E^(3*E^x)*x + x^2)*L
og[-2 + x]), x] + 30*Defer[Int][(E^(3*E^x + x)*x)/((40 + 10*E^(3*E^x)*x + x^2)*Log[-2 + x]), x] - Defer[Int][L
og[10*E^(3*E^x) + 40/x + x]/((-2 + x)*Log[-2 + x]^2), x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {\frac {\left (-40+\left (1+30 e^{3 e^x+x}\right ) x^2\right ) \log (-2+x)}{x \left (40+10 e^{3 e^x} x+x^2\right )}-\frac {\log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{-2+x}}{\log ^2(-2+x)} \, dx \\ & = \int \left (\frac {30 e^{3 e^x+x} x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)}+\frac {80 \log (-2+x)-40 x \log (-2+x)-2 x^2 \log (-2+x)+x^3 \log (-2+x)-40 x \log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )-10 e^{3 e^x} x^2 \log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )-x^3 \log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{(-2+x) x \left (40+10 e^{3 e^x} x+x^2\right ) \log ^2(-2+x)}\right ) \, dx \\ & = 30 \int \frac {e^{3 e^x+x} x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx+\int \frac {80 \log (-2+x)-40 x \log (-2+x)-2 x^2 \log (-2+x)+x^3 \log (-2+x)-40 x \log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )-10 e^{3 e^x} x^2 \log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )-x^3 \log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{(-2+x) x \left (40+10 e^{3 e^x} x+x^2\right ) \log ^2(-2+x)} \, dx \\ & = 30 \int \frac {e^{3 e^x+x} x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx+\int \frac {-\frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)}{x \left (40+10 e^{3 e^x} x+x^2\right )}+\log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{(2-x) \log ^2(-2+x)} \, dx \\ & = 30 \int \frac {e^{3 e^x+x} x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx+\int \left (\frac {-40+x^2}{x \left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)}-\frac {\log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{(-2+x) \log ^2(-2+x)}\right ) \, dx \\ & = 30 \int \frac {e^{3 e^x+x} x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx+\int \frac {-40+x^2}{x \left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx-\int \frac {\log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{(-2+x) \log ^2(-2+x)} \, dx \\ & = 30 \int \frac {e^{3 e^x+x} x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx+\int \left (-\frac {40}{x \left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)}+\frac {x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)}\right ) \, dx-\int \frac {\log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{(-2+x) \log ^2(-2+x)} \, dx \\ & = 30 \int \frac {e^{3 e^x+x} x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx-40 \int \frac {1}{x \left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx+\int \frac {x}{\left (40+10 e^{3 e^x} x+x^2\right ) \log (-2+x)} \, dx-\int \frac {\log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{(-2+x) \log ^2(-2+x)} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.95 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.89 \[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=\frac {\log \left (10 e^{3 e^x}+\frac {40}{x}+x\right )}{\log (-2+x)} \]

[In]

Integrate[((80 - 40*x - 2*x^2 + x^3)*Log[-2 + x] + E^(3*E^x + x)*(-60*x^2 + 30*x^3)*Log[-2 + x] + (-40*x - 10*
E^(3*E^x)*x^2 - x^3)*Log[(40 + 10*E^(3*E^x)*x + x^2)/x])/(E^(3*E^x)*(-20*x^2 + 10*x^3)*Log[-2 + x]^2 + (-80*x
+ 40*x^2 - 2*x^3 + x^4)*Log[-2 + x]^2),x]

[Out]

Log[10*E^(3*E^x) + 40/x + x]/Log[-2 + x]

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.07 (sec) , antiderivative size = 186, normalized size of antiderivative = 6.89

\[\frac {\ln \left (10 x \,{\mathrm e}^{3 \,{\mathrm e}^{x}}+x^{2}+40\right )}{\ln \left (-2+x \right )}-\frac {-i \pi \,\operatorname {csgn}\left (i \left (10 x \,{\mathrm e}^{3 \,{\mathrm e}^{x}}+x^{2}+40\right )\right ) {\operatorname {csgn}\left (\frac {i \left (10 x \,{\mathrm e}^{3 \,{\mathrm e}^{x}}+x^{2}+40\right )}{x}\right )}^{2}+i \pi \,\operatorname {csgn}\left (i \left (10 x \,{\mathrm e}^{3 \,{\mathrm e}^{x}}+x^{2}+40\right )\right ) \operatorname {csgn}\left (\frac {i \left (10 x \,{\mathrm e}^{3 \,{\mathrm e}^{x}}+x^{2}+40\right )}{x}\right ) \operatorname {csgn}\left (\frac {i}{x}\right )+i \pi {\operatorname {csgn}\left (\frac {i \left (10 x \,{\mathrm e}^{3 \,{\mathrm e}^{x}}+x^{2}+40\right )}{x}\right )}^{3}-i \pi {\operatorname {csgn}\left (\frac {i \left (10 x \,{\mathrm e}^{3 \,{\mathrm e}^{x}}+x^{2}+40\right )}{x}\right )}^{2} \operatorname {csgn}\left (\frac {i}{x}\right )+2 \ln \left (x \right )}{2 \ln \left (-2+x \right )}\]

[In]

int(((-10*x^2*exp(3*exp(x))-x^3-40*x)*ln((10*x*exp(3*exp(x))+x^2+40)/x)+(30*x^3-60*x^2)*exp(x)*ln(-2+x)*exp(3*
exp(x))+(x^3-2*x^2-40*x+80)*ln(-2+x))/((10*x^3-20*x^2)*ln(-2+x)^2*exp(3*exp(x))+(x^4-2*x^3+40*x^2-80*x)*ln(-2+
x)^2),x)

[Out]

1/ln(-2+x)*ln(10*x*exp(3*exp(x))+x^2+40)-1/2*(-I*Pi*csgn(I*(10*x*exp(3*exp(x))+x^2+40))*csgn(I/x*(10*x*exp(3*e
xp(x))+x^2+40))^2+I*Pi*csgn(I*(10*x*exp(3*exp(x))+x^2+40))*csgn(I/x*(10*x*exp(3*exp(x))+x^2+40))*csgn(I/x)+I*P
i*csgn(I/x*(10*x*exp(3*exp(x))+x^2+40))^3-I*Pi*csgn(I/x*(10*x*exp(3*exp(x))+x^2+40))^2*csgn(I/x)+2*ln(x))/ln(-
2+x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.30 \[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=\frac {\log \left (\frac {{\left (10 \, x e^{\left (x + 3 \, e^{x}\right )} + {\left (x^{2} + 40\right )} e^{x}\right )} e^{\left (-x\right )}}{x}\right )}{\log \left (x - 2\right )} \]

[In]

integrate(((-10*x^2*exp(3*exp(x))-x^3-40*x)*log((10*x*exp(3*exp(x))+x^2+40)/x)+(30*x^3-60*x^2)*exp(x)*log(-2+x
)*exp(3*exp(x))+(x^3-2*x^2-40*x+80)*log(-2+x))/((10*x^3-20*x^2)*log(-2+x)^2*exp(3*exp(x))+(x^4-2*x^3+40*x^2-80
*x)*log(-2+x)^2),x, algorithm="fricas")

[Out]

log((10*x*e^(x + 3*e^x) + (x^2 + 40)*e^x)*e^(-x)/x)/log(x - 2)

Sympy [F(-2)]

Exception generated. \[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(((-10*x**2*exp(3*exp(x))-x**3-40*x)*ln((10*x*exp(3*exp(x))+x**2+40)/x)+(30*x**3-60*x**2)*exp(x)*ln(-
2+x)*exp(3*exp(x))+(x**3-2*x**2-40*x+80)*ln(-2+x))/((10*x**3-20*x**2)*ln(-2+x)**2*exp(3*exp(x))+(x**4-2*x**3+4
0*x**2-80*x)*ln(-2+x)**2),x)

[Out]

Exception raised: TypeError >> '>' not supported between instances of 'Poly' and 'int'

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=\frac {\log \left (x^{2} + 10 \, x e^{\left (3 \, e^{x}\right )} + 40\right ) - \log \left (x\right )}{\log \left (x - 2\right )} \]

[In]

integrate(((-10*x^2*exp(3*exp(x))-x^3-40*x)*log((10*x*exp(3*exp(x))+x^2+40)/x)+(30*x^3-60*x^2)*exp(x)*log(-2+x
)*exp(3*exp(x))+(x^3-2*x^2-40*x+80)*log(-2+x))/((10*x^3-20*x^2)*log(-2+x)^2*exp(3*exp(x))+(x^4-2*x^3+40*x^2-80
*x)*log(-2+x)^2),x, algorithm="maxima")

[Out]

(log(x^2 + 10*x*e^(3*e^x) + 40) - log(x))/log(x - 2)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=\frac {\log \left (x^{2} + 10 \, x e^{\left (3 \, e^{x}\right )} + 40\right ) - \log \left (x\right )}{\log \left (x - 2\right )} \]

[In]

integrate(((-10*x^2*exp(3*exp(x))-x^3-40*x)*log((10*x*exp(3*exp(x))+x^2+40)/x)+(30*x^3-60*x^2)*exp(x)*log(-2+x
)*exp(3*exp(x))+(x^3-2*x^2-40*x+80)*log(-2+x))/((10*x^3-20*x^2)*log(-2+x)^2*exp(3*exp(x))+(x^4-2*x^3+40*x^2-80
*x)*log(-2+x)^2),x, algorithm="giac")

[Out]

(log(x^2 + 10*x*e^(3*e^x) + 40) - log(x))/log(x - 2)

Mupad [B] (verification not implemented)

Time = 13.37 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.93 \[ \int \frac {\left (80-40 x-2 x^2+x^3\right ) \log (-2+x)+e^{3 e^x+x} \left (-60 x^2+30 x^3\right ) \log (-2+x)+\left (-40 x-10 e^{3 e^x} x^2-x^3\right ) \log \left (\frac {40+10 e^{3 e^x} x+x^2}{x}\right )}{e^{3 e^x} \left (-20 x^2+10 x^3\right ) \log ^2(-2+x)+\left (-80 x+40 x^2-2 x^3+x^4\right ) \log ^2(-2+x)} \, dx=\frac {\ln \left (\frac {10\,x\,{\mathrm {e}}^{3\,{\mathrm {e}}^x}+x^2+40}{x}\right )}{\ln \left (x-2\right )} \]

[In]

int((log(x - 2)*(40*x + 2*x^2 - x^3 - 80) + log((10*x*exp(3*exp(x)) + x^2 + 40)/x)*(40*x + x^3 + 10*x^2*exp(3*
exp(x))) + log(x - 2)*exp(3*exp(x))*exp(x)*(60*x^2 - 30*x^3))/(log(x - 2)^2*(80*x - 40*x^2 + 2*x^3 - x^4) + lo
g(x - 2)^2*exp(3*exp(x))*(20*x^2 - 10*x^3)),x)

[Out]

log((10*x*exp(3*exp(x)) + x^2 + 40)/x)/log(x - 2)