\(\int \frac {e^{-\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} (-6+8 x-2 x^2+e^{\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} (-4+4 x-x^2)+e^x (8-8 x+2 x^2))}{4-4 x+x^2} \, dx\) [635]

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

Optimal result

Integrand size = 97, antiderivative size = 26 \[ \int \frac {e^{-\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-6+8 x-2 x^2+e^{\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-4+4 x-x^2\right )+e^x \left (8-8 x+2 x^2\right )\right )}{4-4 x+x^2} \, dx=2 e^{e^x-\frac {5}{5+5 (-3+x)}-x}-x \]

[Out]

2/exp(x-exp(x)+5/(5*x-10))-x

Rubi [F]

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

[In]

Int[(-6 + 8*x - 2*x^2 + E^((1 + E^x*(2 - x) - 2*x + x^2)/(-2 + x))*(-4 + 4*x - x^2) + E^x*(8 - 8*x + 2*x^2))/(
E^((1 + E^x*(2 - x) - 2*x + x^2)/(-2 + x))*(4 - 4*x + x^2)),x]

[Out]

-x + 2*Defer[Int][E^(E^x + (2 - x)^(-1)), x] - 2*Defer[Int][E^(E^x - (-1 + x)^2/(-2 + x)), x] + 2*Defer[Int][E
^(E^x - (-1 + x)^2/(-2 + x))/(-2 + x)^2, x]

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

Mathematica [A] (verified)

Time = 0.51 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {e^{-\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-6+8 x-2 x^2+e^{\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-4+4 x-x^2\right )+e^x \left (8-8 x+2 x^2\right )\right )}{4-4 x+x^2} \, dx=2 e^{e^x-\frac {1}{-2+x}-x}-x \]

[In]

Integrate[(-6 + 8*x - 2*x^2 + E^((1 + E^x*(2 - x) - 2*x + x^2)/(-2 + x))*(-4 + 4*x - x^2) + E^x*(8 - 8*x + 2*x
^2))/(E^((1 + E^x*(2 - x) - 2*x + x^2)/(-2 + x))*(4 - 4*x + x^2)),x]

[Out]

2*E^(E^x - (-2 + x)^(-1) - x) - x

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23

method result size
risch \(-x +2 \,{\mathrm e}^{\frac {{\mathrm e}^{x} x -x^{2}-2 \,{\mathrm e}^{x}+2 x -1}{-2+x}}\) \(32\)
norman \(\frac {\left (-4+4 \,{\mathrm e}^{\frac {\left (2-x \right ) {\mathrm e}^{x}+x^{2}-2 x +1}{-2+x}}+2 x -x^{2} {\mathrm e}^{\frac {\left (2-x \right ) {\mathrm e}^{x}+x^{2}-2 x +1}{-2+x}}\right ) {\mathrm e}^{-\frac {\left (2-x \right ) {\mathrm e}^{x}+x^{2}-2 x +1}{-2+x}}}{-2+x}\) \(90\)
parallelrisch \(\frac {\left (-4-x^{2} {\mathrm e}^{\frac {\left (2-x \right ) {\mathrm e}^{x}+x^{2}-2 x +1}{-2+x}}-6 \,{\mathrm e}^{\frac {\left (2-x \right ) {\mathrm e}^{x}+x^{2}-2 x +1}{-2+x}} x +2 x +16 \,{\mathrm e}^{\frac {\left (2-x \right ) {\mathrm e}^{x}+x^{2}-2 x +1}{-2+x}}\right ) {\mathrm e}^{-\frac {\left (2-x \right ) {\mathrm e}^{x}+x^{2}-2 x +1}{-2+x}}}{-2+x}\) \(116\)

[In]

int(((-x^2+4*x-4)*exp(((2-x)*exp(x)+x^2-2*x+1)/(-2+x))+(2*x^2-8*x+8)*exp(x)-2*x^2+8*x-6)/(x^2-4*x+4)/exp(((2-x
)*exp(x)+x^2-2*x+1)/(-2+x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.12 \[ \int \frac {e^{-\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-6+8 x-2 x^2+e^{\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-4+4 x-x^2\right )+e^x \left (8-8 x+2 x^2\right )\right )}{4-4 x+x^2} \, dx=-x + 2 \, e^{\left (-\frac {x^{2} - {\left (x - 2\right )} e^{x} - 2 \, x + 1}{x - 2}\right )} \]

[In]

integrate(((-x^2+4*x-4)*exp(((2-x)*exp(x)+x^2-2*x+1)/(-2+x))+(2*x^2-8*x+8)*exp(x)-2*x^2+8*x-6)/(x^2-4*x+4)/exp
(((2-x)*exp(x)+x^2-2*x+1)/(-2+x)),x, algorithm="fricas")

[Out]

-x + 2*e^(-(x^2 - (x - 2)*e^x - 2*x + 1)/(x - 2))

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {e^{-\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-6+8 x-2 x^2+e^{\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-4+4 x-x^2\right )+e^x \left (8-8 x+2 x^2\right )\right )}{4-4 x+x^2} \, dx=- x + 2 e^{- \frac {x^{2} - 2 x + \left (2 - x\right ) e^{x} + 1}{x - 2}} \]

[In]

integrate(((-x**2+4*x-4)*exp(((2-x)*exp(x)+x**2-2*x+1)/(-2+x))+(2*x**2-8*x+8)*exp(x)-2*x**2+8*x-6)/(x**2-4*x+4
)/exp(((2-x)*exp(x)+x**2-2*x+1)/(-2+x)),x)

[Out]

-x + 2*exp(-(x**2 - 2*x + (2 - x)*exp(x) + 1)/(x - 2))

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \frac {e^{-\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-6+8 x-2 x^2+e^{\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-4+4 x-x^2\right )+e^x \left (8-8 x+2 x^2\right )\right )}{4-4 x+x^2} \, dx=-x + 2 \, e^{\left (-x - \frac {1}{x - 2} + e^{x}\right )} \]

[In]

integrate(((-x^2+4*x-4)*exp(((2-x)*exp(x)+x^2-2*x+1)/(-2+x))+(2*x^2-8*x+8)*exp(x)-2*x^2+8*x-6)/(x^2-4*x+4)/exp
(((2-x)*exp(x)+x^2-2*x+1)/(-2+x)),x, algorithm="maxima")

[Out]

-x + 2*e^(-x - 1/(x - 2) + e^x)

Giac [F]

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

[In]

integrate(((-x^2+4*x-4)*exp(((2-x)*exp(x)+x^2-2*x+1)/(-2+x))+(2*x^2-8*x+8)*exp(x)-2*x^2+8*x-6)/(x^2-4*x+4)/exp
(((2-x)*exp(x)+x^2-2*x+1)/(-2+x)),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.90 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.08 \[ \int \frac {e^{-\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-6+8 x-2 x^2+e^{\frac {1+e^x (2-x)-2 x+x^2}{-2+x}} \left (-4+4 x-x^2\right )+e^x \left (8-8 x+2 x^2\right )\right )}{4-4 x+x^2} \, dx=2\,{\mathrm {e}}^{\frac {x\,{\mathrm {e}}^x}{x-2}}\,{\mathrm {e}}^{\frac {2\,x}{x-2}}\,{\mathrm {e}}^{-\frac {x^2}{x-2}}\,{\mathrm {e}}^{-\frac {2\,{\mathrm {e}}^x}{x-2}}\,{\mathrm {e}}^{-\frac {1}{x-2}}-x \]

[In]

int(-(exp((2*x + exp(x)*(x - 2) - x^2 - 1)/(x - 2))*(2*x^2 - exp(x)*(2*x^2 - 8*x + 8) - 8*x + exp(-(2*x + exp(
x)*(x - 2) - x^2 - 1)/(x - 2))*(x^2 - 4*x + 4) + 6))/(x^2 - 4*x + 4),x)

[Out]

2*exp((x*exp(x))/(x - 2))*exp((2*x)/(x - 2))*exp(-x^2/(x - 2))*exp(-(2*exp(x))/(x - 2))*exp(-1/(x - 2)) - x