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

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

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.38 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.87 \[ \int \frac {e^{e^{\frac {4 e^6 x^2-x^3+x^4}{-1+x}}+e^{e^{\frac {4 e^6 x^2-x^3+x^4}{-1+x}}} x^2} \left (2 x-4 x^2+2 x^3+e^{\frac {4 e^6 x^2-x^3+x^4}{-1+x}} \left (3 x^4-6 x^5+3 x^6+e^6 \left (-8 x^3+4 x^4\right )\right )\right )}{1-2 x+x^2} \, dx=e^{e^{e^{x^2 \left (\frac {4 e^6}{-1+x}+x\right )}} x^2} \]

[In]

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

[Out]

E^(E^E^(x^2*((4*E^6)/(-1 + x) + x))*x^2)

Maple [A] (verified)

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

method result size
risch \({\mathrm e}^{x^{2} {\mathrm e}^{{\mathrm e}^{\frac {x^{2} \left (x^{2}+4 \,{\mathrm e}^{6}-x \right )}{-1+x}}}}\) \(28\)
parallelrisch \({\mathrm e}^{x^{2} {\mathrm e}^{{\mathrm e}^{\frac {x^{2} \left (x^{2}+4 \,{\mathrm e}^{6}-x \right )}{-1+x}}}}\) \(30\)

[In]

int((((4*x^4-8*x^3)*exp(3)^2+3*x^6-6*x^5+3*x^4)*exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))+2*x^3-4*x^2+2*x)*exp(exp(
(4*x^2*exp(3)^2+x^4-x^3)/(-1+x)))*exp(x^2*exp(exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))))/(x^2-2*x+1),x,method=_RET
URNVERBOSE)

[Out]

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

Fricas [F(-1)]

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

[In]

integrate((((4*x^4-8*x^3)*exp(3)^2+3*x^6-6*x^5+3*x^4)*exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))+2*x^3-4*x^2+2*x)*ex
p(exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x)))*exp(x^2*exp(exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))))/(x^2-2*x+1),x, algo
rithm="fricas")

[Out]

Timed out

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [A] (verification not implemented)

none

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

[In]

integrate((((4*x^4-8*x^3)*exp(3)^2+3*x^6-6*x^5+3*x^4)*exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))+2*x^3-4*x^2+2*x)*ex
p(exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x)))*exp(x^2*exp(exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))))/(x^2-2*x+1),x, algo
rithm="maxima")

[Out]

e^(x^2*e^(e^(x^3 + 4*x*e^6 + 4*e^6/(x - 1) + 4*e^6)))

Giac [F]

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

[In]

integrate((((4*x^4-8*x^3)*exp(3)^2+3*x^6-6*x^5+3*x^4)*exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))+2*x^3-4*x^2+2*x)*ex
p(exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x)))*exp(x^2*exp(exp((4*x^2*exp(3)^2+x^4-x^3)/(-1+x))))/(x^2-2*x+1),x, algo
rithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.24 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.37 \[ \int \frac {e^{e^{\frac {4 e^6 x^2-x^3+x^4}{-1+x}}+e^{e^{\frac {4 e^6 x^2-x^3+x^4}{-1+x}}} x^2} \left (2 x-4 x^2+2 x^3+e^{\frac {4 e^6 x^2-x^3+x^4}{-1+x}} \left (3 x^4-6 x^5+3 x^6+e^6 \left (-8 x^3+4 x^4\right )\right )\right )}{1-2 x+x^2} \, dx={\mathrm {e}}^{x^2\,{\mathrm {e}}^{{\mathrm {e}}^{\frac {4\,x^2\,{\mathrm {e}}^6}{x-1}}\,{\mathrm {e}}^{\frac {x^4}{x-1}}\,{\mathrm {e}}^{-\frac {x^3}{x-1}}}} \]

[In]

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

[Out]

exp(x^2*exp(exp((4*x^2*exp(6))/(x - 1))*exp(x^4/(x - 1))*exp(-x^3/(x - 1))))