\(\int \frac {e^{-2 e^{e^x}} (e^{\frac {4}{-1+x}} (2 x-2 x^2)+e^{\frac {8}{-1+x}} (1-10 x+x^2)+(-2 x+2 x^2+e^{\frac {4}{-1+x}} (-2+12 x-2 x^2)) \log (-1+x)+(1-2 x+x^2) \log ^2(-1+x)+e^{e^x} (e^{\frac {8}{-1+x}+x} (-2 x+4 x^2-2 x^3)+e^{\frac {4}{-1+x}+x} (4 x-8 x^2+4 x^3) \log (-1+x)+e^x (-2 x+4 x^2-2 x^3) \log ^2(-1+x)))}{1-2 x+x^2} \, dx\) [7512]

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

Optimal result

Integrand size = 194, antiderivative size = 29 \[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx=e^{-2 e^{e^x}} x \left (e^{\frac {4}{-1+x}}-\log (-1+x)\right )^2 \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(95\) vs. \(2(29)=58\).

Time = 0.70 (sec) , antiderivative size = 95, normalized size of antiderivative = 3.28, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.010, Rules used = {27, 2326} \[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx=\frac {e^{-x-2 e^{e^x}} \left (e^{x-\frac {8}{1-x}} \left (x^3-2 x^2+x\right )+e^x \left (x^3-2 x^2+x\right ) \log ^2(x-1)-2 e^{x-\frac {4}{1-x}} \left (x^3-2 x^2+x\right ) \log (x-1)\right )}{(1-x)^2} \]

[In]

Int[(E^(4/(-1 + x))*(2*x - 2*x^2) + E^(8/(-1 + x))*(1 - 10*x + x^2) + (-2*x + 2*x^2 + E^(4/(-1 + x))*(-2 + 12*
x - 2*x^2))*Log[-1 + x] + (1 - 2*x + x^2)*Log[-1 + x]^2 + E^E^x*(E^(8/(-1 + x) + x)*(-2*x + 4*x^2 - 2*x^3) + E
^(4/(-1 + x) + x)*(4*x - 8*x^2 + 4*x^3)*Log[-1 + x] + E^x*(-2*x + 4*x^2 - 2*x^3)*Log[-1 + x]^2))/(E^(2*E^E^x)*
(1 - 2*x + x^2)),x]

[Out]

(E^(-2*E^E^x - x)*(E^(-8/(1 - x) + x)*(x - 2*x^2 + x^3) - 2*E^(-4/(1 - x) + x)*(x - 2*x^2 + x^3)*Log[-1 + x] +
 E^x*(x - 2*x^2 + x^3)*Log[-1 + x]^2))/(1 - x)^2

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 2326

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]

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

Mathematica [A] (verified)

Time = 0.42 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx=e^{-2 e^{e^x}} x \left (e^{\frac {4}{-1+x}}-\log (-1+x)\right )^2 \]

[In]

Integrate[(E^(4/(-1 + x))*(2*x - 2*x^2) + E^(8/(-1 + x))*(1 - 10*x + x^2) + (-2*x + 2*x^2 + E^(4/(-1 + x))*(-2
 + 12*x - 2*x^2))*Log[-1 + x] + (1 - 2*x + x^2)*Log[-1 + x]^2 + E^E^x*(E^(8/(-1 + x) + x)*(-2*x + 4*x^2 - 2*x^
3) + E^(4/(-1 + x) + x)*(4*x - 8*x^2 + 4*x^3)*Log[-1 + x] + E^x*(-2*x + 4*x^2 - 2*x^3)*Log[-1 + x]^2))/(E^(2*E
^E^x)*(1 - 2*x + x^2)),x]

[Out]

(x*(E^(4/(-1 + x)) - Log[-1 + x])^2)/E^(2*E^E^x)

Maple [A] (verified)

Time = 212.10 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.31

method result size
risch \(\left ({\mathrm e}^{\frac {8}{-1+x}}-2 \,{\mathrm e}^{\frac {4}{-1+x}} \ln \left (-1+x \right )+\ln \left (-1+x \right )^{2}\right ) x \,{\mathrm e}^{-2 \,{\mathrm e}^{{\mathrm e}^{x}}}\) \(38\)
parallelrisch \(\frac {\left (4 \ln \left (-1+x \right )^{2} x -8 x \,{\mathrm e}^{\frac {4}{-1+x}} \ln \left (-1+x \right )+4 \,{\mathrm e}^{\frac {8}{-1+x}} x \right ) {\mathrm e}^{-2 \,{\mathrm e}^{{\mathrm e}^{x}}}}{4}\) \(47\)

[In]

int((((-2*x^3+4*x^2-2*x)*exp(x)*ln(-1+x)^2+(4*x^3-8*x^2+4*x)*exp(4/(-1+x))*exp(x)*ln(-1+x)+(-2*x^3+4*x^2-2*x)*
exp(4/(-1+x))^2*exp(x))*exp(exp(x))+(x^2-2*x+1)*ln(-1+x)^2+((-2*x^2+12*x-2)*exp(4/(-1+x))+2*x^2-2*x)*ln(-1+x)+
(x^2-10*x+1)*exp(4/(-1+x))^2+(-2*x^2+2*x)*exp(4/(-1+x)))/(x^2-2*x+1)/exp(exp(exp(x)))^2,x,method=_RETURNVERBOS
E)

[Out]

(exp(8/(-1+x))-2*exp(4/(-1+x))*ln(-1+x)+ln(-1+x)^2)*x*exp(-2*exp(exp(x)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 133 vs. \(2 (25) = 50\).

Time = 0.26 (sec) , antiderivative size = 133, normalized size of antiderivative = 4.59 \[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx={\left (x e^{\left (\frac {2 \, {\left (x^{2} - x + 4\right )}}{x - 1}\right )} \log \left (x - 1\right )^{2} - 2 \, x e^{\left (\frac {x^{2} - x + 8}{x - 1} + \frac {x^{2} - x + 4}{x - 1}\right )} \log \left (x - 1\right ) + x e^{\left (\frac {2 \, {\left (x^{2} - x + 8\right )}}{x - 1}\right )}\right )} e^{\left (-\frac {2 \, {\left (x^{2} - x + 4\right )}}{x - 1} - 2 \, e^{\left (e^{\left (-\frac {x^{2} - x + 8}{x - 1} + \frac {2 \, {\left (x^{2} - x + 4\right )}}{x - 1}\right )}\right )}\right )} \]

[In]

integrate((((-2*x^3+4*x^2-2*x)*exp(x)*log(-1+x)^2+(4*x^3-8*x^2+4*x)*exp(4/(-1+x))*exp(x)*log(-1+x)+(-2*x^3+4*x
^2-2*x)*exp(4/(-1+x))^2*exp(x))*exp(exp(x))+(x^2-2*x+1)*log(-1+x)^2+((-2*x^2+12*x-2)*exp(4/(-1+x))+2*x^2-2*x)*
log(-1+x)+(x^2-10*x+1)*exp(4/(-1+x))^2+(-2*x^2+2*x)*exp(4/(-1+x)))/(x^2-2*x+1)/exp(exp(exp(x)))^2,x, algorithm
="fricas")

[Out]

(x*e^(2*(x^2 - x + 4)/(x - 1))*log(x - 1)^2 - 2*x*e^((x^2 - x + 8)/(x - 1) + (x^2 - x + 4)/(x - 1))*log(x - 1)
 + x*e^(2*(x^2 - x + 8)/(x - 1)))*e^(-2*(x^2 - x + 4)/(x - 1) - 2*e^(e^(-(x^2 - x + 8)/(x - 1) + 2*(x^2 - x +
4)/(x - 1))))

Sympy [F(-1)]

Timed out. \[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx=\text {Timed out} \]

[In]

integrate((((-2*x**3+4*x**2-2*x)*exp(x)*ln(-1+x)**2+(4*x**3-8*x**2+4*x)*exp(4/(-1+x))*exp(x)*ln(-1+x)+(-2*x**3
+4*x**2-2*x)*exp(4/(-1+x))**2*exp(x))*exp(exp(x))+(x**2-2*x+1)*ln(-1+x)**2+((-2*x**2+12*x-2)*exp(4/(-1+x))+2*x
**2-2*x)*ln(-1+x)+(x**2-10*x+1)*exp(4/(-1+x))**2+(-2*x**2+2*x)*exp(4/(-1+x)))/(x**2-2*x+1)/exp(exp(exp(x)))**2
,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.52 \[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx=-{\left (2 \, x e^{\left (\frac {4}{x - 1}\right )} \log \left (x - 1\right ) - x \log \left (x - 1\right )^{2} - x e^{\left (\frac {8}{x - 1}\right )}\right )} e^{\left (-2 \, e^{\left (e^{x}\right )}\right )} \]

[In]

integrate((((-2*x^3+4*x^2-2*x)*exp(x)*log(-1+x)^2+(4*x^3-8*x^2+4*x)*exp(4/(-1+x))*exp(x)*log(-1+x)+(-2*x^3+4*x
^2-2*x)*exp(4/(-1+x))^2*exp(x))*exp(exp(x))+(x^2-2*x+1)*log(-1+x)^2+((-2*x^2+12*x-2)*exp(4/(-1+x))+2*x^2-2*x)*
log(-1+x)+(x^2-10*x+1)*exp(4/(-1+x))^2+(-2*x^2+2*x)*exp(4/(-1+x)))/(x^2-2*x+1)/exp(exp(exp(x)))^2,x, algorithm
="maxima")

[Out]

-(2*x*e^(4/(x - 1))*log(x - 1) - x*log(x - 1)^2 - x*e^(8/(x - 1)))*e^(-2*e^(e^x))

Giac [F]

\[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx=\int { \frac {{\left ({\left (x^{2} - 2 \, x + 1\right )} \log \left (x - 1\right )^{2} + {\left (x^{2} - 10 \, x + 1\right )} e^{\left (\frac {8}{x - 1}\right )} - 2 \, {\left (x^{2} - x\right )} e^{\left (\frac {4}{x - 1}\right )} - 2 \, {\left ({\left (x^{3} - 2 \, x^{2} + x\right )} e^{x} \log \left (x - 1\right )^{2} - 2 \, {\left (x^{3} - 2 \, x^{2} + x\right )} e^{\left (x + \frac {4}{x - 1}\right )} \log \left (x - 1\right ) + {\left (x^{3} - 2 \, x^{2} + x\right )} e^{\left (x + \frac {8}{x - 1}\right )}\right )} e^{\left (e^{x}\right )} + 2 \, {\left (x^{2} - {\left (x^{2} - 6 \, x + 1\right )} e^{\left (\frac {4}{x - 1}\right )} - x\right )} \log \left (x - 1\right )\right )} e^{\left (-2 \, e^{\left (e^{x}\right )}\right )}}{x^{2} - 2 \, x + 1} \,d x } \]

[In]

integrate((((-2*x^3+4*x^2-2*x)*exp(x)*log(-1+x)^2+(4*x^3-8*x^2+4*x)*exp(4/(-1+x))*exp(x)*log(-1+x)+(-2*x^3+4*x
^2-2*x)*exp(4/(-1+x))^2*exp(x))*exp(exp(x))+(x^2-2*x+1)*log(-1+x)^2+((-2*x^2+12*x-2)*exp(4/(-1+x))+2*x^2-2*x)*
log(-1+x)+(x^2-10*x+1)*exp(4/(-1+x))^2+(-2*x^2+2*x)*exp(4/(-1+x)))/(x^2-2*x+1)/exp(exp(exp(x)))^2,x, algorithm
="giac")

[Out]

integrate(((x^2 - 2*x + 1)*log(x - 1)^2 + (x^2 - 10*x + 1)*e^(8/(x - 1)) - 2*(x^2 - x)*e^(4/(x - 1)) - 2*((x^3
 - 2*x^2 + x)*e^x*log(x - 1)^2 - 2*(x^3 - 2*x^2 + x)*e^(x + 4/(x - 1))*log(x - 1) + (x^3 - 2*x^2 + x)*e^(x + 8
/(x - 1)))*e^(e^x) + 2*(x^2 - (x^2 - 6*x + 1)*e^(4/(x - 1)) - x)*log(x - 1))*e^(-2*e^(e^x))/(x^2 - 2*x + 1), x
)

Mupad [B] (verification not implemented)

Time = 12.70 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.41 \[ \int \frac {e^{-2 e^{e^x}} \left (e^{\frac {4}{-1+x}} \left (2 x-2 x^2\right )+e^{\frac {8}{-1+x}} \left (1-10 x+x^2\right )+\left (-2 x+2 x^2+e^{\frac {4}{-1+x}} \left (-2+12 x-2 x^2\right )\right ) \log (-1+x)+\left (1-2 x+x^2\right ) \log ^2(-1+x)+e^{e^x} \left (e^{\frac {8}{-1+x}+x} \left (-2 x+4 x^2-2 x^3\right )+e^{\frac {4}{-1+x}+x} \left (4 x-8 x^2+4 x^3\right ) \log (-1+x)+e^x \left (-2 x+4 x^2-2 x^3\right ) \log ^2(-1+x)\right )\right )}{1-2 x+x^2} \, dx={\mathrm {e}}^{-2\,{\mathrm {e}}^{{\mathrm {e}}^x}}\,\left (x\,{\ln \left (x-1\right )}^2-2\,x\,{\mathrm {e}}^{\frac {4}{x-1}}\,\ln \left (x-1\right )+x\,{\mathrm {e}}^{\frac {8}{x-1}}\right ) \]

[In]

int((exp(-2*exp(exp(x)))*(log(x - 1)^2*(x^2 - 2*x + 1) + exp(8/(x - 1))*(x^2 - 10*x + 1) - exp(exp(x))*(log(x
- 1)^2*exp(x)*(2*x - 4*x^2 + 2*x^3) + exp(x)*exp(8/(x - 1))*(2*x - 4*x^2 + 2*x^3) - log(x - 1)*exp(x)*exp(4/(x
 - 1))*(4*x - 8*x^2 + 4*x^3)) + exp(4/(x - 1))*(2*x - 2*x^2) - log(x - 1)*(2*x + exp(4/(x - 1))*(2*x^2 - 12*x
+ 2) - 2*x^2)))/(x^2 - 2*x + 1),x)

[Out]

exp(-2*exp(exp(x)))*(x*log(x - 1)^2 + x*exp(8/(x - 1)) - 2*x*log(x - 1)*exp(4/(x - 1)))