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

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

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(47\) vs. \(2(21)=42\).

Time = 0.19 (sec) , antiderivative size = 47, normalized size of antiderivative = 2.24, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.064, Rules used = {6820, 12, 2326} \[ \int \frac {e^{\frac {-3-4 x^2-x^3+2 x \log (x)-x \log (2 x)}{x}} \left (3+x-4 x^2-2 x^3\right )}{x^2} \, dx=-\frac {e^{-x^2-4 x-\frac {3}{x}} \left (-2 x^3-4 x^2+3\right )}{2 x \left (-\frac {3}{x^2}+2 x+4\right )} \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

x/(2*E^((3 + 4*x^2 + x^3)/x))

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95

method result size
risch \(\frac {x \,{\mathrm e}^{-\frac {x^{3}+4 x^{2}+3}{x}}}{2}\) \(20\)
gosper \({\mathrm e}^{\frac {-x \ln \left (2 x \right )+2 x \ln \left (x \right )-x^{3}-4 x^{2}-3}{x}}\) \(30\)
parallelrisch \({\mathrm e}^{\frac {-x \ln \left (2 x \right )+2 x \ln \left (x \right )-x^{3}-4 x^{2}-3}{x}}\) \(30\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

1/2*x*e^(-x^2 - 4*x - 3/x)

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.32 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {e^{\frac {-3-4 x^2-x^3+2 x \log (x)-x \log (2 x)}{x}} \left (3+x-4 x^2-2 x^3\right )}{x^2} \, dx=\frac {x\,{\mathrm {e}}^{-4\,x}\,{\mathrm {e}}^{-x^2}\,{\mathrm {e}}^{-\frac {3}{x}}}{2} \]

[In]

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

[Out]

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