3.86.46 \(\int \frac {e^{-2/x} (-12 x+e^{\frac {2}{x}+x} (e^2 (2-x)+4 x^3))}{2 x^3} \, dx\)

Optimal. Leaf size=31 \[ -4-3 e^{-2/x}+\frac {2 e^x \left (-\frac {e^2}{4 x}+x\right )}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.37, antiderivative size = 27, normalized size of antiderivative = 0.87, number of steps used = 12, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {12, 6742, 2209, 2199, 2194, 2177, 2178} \begin {gather*} -\frac {e^{x+2}}{2 x^2}-3 e^{-2/x}+2 e^x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

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

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 2209

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

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \frac {e^{-2/x} \left (-12 x+e^{\frac {2}{x}+x} \left (e^2 (2-x)+4 x^3\right )\right )}{x^3} \, dx\\ &=\frac {1}{2} \int \left (-\frac {12 e^{-2/x}}{x^2}+\frac {e^x \left (2 e^2-e^2 x+4 x^3\right )}{x^3}\right ) \, dx\\ &=\frac {1}{2} \int \frac {e^x \left (2 e^2-e^2 x+4 x^3\right )}{x^3} \, dx-6 \int \frac {e^{-2/x}}{x^2} \, dx\\ &=-3 e^{-2/x}+\frac {1}{2} \int \left (4 e^x+\frac {2 e^{2+x}}{x^3}-\frac {e^{2+x}}{x^2}\right ) \, dx\\ &=-3 e^{-2/x}-\frac {1}{2} \int \frac {e^{2+x}}{x^2} \, dx+2 \int e^x \, dx+\int \frac {e^{2+x}}{x^3} \, dx\\ &=-3 e^{-2/x}+2 e^x-\frac {e^{2+x}}{2 x^2}+\frac {e^{2+x}}{2 x}+\frac {1}{2} \int \frac {e^{2+x}}{x^2} \, dx-\frac {1}{2} \int \frac {e^{2+x}}{x} \, dx\\ &=-3 e^{-2/x}+2 e^x-\frac {e^{2+x}}{2 x^2}-\frac {e^2 \text {Ei}(x)}{2}+\frac {1}{2} \int \frac {e^{2+x}}{x} \, dx\\ &=-3 e^{-2/x}+2 e^x-\frac {e^{2+x}}{2 x^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 27, normalized size = 0.87 \begin {gather*} -3 e^{-2/x}+2 e^x-\frac {e^{2+x}}{2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 45, normalized size = 1.45 \begin {gather*} -\frac {6 \, x^{2} e^{\left (-\frac {2}{x}\right )} - {\left (4 \, x^{2} - e^{2}\right )} e^{\left (\frac {x^{2} + 2}{x} - \frac {2}{x}\right )}}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 28, normalized size = 0.90 \begin {gather*} \frac {4 \, x^{2} e^{x} - e^{\left (x + 2\right )}}{2 \, x^{2}} - 3 \, e^{\left (-\frac {2}{x}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 25, normalized size = 0.81




method result size



risch \(-\frac {\left (-4 x^{2}+{\mathrm e}^{2}\right ) {\mathrm e}^{x}}{2 x^{2}}-3 \,{\mathrm e}^{-\frac {2}{x}}\) \(25\)
norman \(\frac {\left (-3 x^{2}-\frac {{\mathrm e}^{2} {\mathrm e}^{x} {\mathrm e}^{\frac {2}{x}}}{2}+2 \,{\mathrm e}^{x} x^{2} {\mathrm e}^{\frac {2}{x}}\right ) {\mathrm e}^{-\frac {2}{x}}}{x^{2}}\) \(44\)
default \(-3 \,{\mathrm e}^{-\frac {2}{x}}+{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{x}}{2 x^{2}}-\frac {{\mathrm e}^{x}}{2 x}-\frac {\expIntegralEi \left (1, -x \right )}{2}\right )-\frac {{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{x}}{x}-\expIntegralEi \left (1, -x \right )\right )}{2}+2 \,{\mathrm e}^{x}\) \(58\)
meijerg \({\mathrm e}^{2} \left (-\frac {1}{2 x^{2}}-\frac {1}{x}-\frac {3}{4}+\frac {\ln \relax (x )}{2}+\frac {i \pi }{2}+\frac {9 x^{2}+12 x +6}{12 x^{2}}-\frac {\left (3 x +3\right ) {\mathrm e}^{x}}{6 x^{2}}-\frac {\ln \left (-x \right )}{2}-\frac {\expIntegralEi \left (1, -x \right )}{2}\right )+\frac {{\mathrm e}^{2} \left (\frac {1}{x}+1-\ln \relax (x )-i \pi -\frac {2 x +2}{2 x}+\frac {{\mathrm e}^{x}}{x}+\ln \left (-x \right )+\expIntegralEi \left (1, -x \right )\right )}{2}+2 \,{\mathrm e}^{x}+1-3 \,{\mathrm e}^{-\frac {2}{x}}\) \(120\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.39, size = 31, normalized size = 1.00 \begin {gather*} -\frac {1}{2} \, e^{2} \Gamma \left (-1, -x\right ) - e^{2} \Gamma \left (-2, -x\right ) + 2 \, e^{x} - 3 \, e^{\left (-\frac {2}{x}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*e^2*gamma(-1, -x) - e^2*gamma(-2, -x) + 2*e^x - 3*e^(-2/x)

________________________________________________________________________________________

mupad [B]  time = 5.36, size = 22, normalized size = 0.71 \begin {gather*} 2\,{\mathrm {e}}^x-3\,{\mathrm {e}}^{-\frac {2}{x}}-\frac {{\mathrm {e}}^2\,{\mathrm {e}}^x}{2\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 47.12, size = 22, normalized size = 0.71 \begin {gather*} 2 e^{x} - 3 e^{- \frac {2}{x}} - \frac {e^{2} e^{x}}{2 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________