\(\int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} (60 x-50 x^2+10 x^3+(60 x-20 x^2) \log (-2+x)+(20 x-10 x^2) \log ^2(-2+x)+20 x \log ^3(-2+x)))}{-2 x^2+x^3} \, dx\) [240]

Optimal result
Mathematica [A] (verified)
Rubi [B] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [F]
Giac [F]
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

Integrand size = 147, antiderivative size = 30 \[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\frac {e^{5 \left (e^{\left (3-x+\log ^2(-2+x)\right )^2}+x^2\right )}}{x}+\log (4) \] Output:

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

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.90 \[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\frac {e^{5 \left (e^{\left (3-x+\log ^2(-2+x)\right )^2}+x^2\right )}}{x} \] Input:

Integrate[(E^(5*E^(9 - 6*x + x^2 + (6 - 2*x)*Log[-2 + x]^2 + Log[-2 + x]^4 
) + 5*x^2)*(2 - x - 20*x^2 + 10*x^3 + E^(9 - 6*x + x^2 + (6 - 2*x)*Log[-2 
+ x]^2 + Log[-2 + x]^4)*(60*x - 50*x^2 + 10*x^3 + (60*x - 20*x^2)*Log[-2 + 
 x] + (20*x - 10*x^2)*Log[-2 + x]^2 + 20*x*Log[-2 + x]^3)))/(-2*x^2 + x^3) 
,x]
 

Output:

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(223\) vs. \(2(30)=60\).

Time = 9.88 (sec) , antiderivative size = 223, normalized size of antiderivative = 7.43, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.014, Rules used = {2026, 2726}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\exp \left (5 \exp \left (x^2-6 x+\log ^4(x-2)+(6-2 x) \log ^2(x-2)+9\right )+5 x^2\right ) \left (\left (10 x^3-50 x^2+\left (20 x-10 x^2\right ) \log ^2(x-2)+\left (60 x-20 x^2\right ) \log (x-2)+60 x+20 x \log ^3(x-2)\right ) \exp \left (x^2-6 x+\log ^4(x-2)+(6-2 x) \log ^2(x-2)+9\right )+10 x^3-20 x^2-x+2\right )}{x^3-2 x^2} \, dx\)

\(\Big \downarrow \) 2026

\(\displaystyle \int \frac {\exp \left (5 \exp \left (x^2-6 x+\log ^4(x-2)+(6-2 x) \log ^2(x-2)+9\right )+5 x^2\right ) \left (\left (10 x^3-50 x^2+\left (20 x-10 x^2\right ) \log ^2(x-2)+\left (60 x-20 x^2\right ) \log (x-2)+60 x+20 x \log ^3(x-2)\right ) \exp \left (x^2-6 x+\log ^4(x-2)+(6-2 x) \log ^2(x-2)+9\right )+10 x^3-20 x^2-x+2\right )}{(x-2) x^2}dx\)

\(\Big \downarrow \) 2726

\(\displaystyle \frac {\exp \left (5 \exp \left (x^2-6 x+\log ^4(x-2)+2 (3-x) \log ^2(x-2)+9\right )+5 x^2\right ) \left (-\left (x^3-5 x^2+\left (2 x-x^2\right ) \log ^2(x-2)+2 \left (3 x-x^2\right ) \log (x-2)+6 x+2 x \log ^3(x-2)\right ) \exp \left (x^2-6 x+\log ^4(x-2)+2 (3-x) \log ^2(x-2)+9\right )-x^3+2 x^2\right )}{(2-x) x^2 \left (x-\left (-x+\frac {2 \log ^3(x-2)}{2-x}+\log ^2(x-2)+\frac {2 (3-x) \log (x-2)}{2-x}+3\right ) \exp \left (x^2-6 x+\log ^4(x-2)+2 (3-x) \log ^2(x-2)+9\right )\right )}\)

Input:

Int[(E^(5*E^(9 - 6*x + x^2 + (6 - 2*x)*Log[-2 + x]^2 + Log[-2 + x]^4) + 5* 
x^2)*(2 - x - 20*x^2 + 10*x^3 + E^(9 - 6*x + x^2 + (6 - 2*x)*Log[-2 + x]^2 
 + Log[-2 + x]^4)*(60*x - 50*x^2 + 10*x^3 + (60*x - 20*x^2)*Log[-2 + x] + 
(20*x - 10*x^2)*Log[-2 + x]^2 + 20*x*Log[-2 + x]^3)))/(-2*x^2 + x^3),x]
 

Output:

(E^(5*E^(9 - 6*x + x^2 + 2*(3 - x)*Log[-2 + x]^2 + Log[-2 + x]^4) + 5*x^2) 
*(2*x^2 - x^3 - E^(9 - 6*x + x^2 + 2*(3 - x)*Log[-2 + x]^2 + Log[-2 + x]^4 
)*(6*x - 5*x^2 + x^3 + 2*(3*x - x^2)*Log[-2 + x] + (2*x - x^2)*Log[-2 + x] 
^2 + 2*x*Log[-2 + x]^3)))/((2 - x)*x^2*(x - E^(9 - 6*x + x^2 + 2*(3 - x)*L 
og[-2 + x]^2 + Log[-2 + x]^4)*(3 - x + (2*(3 - x)*Log[-2 + x])/(2 - x) + L 
og[-2 + x]^2 + (2*Log[-2 + x]^3)/(2 - x))))
 

Defintions of rubi rules used

rule 2026
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p 
*r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ 
erQ[p] &&  !MonomialQ[Px, x] && (ILtQ[p, 0] ||  !PolyQ[u, x])
 

rule 2726
Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, 
 x]))}, Simp[F^u*z, x] /; EqQ[D[z, x], w*y]] /; FreeQ[F, x]
 
Maple [A] (verified)

Time = 1.27 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.93

method result size
risch \(\frac {{\mathrm e}^{5 \,{\mathrm e}^{\left (-3-\ln \left (-2+x \right )^{2}+x \right )^{2}}+5 x^{2}}}{x}\) \(28\)
parallelrisch \(\frac {{\mathrm e}^{5 \,{\mathrm e}^{\ln \left (-2+x \right )^{4}+\left (6-2 x \right ) \ln \left (-2+x \right )^{2}+x^{2}-6 x +9}+5 x^{2}}}{x}\) \(41\)

Input:

int(((20*x*ln(-2+x)^3+(-10*x^2+20*x)*ln(-2+x)^2+(-20*x^2+60*x)*ln(-2+x)+10 
*x^3-50*x^2+60*x)*exp(ln(-2+x)^4+(6-2*x)*ln(-2+x)^2+x^2-6*x+9)+10*x^3-20*x 
^2-x+2)*exp(5*exp(ln(-2+x)^4+(6-2*x)*ln(-2+x)^2+x^2-6*x+9)+5*x^2)/(x^3-2*x 
^2),x,method=_RETURNVERBOSE)
 

Output:

1/x*exp(5*exp((-3-ln(-2+x)^2+x)^2)+5*x^2)
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.30 \[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\frac {e^{\left (5 \, x^{2} + 5 \, e^{\left (\log \left (x - 2\right )^{4} - 2 \, {\left (x - 3\right )} \log \left (x - 2\right )^{2} + x^{2} - 6 \, x + 9\right )}\right )}}{x} \] Input:

integrate(((20*x*log(-2+x)^3+(-10*x^2+20*x)*log(-2+x)^2+(-20*x^2+60*x)*log 
(-2+x)+10*x^3-50*x^2+60*x)*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+ 
10*x^3-20*x^2-x+2)*exp(5*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+5* 
x^2)/(x^3-2*x^2),x, algorithm="fricas")
 

Output:

e^(5*x^2 + 5*e^(log(x - 2)^4 - 2*(x - 3)*log(x - 2)^2 + x^2 - 6*x + 9))/x
 

Sympy [A] (verification not implemented)

Time = 2.44 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.23 \[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\frac {e^{5 x^{2} + 5 e^{x^{2} - 6 x + \left (6 - 2 x\right ) \log {\left (x - 2 \right )}^{2} + \log {\left (x - 2 \right )}^{4} + 9}}}{x} \] Input:

integrate(((20*x*ln(-2+x)**3+(-10*x**2+20*x)*ln(-2+x)**2+(-20*x**2+60*x)*l 
n(-2+x)+10*x**3-50*x**2+60*x)*exp(ln(-2+x)**4+(6-2*x)*ln(-2+x)**2+x**2-6*x 
+9)+10*x**3-20*x**2-x+2)*exp(5*exp(ln(-2+x)**4+(6-2*x)*ln(-2+x)**2+x**2-6* 
x+9)+5*x**2)/(x**3-2*x**2),x)
 

Output:

exp(5*x**2 + 5*exp(x**2 - 6*x + (6 - 2*x)*log(x - 2)**2 + log(x - 2)**4 + 
9))/x
 

Maxima [F]

\[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\int { \frac {{\left (10 \, x^{3} - 20 \, x^{2} + 10 \, {\left (2 \, x \log \left (x - 2\right )^{3} + x^{3} - {\left (x^{2} - 2 \, x\right )} \log \left (x - 2\right )^{2} - 5 \, x^{2} - 2 \, {\left (x^{2} - 3 \, x\right )} \log \left (x - 2\right ) + 6 \, x\right )} e^{\left (\log \left (x - 2\right )^{4} - 2 \, {\left (x - 3\right )} \log \left (x - 2\right )^{2} + x^{2} - 6 \, x + 9\right )} - x + 2\right )} e^{\left (5 \, x^{2} + 5 \, e^{\left (\log \left (x - 2\right )^{4} - 2 \, {\left (x - 3\right )} \log \left (x - 2\right )^{2} + x^{2} - 6 \, x + 9\right )}\right )}}{x^{3} - 2 \, x^{2}} \,d x } \] Input:

integrate(((20*x*log(-2+x)^3+(-10*x^2+20*x)*log(-2+x)^2+(-20*x^2+60*x)*log 
(-2+x)+10*x^3-50*x^2+60*x)*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+ 
10*x^3-20*x^2-x+2)*exp(5*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+5* 
x^2)/(x^3-2*x^2),x, algorithm="maxima")
 

Output:

integrate((10*x^3 - 20*x^2 + 10*(2*x*log(x - 2)^3 + x^3 - (x^2 - 2*x)*log( 
x - 2)^2 - 5*x^2 - 2*(x^2 - 3*x)*log(x - 2) + 6*x)*e^(log(x - 2)^4 - 2*(x 
- 3)*log(x - 2)^2 + x^2 - 6*x + 9) - x + 2)*e^(5*x^2 + 5*e^(log(x - 2)^4 - 
 2*(x - 3)*log(x - 2)^2 + x^2 - 6*x + 9))/(x^3 - 2*x^2), x)
 

Giac [F]

\[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\int { \frac {{\left (10 \, x^{3} - 20 \, x^{2} + 10 \, {\left (2 \, x \log \left (x - 2\right )^{3} + x^{3} - {\left (x^{2} - 2 \, x\right )} \log \left (x - 2\right )^{2} - 5 \, x^{2} - 2 \, {\left (x^{2} - 3 \, x\right )} \log \left (x - 2\right ) + 6 \, x\right )} e^{\left (\log \left (x - 2\right )^{4} - 2 \, {\left (x - 3\right )} \log \left (x - 2\right )^{2} + x^{2} - 6 \, x + 9\right )} - x + 2\right )} e^{\left (5 \, x^{2} + 5 \, e^{\left (\log \left (x - 2\right )^{4} - 2 \, {\left (x - 3\right )} \log \left (x - 2\right )^{2} + x^{2} - 6 \, x + 9\right )}\right )}}{x^{3} - 2 \, x^{2}} \,d x } \] Input:

integrate(((20*x*log(-2+x)^3+(-10*x^2+20*x)*log(-2+x)^2+(-20*x^2+60*x)*log 
(-2+x)+10*x^3-50*x^2+60*x)*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+ 
10*x^3-20*x^2-x+2)*exp(5*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+5* 
x^2)/(x^3-2*x^2),x, algorithm="giac")
 

Output:

integrate((10*x^3 - 20*x^2 + 10*(2*x*log(x - 2)^3 + x^3 - (x^2 - 2*x)*log( 
x - 2)^2 - 5*x^2 - 2*(x^2 - 3*x)*log(x - 2) + 6*x)*e^(log(x - 2)^4 - 2*(x 
- 3)*log(x - 2)^2 + x^2 - 6*x + 9) - x + 2)*e^(5*x^2 + 5*e^(log(x - 2)^4 - 
 2*(x - 3)*log(x - 2)^2 + x^2 - 6*x + 9))/(x^3 - 2*x^2), x)
                                                                                    
                                                                                    
 

Mupad [B] (verification not implemented)

Time = 0.58 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.63 \[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\frac {{\mathrm {e}}^{5\,x^2}\,{\mathrm {e}}^{5\,{\mathrm {e}}^{{\ln \left (x-2\right )}^4}\,{\mathrm {e}}^{-6\,x}\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^9\,{\mathrm {e}}^{6\,{\ln \left (x-2\right )}^2}\,{\mathrm {e}}^{-2\,x\,{\ln \left (x-2\right )}^2}}}{x} \] Input:

int(-(exp(5*exp(log(x - 2)^4 - log(x - 2)^2*(2*x - 6) - 6*x + x^2 + 9) + 5 
*x^2)*(exp(log(x - 2)^4 - log(x - 2)^2*(2*x - 6) - 6*x + x^2 + 9)*(60*x + 
log(x - 2)*(60*x - 20*x^2) + log(x - 2)^2*(20*x - 10*x^2) + 20*x*log(x - 2 
)^3 - 50*x^2 + 10*x^3) - x - 20*x^2 + 10*x^3 + 2))/(2*x^2 - x^3),x)
 

Output:

(exp(5*x^2)*exp(5*exp(log(x - 2)^4)*exp(-6*x)*exp(x^2)*exp(9)*exp(6*log(x 
- 2)^2)*exp(-2*x*log(x - 2)^2)))/x
 

Reduce [F]

\[ \int \frac {e^{5 e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)}+5 x^2} \left (2-x-20 x^2+10 x^3+e^{9-6 x+x^2+(6-2 x) \log ^2(-2+x)+\log ^4(-2+x)} \left (60 x-50 x^2+10 x^3+\left (60 x-20 x^2\right ) \log (-2+x)+\left (20 x-10 x^2\right ) \log ^2(-2+x)+20 x \log ^3(-2+x)\right )\right )}{-2 x^2+x^3} \, dx=\text {too large to display} \] Input:

int(((20*x*log(-2+x)^3+(-10*x^2+20*x)*log(-2+x)^2+(-20*x^2+60*x)*log(-2+x) 
+10*x^3-50*x^2+60*x)*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+10*x^3 
-20*x^2-x+2)*exp(5*exp(log(-2+x)^4+(6-2*x)*log(-2+x)^2+x^2-6*x+9)+5*x^2)/( 
x^3-2*x^2),x)
 

Output:

60*int(e**((5*e**(log(x - 2)**4 + 6*log(x - 2)**2 + x**2)*e**9 + e**(2*log 
(x - 2)**2*x + 6*x)*log(x - 2)**4 + 6*e**(2*log(x - 2)**2*x + 6*x)*log(x - 
 2)**2 + 6*e**(2*log(x - 2)**2*x + 6*x)*x**2)/e**(2*log(x - 2)**2*x + 6*x) 
)/(e**(2*log(x - 2)**2*x + 6*x)*x**2 - 2*e**(2*log(x - 2)**2*x + 6*x)*x),x 
)*e**9 - 50*int(e**((5*e**(log(x - 2)**4 + 6*log(x - 2)**2 + x**2)*e**9 + 
e**(2*log(x - 2)**2*x + 6*x)*log(x - 2)**4 + 6*e**(2*log(x - 2)**2*x + 6*x 
)*log(x - 2)**2 + 6*e**(2*log(x - 2)**2*x + 6*x)*x**2)/e**(2*log(x - 2)**2 
*x + 6*x))/(e**(2*log(x - 2)**2*x + 6*x)*x - 2*e**(2*log(x - 2)**2*x + 6*x 
)),x)*e**9 + 2*int(e**((5*e**(log(x - 2)**4 + 6*log(x - 2)**2 + x**2)*e**9 
 + 5*e**(2*log(x - 2)**2*x + 6*x)*x**2)/e**(2*log(x - 2)**2*x + 6*x))/(x** 
3 - 2*x**2),x) - int(e**((5*e**(log(x - 2)**4 + 6*log(x - 2)**2 + x**2)*e* 
*9 + 5*e**(2*log(x - 2)**2*x + 6*x)*x**2)/e**(2*log(x - 2)**2*x + 6*x))/(x 
**2 - 2*x),x) - 20*int(e**((5*e**(log(x - 2)**4 + 6*log(x - 2)**2 + x**2)* 
e**9 + 5*e**(2*log(x - 2)**2*x + 6*x)*x**2)/e**(2*log(x - 2)**2*x + 6*x))/ 
(x - 2),x) + 20*int((e**((5*e**(log(x - 2)**4 + 6*log(x - 2)**2 + x**2)*e* 
*9 + e**(2*log(x - 2)**2*x + 6*x)*log(x - 2)**4 + 6*e**(2*log(x - 2)**2*x 
+ 6*x)*log(x - 2)**2 + 6*e**(2*log(x - 2)**2*x + 6*x)*x**2)/e**(2*log(x - 
2)**2*x + 6*x))*log(x - 2)**3)/(e**(2*log(x - 2)**2*x + 6*x)*x**2 - 2*e**( 
2*log(x - 2)**2*x + 6*x)*x),x)*e**9 + 20*int((e**((5*e**(log(x - 2)**4 + 6 
*log(x - 2)**2 + x**2)*e**9 + e**(2*log(x - 2)**2*x + 6*x)*log(x - 2)**...