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

   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 [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.81 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00

method result size
risch \(\ln \left (x^{2}+x +\ln \left (\left (2-x \right ) {\mathrm e}^{{\mathrm e}^{x}}+2 x -3\right )\right )\) \(22\)
parallelrisch \(\ln \left (x^{2}+x +\ln \left (\left (2-x \right ) {\mathrm e}^{{\mathrm e}^{x}}+2 x -3\right )\right )\) \(22\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.48 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {1+4 x-4 x^2+e^{e^x} \left (-1+e^x (-2+x)-3 x+2 x^2\right )}{3 x+x^2-2 x^3+e^{e^x} \left (-2 x-x^2+x^3\right )+\left (3+e^{e^x} (-2+x)-2 x\right ) \log \left (-3+e^{e^x} (2-x)+2 x\right )} \, dx=\log {\left (x^{2} + x + \log {\left (2 x + \left (2 - x\right ) e^{e^{x}} - 3 \right )} \right )} \]

[In]

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

[Out]

log(x**2 + x + log(2*x + (2 - x)*exp(exp(x)) - 3))

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {1+4 x-4 x^2+e^{e^x} \left (-1+e^x (-2+x)-3 x+2 x^2\right )}{3 x+x^2-2 x^3+e^{e^x} \left (-2 x-x^2+x^3\right )+\left (3+e^{e^x} (-2+x)-2 x\right ) \log \left (-3+e^{e^x} (2-x)+2 x\right )} \, dx=\log \left (x^{2} + x + \log \left (-{\left (x - 2\right )} e^{\left (e^{x}\right )} + 2 \, x - 3\right )\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.68 \[ \int \frac {1+4 x-4 x^2+e^{e^x} \left (-1+e^x (-2+x)-3 x+2 x^2\right )}{3 x+x^2-2 x^3+e^{e^x} \left (-2 x-x^2+x^3\right )+\left (3+e^{e^x} (-2+x)-2 x\right ) \log \left (-3+e^{e^x} (2-x)+2 x\right )} \, dx=\log \left (x^{2} + x + \log \left (-{\left (x e^{\left (x + e^{x}\right )} - 2 \, x e^{x} - 2 \, e^{\left (x + e^{x}\right )} + 3 \, e^{x}\right )} e^{\left (-x\right )}\right )\right ) \]

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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