\(\int \frac {e^{-\frac {-9+6 x+3 x^2}{x}} (-9+x-3 x^2)}{x} \, dx\) [6617]

   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 = 29, antiderivative size = 16 \[ \int \frac {e^{-\frac {-9+6 x+3 x^2}{x}} \left (-9+x-3 x^2\right )}{x} \, dx=-5+e^{-3 \left (2-\frac {3}{x}+x\right )} x \]

[Out]

x/exp(3*x-9/x+6)-5

Rubi [B] (verified)

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

Time = 0.04 (sec) , antiderivative size = 51, normalized size of antiderivative = 3.19, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {2326} \[ \int \frac {e^{-\frac {-9+6 x+3 x^2}{x}} \left (-9+x-3 x^2\right )}{x} \, dx=\frac {e^{\frac {3 \left (-x^2-2 x+3\right )}{x}} \left (x^2+3\right )}{x \left (\frac {-x^2-2 x+3}{x^2}+\frac {2 (x+1)}{x}\right )} \]

[In]

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

[Out]

(E^((3*(3 - 2*x - x^2))/x)*(3 + x^2))/(x*((2*(1 + x))/x + (3 - 2*x - x^2)/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^{\frac {3 \left (3-2 x-x^2\right )}{x}} \left (3+x^2\right )}{x \left (\frac {2 (1+x)}{x}+\frac {3-2 x-x^2}{x^2}\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {e^{-\frac {-9+6 x+3 x^2}{x}} \left (-9+x-3 x^2\right )}{x} \, dx=e^{-6+\frac {9}{x}-3 x} x \]

[In]

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

[Out]

E^(-6 + 9/x - 3*x)*x

Maple [A] (verified)

Time = 0.29 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94

method result size
risch \(x \,{\mathrm e}^{-\frac {3 \left (3+x \right ) \left (-1+x \right )}{x}}\) \(15\)
gosper \(x \,{\mathrm e}^{-\frac {3 \left (x^{2}+2 x -3\right )}{x}}\) \(19\)
parallelrisch \(x \,{\mathrm e}^{-\frac {3 \left (x^{2}+2 x -3\right )}{x}}\) \(19\)
norman \(x \,{\mathrm e}^{-\frac {3 x^{2}+6 x -9}{x}}\) \(20\)

[In]

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

[Out]

x*exp(-3*(3+x)*(-1+x)/x)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {e^{-\frac {-9+6 x+3 x^2}{x}} \left (-9+x-3 x^2\right )}{x} \, dx=x e^{- \frac {3 x^{2} + 6 x - 9}{x}} \]

[In]

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

[Out]

x*exp(-(3*x**2 + 6*x - 9)/x)

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.81 \[ \int \frac {e^{-\frac {-9+6 x+3 x^2}{x}} \left (-9+x-3 x^2\right )}{x} \, dx=x e^{\left (-3 \, x + \frac {9}{x} - 6\right )} \]

[In]

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

[Out]

x*e^(-3*x + 9/x - 6)

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.64 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {e^{-\frac {-9+6 x+3 x^2}{x}} \left (-9+x-3 x^2\right )}{x} \, dx=x\,{\mathrm {e}}^{-3\,x}\,{\mathrm {e}}^{-6}\,{\mathrm {e}}^{9/x} \]

[In]

int(-(exp(-(6*x + 3*x^2 - 9)/x)*(3*x^2 - x + 9))/x,x)

[Out]

x*exp(-3*x)*exp(-6)*exp(9/x)