\(\int \frac {e^{-2/x} (x+x^2+e^{\frac {1}{x}} (6+6 x))}{18 x} \, dx\) [8170]

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

Optimal result

Integrand size = 30, antiderivative size = 16 \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=\left (1+\frac {1}{6} e^{-1/x} x\right )^2 \]

[Out]

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

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.69, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {12, 6873, 6874, 2237, 2241, 2245, 2326} \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=\frac {1}{36} e^{-2/x} x^2+\frac {1}{3} e^{-1/x} x \]

[In]

Int[(x + x^2 + E^x^(-1)*(6 + 6*x))/(18*E^(2/x)*x),x]

[Out]

x/(3*E^x^(-1)) + x^2/(36*E^(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 2237

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_)), x_Symbol] :> Simp[(c + d*x)*(F^(a + b*(c + d*x)^n)/d), x]
- Dist[b*n*Log[F], Int[(c + d*x)^n*F^(a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2/n]
 && ILtQ[n, 0]

Rule 2241

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> Simp[F^a*(ExpIntegralEi[
b*(c + d*x)^n*Log[F]]/(f*n)), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[d*e - c*f, 0]

Rule 2245

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*(F^(a + b*(c + d*x)^n)/(d*(m + 1))), x] - Dist[b*n*(Log[F]/(m + 1)), Int[(c + d*x)^(m + n)*F^(a + b*(c +
d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[-4, (m + 1)/n, 5] && IntegerQ[n
] && ((GtQ[n, 0] && LtQ[m, -1]) || (GtQ[-n, 0] && LeQ[-n, m + 1]))

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 6873

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \frac {1}{18} \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{x} \, dx \\ & = \frac {1}{18} \int \frac {e^{-2/x} (1+x) \left (6 e^{\frac {1}{x}}+x\right )}{x} \, dx \\ & = \frac {1}{18} \int \left (e^{-2/x}+e^{-2/x} x+\frac {6 e^{-1/x} (1+x)}{x}\right ) \, dx \\ & = \frac {1}{18} \int e^{-2/x} \, dx+\frac {1}{18} \int e^{-2/x} x \, dx+\frac {1}{3} \int \frac {e^{-1/x} (1+x)}{x} \, dx \\ & = \frac {1}{18} e^{-2/x} x+\frac {1}{3} e^{-1/x} x+\frac {1}{36} e^{-2/x} x^2-\frac {1}{18} \int e^{-2/x} \, dx-\frac {1}{9} \int \frac {e^{-2/x}}{x} \, dx \\ & = \frac {1}{3} e^{-1/x} x+\frac {1}{36} e^{-2/x} x^2+\frac {\operatorname {ExpIntegralEi}\left (-\frac {2}{x}\right )}{9}+\frac {1}{9} \int \frac {e^{-2/x}}{x} \, dx \\ & = \frac {1}{3} e^{-1/x} x+\frac {1}{36} e^{-2/x} x^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31 \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=\frac {1}{36} e^{-2/x} x \left (12 e^{\frac {1}{x}}+x\right ) \]

[In]

Integrate[(x + x^2 + E^x^(-1)*(6 + 6*x))/(18*E^(2/x)*x),x]

[Out]

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

Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31

method result size
norman \(\left (\frac {x^{2}}{36}+\frac {x \,{\mathrm e}^{\frac {1}{x}}}{3}\right ) {\mathrm e}^{-\frac {2}{x}}\) \(21\)
derivativedivides \(\frac {x^{2} {\mathrm e}^{-\frac {2}{x}}}{36}+\frac {x \,{\mathrm e}^{-\frac {1}{x}}}{3}\) \(22\)
default \(\frac {x^{2} {\mathrm e}^{-\frac {2}{x}}}{36}+\frac {x \,{\mathrm e}^{-\frac {1}{x}}}{3}\) \(22\)
risch \(\frac {x^{2} {\mathrm e}^{-\frac {2}{x}}}{36}+\frac {x \,{\mathrm e}^{-\frac {1}{x}}}{3}\) \(22\)
parts \(\frac {x^{2} {\mathrm e}^{-\frac {2}{x}}}{36}+\frac {x \,{\mathrm e}^{-\frac {1}{x}}}{3}\) \(22\)
parallelrisch \(\frac {\left (x^{3}+12 x^{2} {\mathrm e}^{\frac {1}{x}}\right ) {\mathrm e}^{-\frac {2}{x}}}{36 x}\) \(25\)
meijerg \(\frac {5 x}{18}+\frac {x^{2}}{36}-\frac {5}{18}+\frac {x^{2} \left (3-\frac {6}{x}\right ) {\mathrm e}^{-\frac {2}{x}}}{108}-\frac {x \left (2-\frac {2}{x}\right )}{6}+\frac {x \,{\mathrm e}^{-\frac {2}{x}}}{18}+\frac {x \,{\mathrm e}^{-\frac {1}{x}}}{3}-\frac {x \left (2-\frac {4}{x}\right )}{36}-\frac {x^{2} \left (\frac {36}{x^{2}}-\frac {24}{x}+6\right )}{216}\) \(84\)

[In]

int(1/18*((6+6*x)*exp(1/x)+x^2+x)/x/exp(1/x)^2,x,method=_RETURNVERBOSE)

[Out]

(1/36*x^2+1/3*x*exp(1/x))/exp(1/x)^2

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.19 \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=\frac {1}{36} \, {\left (x^{2} + 12 \, x e^{\frac {1}{x}}\right )} e^{\left (-\frac {2}{x}\right )} \]

[In]

integrate(1/18*((6+6*x)*exp(1/x)+x^2+x)/x/exp(1/x)^2,x, algorithm="fricas")

[Out]

1/36*(x^2 + 12*x*e^(1/x))*e^(-2/x)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06 \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=\frac {x^{2} e^{- \frac {2}{x}}}{36} + \frac {x e^{- \frac {1}{x}}}{3} \]

[In]

integrate(1/18*((6+6*x)*exp(1/x)+x**2+x)/x/exp(1/x)**2,x)

[Out]

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

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.23 (sec) , antiderivative size = 34, normalized size of antiderivative = 2.12 \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=-\frac {1}{3} \, {\rm Ei}\left (-\frac {1}{x}\right ) + \frac {1}{9} \, \Gamma \left (-1, \frac {2}{x}\right ) + \frac {1}{3} \, \Gamma \left (-1, \frac {1}{x}\right ) + \frac {2}{9} \, \Gamma \left (-2, \frac {2}{x}\right ) \]

[In]

integrate(1/18*((6+6*x)*exp(1/x)+x^2+x)/x/exp(1/x)^2,x, algorithm="maxima")

[Out]

-1/3*Ei(-1/x) + 1/9*gamma(-1, 2/x) + 1/3*gamma(-1, 1/x) + 2/9*gamma(-2, 2/x)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.44 \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=\frac {1}{36} \, x^{2} {\left (\frac {12 \, e^{\left (-\frac {1}{x}\right )}}{x} + e^{\left (-\frac {2}{x}\right )}\right )} \]

[In]

integrate(1/18*((6+6*x)*exp(1/x)+x^2+x)/x/exp(1/x)^2,x, algorithm="giac")

[Out]

1/36*x^2*(12*e^(-1/x)/x + e^(-2/x))

Mupad [B] (verification not implemented)

Time = 13.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31 \[ \int \frac {e^{-2/x} \left (x+x^2+e^{\frac {1}{x}} (6+6 x)\right )}{18 x} \, dx=\frac {x\,{\mathrm {e}}^{-\frac {1}{x}}}{3}+\frac {x^2\,{\mathrm {e}}^{-\frac {2}{x}}}{36} \]

[In]

int((exp(-2/x)*(x/18 + (exp(1/x)*(6*x + 6))/18 + x^2/18))/x,x)

[Out]

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