\(\int \frac {e^{-e^x-x} (3-3 x-x^2+e^x (10-3 x-x^2))}{4-4 x+x^2} \, dx\) [9829]

   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 [B] (verification not implemented)

Optimal result

Integrand size = 46, antiderivative size = 23 \[ \int \frac {e^{-e^x-x} \left (3-3 x-x^2+e^x \left (10-3 x-x^2\right )\right )}{4-4 x+x^2} \, dx=\frac {2 e^{-e^x-x} (5+x)}{-4+2 x} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{-e^x-x} \left (3-3 x-x^2+e^x \left (10-3 x-x^2\right )\right )}{(-2+x)^2} \, dx \\ & = \int \left (-\frac {e^{-e^x} (5+x)}{-2+x}+\frac {e^{-e^x-x} \left (3-3 x-x^2\right )}{(-2+x)^2}\right ) \, dx \\ & = -\int \frac {e^{-e^x} (5+x)}{-2+x} \, dx+\int \frac {e^{-e^x-x} \left (3-3 x-x^2\right )}{(-2+x)^2} \, dx \\ & = -\int \left (e^{-e^x}+\frac {7 e^{-e^x}}{-2+x}\right ) \, dx+\int \left (-e^{-e^x-x}-\frac {7 e^{-e^x-x}}{(-2+x)^2}-\frac {7 e^{-e^x-x}}{-2+x}\right ) \, dx \\ & = -\left (7 \int \frac {e^{-e^x-x}}{(-2+x)^2} \, dx\right )-7 \int \frac {e^{-e^x}}{-2+x} \, dx-7 \int \frac {e^{-e^x-x}}{-2+x} \, dx-\int e^{-e^x} \, dx-\int e^{-e^x-x} \, dx \\ & = -\left (7 \int \frac {e^{-e^x-x}}{(-2+x)^2} \, dx\right )-7 \int \frac {e^{-e^x}}{-2+x} \, dx-7 \int \frac {e^{-e^x-x}}{-2+x} \, dx-\text {Subst}\left (\int \frac {e^{-x}}{x^2} \, dx,x,e^x\right )-\text {Subst}\left (\int \frac {e^{-x}}{x} \, dx,x,e^x\right ) \\ & = e^{-e^x-x}-\operatorname {ExpIntegralEi}\left (-e^x\right )-7 \int \frac {e^{-e^x-x}}{(-2+x)^2} \, dx-7 \int \frac {e^{-e^x}}{-2+x} \, dx-7 \int \frac {e^{-e^x-x}}{-2+x} \, dx+\text {Subst}\left (\int \frac {e^{-x}}{x} \, dx,x,e^x\right ) \\ & = e^{-e^x-x}-7 \int \frac {e^{-e^x-x}}{(-2+x)^2} \, dx-7 \int \frac {e^{-e^x}}{-2+x} \, dx-7 \int \frac {e^{-e^x-x}}{-2+x} \, dx \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.05 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.74

method result size
norman \(\frac {\left (5+x \right ) {\mathrm e}^{-{\mathrm e}^{x}-x}}{-2+x}\) \(17\)
parallelrisch \(\frac {\left (5+x \right ) {\mathrm e}^{-{\mathrm e}^{x}-x}}{-2+x}\) \(17\)
risch \(\frac {\left (5+x \right ) {\mathrm e}^{-{\mathrm e}^{x}-x}}{-2+x}\) \(19\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.78 \[ \int \frac {e^{-e^x-x} \left (3-3 x-x^2+e^x \left (10-3 x-x^2\right )\right )}{4-4 x+x^2} \, dx=\frac {{\left (x + 5\right )} e^{\left (-x - e^{x}\right )}}{x - 2} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61 \[ \int \frac {e^{-e^x-x} \left (3-3 x-x^2+e^x \left (10-3 x-x^2\right )\right )}{4-4 x+x^2} \, dx=\frac {\left (x + 5\right ) e^{- x - e^{x}}}{x - 2} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.78 \[ \int \frac {e^{-e^x-x} \left (3-3 x-x^2+e^x \left (10-3 x-x^2\right )\right )}{4-4 x+x^2} \, dx=\frac {{\left (x + 5\right )} e^{\left (-x - e^{x}\right )}}{x - 2} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int \frac {e^{-e^x-x} \left (3-3 x-x^2+e^x \left (10-3 x-x^2\right )\right )}{4-4 x+x^2} \, dx=\frac {x e^{\left (-x - e^{x}\right )} + 5 \, e^{\left (-x - e^{x}\right )}}{x - 2} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 14.93 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.78 \[ \int \frac {e^{-e^x-x} \left (3-3 x-x^2+e^x \left (10-3 x-x^2\right )\right )}{4-4 x+x^2} \, dx=\frac {{\mathrm {e}}^{-x-{\mathrm {e}}^x}\,\left (x+5\right )}{x-2} \]

[In]

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

[Out]

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