\(\int \frac {e^{\frac {1}{2} (12-7 x-x^2-2 \log (x))} (-108 e^{\frac {1}{2} (-12+7 x+x^2+2 \log (x))}-4 x-14 x^2-4 x^3)}{9 x^2} \, dx\) [8615]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 61, antiderivative size = 26 \[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\frac {4 \left (3+\frac {1}{9} e^{6-x-\frac {1}{2} x (5+x)}\right )}{x} \]

[Out]

4*(3+1/9*x/exp(ln(x)-6+1/2*(5+x)*x+x))/x

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.73, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.082, Rules used = {12, 2306, 6820, 14, 2326} \[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\frac {4 e^{-\frac {x^2}{2}-\frac {7 x}{2}+6} \left (2 x^2+7 x\right )}{9 x^2 (2 x+7)}+\frac {12}{x} \]

[In]

Int[(E^((12 - 7*x - x^2 - 2*Log[x])/2)*(-108*E^((-12 + 7*x + x^2 + 2*Log[x])/2) - 4*x - 14*x^2 - 4*x^3))/(9*x^
2),x]

[Out]

12/x + (4*E^(6 - (7*x)/2 - x^2/2)*(7*x + 2*x^2))/(9*x^2*(7 + 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 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2306

Int[(u_.)*(F_)^((a_.)*(Log[z_]*(b_.) + (v_.))), x_Symbol] :> Int[u*F^(a*v)*z^(a*b*Log[F]), x] /; FreeQ[{F, a,
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}& = \frac {1}{9} \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{x^2} \, dx \\ & = \frac {1}{9} \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{x^3} \, dx \\ & = \frac {1}{9} \int \frac {2 \left (-54-e^{6-\frac {1}{2} x (7+x)} \left (2+7 x+2 x^2\right )\right )}{x^2} \, dx \\ & = \frac {2}{9} \int \frac {-54-e^{6-\frac {1}{2} x (7+x)} \left (2+7 x+2 x^2\right )}{x^2} \, dx \\ & = \frac {2}{9} \int \left (-\frac {54}{x^2}+\frac {e^{6-\frac {7 x}{2}-\frac {x^2}{2}} \left (-2-7 x-2 x^2\right )}{x^2}\right ) \, dx \\ & = \frac {12}{x}+\frac {2}{9} \int \frac {e^{6-\frac {7 x}{2}-\frac {x^2}{2}} \left (-2-7 x-2 x^2\right )}{x^2} \, dx \\ & = \frac {12}{x}+\frac {4 e^{6-\frac {7 x}{2}-\frac {x^2}{2}} \left (7 x+2 x^2\right )}{9 x^2 (7+2 x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.81 \[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\frac {4 \left (27+e^{6-\frac {1}{2} x (7+x)}\right )}{9 x} \]

[In]

Integrate[(E^((12 - 7*x - x^2 - 2*Log[x])/2)*(-108*E^((-12 + 7*x + x^2 + 2*Log[x])/2) - 4*x - 14*x^2 - 4*x^3))
/(9*x^2),x]

[Out]

(4*(27 + E^(6 - (x*(7 + x))/2)))/(9*x)

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88

method result size
risch \(\frac {12}{x}+\frac {4 \,{\mathrm e}^{-\frac {1}{2} x^{2}-\frac {7}{2} x +6}}{9 x}\) \(23\)
default \(\frac {12}{x}+\frac {4 \,{\mathrm e}^{-\frac {1}{2} x^{2}-\frac {7}{2} x +6}}{9 x}\) \(24\)
parts \(\frac {12}{x}+\frac {4 \,{\mathrm e}^{-\frac {1}{2} x^{2}-\frac {7}{2} x +6}}{9 x}\) \(24\)
norman \(\frac {\left (\frac {4 x}{9}+12 \,{\mathrm e}^{\ln \left (x \right )+\frac {x^{2}}{2}+\frac {7 x}{2}-6}\right ) {\mathrm e}^{-\frac {1}{2} x^{2}-\frac {7}{2} x +6}}{x^{2}}\) \(39\)
parallelrisch \(\frac {\left (4 x +108 \,{\mathrm e}^{\ln \left (x \right )+\frac {x^{2}}{2}+\frac {7 x}{2}-6}\right ) {\mathrm e}^{-\frac {1}{2} x^{2}-\frac {7}{2} x +6}}{9 x^{2}}\) \(40\)

[In]

int(1/9*(-108*exp(ln(x)+1/2*x^2+7/2*x-6)-4*x^3-14*x^2-4*x)/x^2/exp(ln(x)+1/2*x^2+7/2*x-6),x,method=_RETURNVERB
OSE)

[Out]

12/x+4/9/x*exp(-1/2*x^2-7/2*x+6)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.42 \[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\frac {4 \, {\left (x + 27 \, e^{\left (\frac {1}{2} \, x^{2} + \frac {7}{2} \, x + \log \left (x\right ) - 6\right )}\right )} e^{\left (-\frac {1}{2} \, x^{2} - \frac {7}{2} \, x - \log \left (x\right ) + 6\right )}}{9 \, x} \]

[In]

integrate(1/9*(-108*exp(log(x)+1/2*x^2+7/2*x-6)-4*x^3-14*x^2-4*x)/x^2/exp(log(x)+1/2*x^2+7/2*x-6),x, algorithm
="fricas")

[Out]

4/9*(x + 27*e^(1/2*x^2 + 7/2*x + log(x) - 6))*e^(-1/2*x^2 - 7/2*x - log(x) + 6)/x

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\frac {4 e^{- \frac {x^{2}}{2} - \frac {7 x}{2} + 6}}{9 x} + \frac {12}{x} \]

[In]

integrate(1/9*(-108*exp(ln(x)+1/2*x**2+7/2*x-6)-4*x**3-14*x**2-4*x)/x**2/exp(ln(x)+1/2*x**2+7/2*x-6),x)

[Out]

4*exp(-x**2/2 - 7*x/2 + 6)/(9*x) + 12/x

Maxima [F]

\[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\int { -\frac {2 \, {\left (2 \, x^{3} + 7 \, x^{2} + 2 \, x + 54 \, e^{\left (\frac {1}{2} \, x^{2} + \frac {7}{2} \, x + \log \left (x\right ) - 6\right )}\right )} e^{\left (-\frac {1}{2} \, x^{2} - \frac {7}{2} \, x - \log \left (x\right ) + 6\right )}}{9 \, x^{2}} \,d x } \]

[In]

integrate(1/9*(-108*exp(log(x)+1/2*x^2+7/2*x-6)-4*x^3-14*x^2-4*x)/x^2/exp(log(x)+1/2*x^2+7/2*x-6),x, algorithm
="maxima")

[Out]

-2/9*sqrt(2)*sqrt(pi)*erf(1/2*sqrt(2)*x + 7/4*sqrt(2))*e^(97/8) + 12/x - 2/9*integrate((7*x*e^6 + 2*e^6)*e^(-1
/2*x^2 - 7/2*x)/x^2, x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.69 \[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\frac {4 \, {\left (e^{\left (-\frac {1}{2} \, x^{2} - \frac {7}{2} \, x + 6\right )} + 27\right )}}{9 \, x} \]

[In]

integrate(1/9*(-108*exp(log(x)+1/2*x^2+7/2*x-6)-4*x^3-14*x^2-4*x)/x^2/exp(log(x)+1/2*x^2+7/2*x-6),x, algorithm
="giac")

[Out]

4/9*(e^(-1/2*x^2 - 7/2*x + 6) + 27)/x

Mupad [B] (verification not implemented)

Time = 13.71 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.69 \[ \int \frac {e^{\frac {1}{2} \left (12-7 x-x^2-2 \log (x)\right )} \left (-108 e^{\frac {1}{2} \left (-12+7 x+x^2+2 \log (x)\right )}-4 x-14 x^2-4 x^3\right )}{9 x^2} \, dx=\frac {4\,\left ({\mathrm {e}}^{-\frac {x^2}{2}-\frac {7\,x}{2}+6}+27\right )}{9\,x} \]

[In]

int(-(exp(6 - log(x) - x^2/2 - (7*x)/2)*((4*x)/9 + 12*exp((7*x)/2 + log(x) + x^2/2 - 6) + (14*x^2)/9 + (4*x^3)
/9))/x^2,x)

[Out]

(4*(exp(6 - x^2/2 - (7*x)/2) + 27))/(9*x)