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

   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 = 33, antiderivative size = 22 \[ \int e^{\frac {-2-x-x^2+\log (x)}{x}} \left (3+2 x-x^2-\log (x)\right ) \, dx=e^{\frac {-2-x-x^2+\log (x)}{x}} x^2 \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(63\) vs. \(2(22)=44\).

Time = 0.03 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.86, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.030, Rules used = {2326} \[ \int e^{\frac {-2-x-x^2+\log (x)}{x}} \left (3+2 x-x^2-\log (x)\right ) \, dx=-\frac {e^{-\frac {x^2+x+2}{x}} x^{\frac {1}{x}} \left (-x^2-\log (x)+3\right )}{\frac {2 x-\frac {1}{x}+1}{x}-\frac {x^2+x-\log (x)+2}{x^2}} \]

[In]

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

[Out]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

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

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.68 \[ \int e^{\frac {-2-x-x^2+\log (x)}{x}} \left (3+2 x-x^2-\log (x)\right ) \, dx=x^{2} e^{\frac {- x^{2} - x + \log {\left (x \right )} - 2}{x}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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