\(\int \frac {-4 x-6 x^2-2 x^3+e^x (2 x+2 x^2)+e^{\frac {x^2+\log ^2(-2 x+e^x x-x^2)}{x}} (-2 x-3 x^2-x^3+e^x (x+x^2)+(-4-4 x+e^x (2+2 x)) \log (-2 x+e^x x-x^2)+(2-e^x+x) \log ^2(-2 x+e^x x-x^2))}{-2 x+e^x x-x^2} \, dx\) [6821]

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

Optimal result

Integrand size = 151, antiderivative size = 28 \[ \int \frac {-4 x-6 x^2-2 x^3+e^x \left (2 x+2 x^2\right )+e^{\frac {x^2+\log ^2\left (-2 x+e^x x-x^2\right )}{x}} \left (-2 x-3 x^2-x^3+e^x \left (x+x^2\right )+\left (-4-4 x+e^x (2+2 x)\right ) \log \left (-2 x+e^x x-x^2\right )+\left (2-e^x+x\right ) \log ^2\left (-2 x+e^x x-x^2\right )\right )}{-2 x+e^x x-x^2} \, dx=-1+x \left (2+e^{x+\frac {\log ^2\left (\left (-2+e^x-x\right ) x\right )}{x}}+x\right ) \]

[Out]

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

Rubi [F(-1)]

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

[In]

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

[Out]

$Aborted

Rubi steps Aborted

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {-4 x-6 x^2-2 x^3+e^x \left (2 x+2 x^2\right )+e^{\frac {x^2+\log ^2\left (-2 x+e^x x-x^2\right )}{x}} \left (-2 x-3 x^2-x^3+e^x \left (x+x^2\right )+\left (-4-4 x+e^x (2+2 x)\right ) \log \left (-2 x+e^x x-x^2\right )+\left (2-e^x+x\right ) \log ^2\left (-2 x+e^x x-x^2\right )\right )}{-2 x+e^x x-x^2} \, dx=x \left (2+e^{x+\frac {\log ^2\left (-x \left (2-e^x+x\right )\right )}{x}}+x\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.95 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.14

method result size
parallelrisch \(-4+x^{2}+{\mathrm e}^{\frac {{\ln \left (x \left ({\mathrm e}^{x}-2-x \right )\right )}^{2}+x^{2}}{x}} x +2 x\) \(32\)
risch \(\text {Expression too large to display}\) \(812\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.21 \[ \int \frac {-4 x-6 x^2-2 x^3+e^x \left (2 x+2 x^2\right )+e^{\frac {x^2+\log ^2\left (-2 x+e^x x-x^2\right )}{x}} \left (-2 x-3 x^2-x^3+e^x \left (x+x^2\right )+\left (-4-4 x+e^x (2+2 x)\right ) \log \left (-2 x+e^x x-x^2\right )+\left (2-e^x+x\right ) \log ^2\left (-2 x+e^x x-x^2\right )\right )}{-2 x+e^x x-x^2} \, dx=x^{2} + x e^{\left (\frac {x^{2} + \log \left (-x^{2} + x e^{x} - 2 \, x\right )^{2}}{x}\right )} + 2 \, x \]

[In]

integrate((((x-exp(x)+2)*log(exp(x)*x-x^2-2*x)^2+((2+2*x)*exp(x)-4*x-4)*log(exp(x)*x-x^2-2*x)+(x^2+x)*exp(x)-x
^3-3*x^2-2*x)*exp((log(exp(x)*x-x^2-2*x)^2+x^2)/x)+(2*x^2+2*x)*exp(x)-2*x^3-6*x^2-4*x)/(exp(x)*x-x^2-2*x),x, a
lgorithm="fricas")

[Out]

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

Sympy [F(-1)]

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

[In]

integrate((((x-exp(x)+2)*ln(exp(x)*x-x**2-2*x)**2+((2+2*x)*exp(x)-4*x-4)*ln(exp(x)*x-x**2-2*x)+(x**2+x)*exp(x)
-x**3-3*x**2-2*x)*exp((ln(exp(x)*x-x**2-2*x)**2+x**2)/x)+(2*x**2+2*x)*exp(x)-2*x**3-6*x**2-4*x)/(exp(x)*x-x**2
-2*x),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.75 \[ \int \frac {-4 x-6 x^2-2 x^3+e^x \left (2 x+2 x^2\right )+e^{\frac {x^2+\log ^2\left (-2 x+e^x x-x^2\right )}{x}} \left (-2 x-3 x^2-x^3+e^x \left (x+x^2\right )+\left (-4-4 x+e^x (2+2 x)\right ) \log \left (-2 x+e^x x-x^2\right )+\left (2-e^x+x\right ) \log ^2\left (-2 x+e^x x-x^2\right )\right )}{-2 x+e^x x-x^2} \, dx=x^{2} + x e^{\left (x + \frac {\log \left (x\right )^{2}}{x} + \frac {2 \, \log \left (x\right ) \log \left (-x + e^{x} - 2\right )}{x} + \frac {\log \left (-x + e^{x} - 2\right )^{2}}{x}\right )} + 2 \, x \]

[In]

integrate((((x-exp(x)+2)*log(exp(x)*x-x^2-2*x)^2+((2+2*x)*exp(x)-4*x-4)*log(exp(x)*x-x^2-2*x)+(x^2+x)*exp(x)-x
^3-3*x^2-2*x)*exp((log(exp(x)*x-x^2-2*x)^2+x^2)/x)+(2*x^2+2*x)*exp(x)-2*x^3-6*x^2-4*x)/(exp(x)*x-x^2-2*x),x, a
lgorithm="maxima")

[Out]

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

Giac [F]

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

[In]

integrate((((x-exp(x)+2)*log(exp(x)*x-x^2-2*x)^2+((2+2*x)*exp(x)-4*x-4)*log(exp(x)*x-x^2-2*x)+(x^2+x)*exp(x)-x
^3-3*x^2-2*x)*exp((log(exp(x)*x-x^2-2*x)^2+x^2)/x)+(2*x^2+2*x)*exp(x)-2*x^3-6*x^2-4*x)/(exp(x)*x-x^2-2*x),x, a
lgorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.12 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.14 \[ \int \frac {-4 x-6 x^2-2 x^3+e^x \left (2 x+2 x^2\right )+e^{\frac {x^2+\log ^2\left (-2 x+e^x x-x^2\right )}{x}} \left (-2 x-3 x^2-x^3+e^x \left (x+x^2\right )+\left (-4-4 x+e^x (2+2 x)\right ) \log \left (-2 x+e^x x-x^2\right )+\left (2-e^x+x\right ) \log ^2\left (-2 x+e^x x-x^2\right )\right )}{-2 x+e^x x-x^2} \, dx=2\,x+x^2+x\,{\mathrm {e}}^{\frac {{\ln \left (x\,{\mathrm {e}}^x-2\,x-x^2\right )}^2}{x}}\,{\mathrm {e}}^x \]

[In]

int((4*x + exp((x^2 + log(x*exp(x) - 2*x - x^2)^2)/x)*(2*x - log(x*exp(x) - 2*x - x^2)^2*(x - exp(x) + 2) + lo
g(x*exp(x) - 2*x - x^2)*(4*x - exp(x)*(2*x + 2) + 4) + 3*x^2 + x^3 - exp(x)*(x + x^2)) - exp(x)*(2*x + 2*x^2)
+ 6*x^2 + 2*x^3)/(2*x - x*exp(x) + x^2),x)

[Out]

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