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

   Optimal result
   Rubi [B] (verified)
   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 = 36, antiderivative size = 24 \[ \int e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} \left (16+2 x+2 x^2-4 x^3\right ) \, dx=e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} x^2 \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(24)=48\).

Time = 0.03 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.12, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.028, Rules used = {2326} \[ \int e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} \left (16+2 x+2 x^2-4 x^3\right ) \, dx=\frac {e^{-2 x^2+2 x-\frac {4 (x+4)}{x}-4} \left (-2 x^3+x^2+8\right )}{\frac {2 (x+4)}{x^2}-2 x-\frac {2}{x}+1} \]

[In]

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

[Out]

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

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88 \[ \int e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} \left (16+2 x+2 x^2-4 x^3\right ) \, dx=e^{-2 \left (4+\frac {8}{x}-x+x^2\right )} x^2 \]

[In]

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

[Out]

x^2/E^(2*(4 + 8/x - x + x^2))

Maple [A] (verified)

Time = 1.12 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00

method result size
risch \(x^{2} {\mathrm e}^{-\frac {2 \left (x^{3}-x^{2}+4 x +8\right )}{x}}\) \(24\)
gosper \(x^{2} {\mathrm e}^{-\frac {4 \left (4+x \right )}{x}} {\mathrm e}^{-2 x^{2}+2 x -4}\) \(26\)
parallelrisch \(x^{2} {\mathrm e}^{-\frac {4 \left (4+x \right )}{x}} {\mathrm e}^{-2 x^{2}+2 x -4}\) \(26\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} \left (16+2 x+2 x^2-4 x^3\right ) \, dx=x^{2} e^{\left (-\frac {2 \, {\left (x^{3} - x^{2} + 4 \, x + 8\right )}}{x}\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} \left (16+2 x+2 x^2-4 x^3\right ) \, dx=x^{2} e^{\left (-2 \, x^{2} + 2 \, x - \frac {16}{x} - 8\right )} \]

[In]

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

[Out]

x^2*e^(-2*x^2 + 2*x - 16/x - 8)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} \left (16+2 x+2 x^2-4 x^3\right ) \, dx=x^{2} e^{\left (-\frac {2 \, {\left (x^{3} - x^{2} + 4 \, x + 8\right )}}{x}\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 15.61 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92 \[ \int e^{-4+2 x-2 x^2-\frac {4 (4+x)}{x}} \left (16+2 x+2 x^2-4 x^3\right ) \, dx=x^2\,{\mathrm {e}}^{2\,x}\,{\mathrm {e}}^{-8}\,{\mathrm {e}}^{-2\,x^2}\,{\mathrm {e}}^{-\frac {16}{x}} \]

[In]

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

[Out]

x^2*exp(2*x)*exp(-8)*exp(-2*x^2)*exp(-16/x)