3.71.37 \(\int \frac {e^{\frac {2-x}{x}} (16-8 x)+e^{\frac {2 (2-x)}{x}} (-4+x)+29 x+10 x^2+3 x^3}{x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 35, normalized size of antiderivative = 1.21, number of steps used = 4, number of rules used = 2, integrand size = 51, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.039, Rules used = {14, 2288} \begin {gather*} x^3+5 x^2-8 e^{\frac {2}{x}-1} x+e^{\frac {4}{x}-2} x+29 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^((2 - x)/x)*(16 - 8*x) + E^((2*(2 - x))/x)*(-4 + x) + 29*x + 10*x^2 + 3*x^3)/x,x]

[Out]

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

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 2288

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 {gather*} \begin {aligned} \text {integral} &=\int \left (29+\frac {e^{-2+\frac {4}{x}} (-4+x)}{x}-\frac {8 e^{-1+\frac {2}{x}} (-2+x)}{x}+10 x+3 x^2\right ) \, dx\\ &=29 x+5 x^2+x^3-8 \int \frac {e^{-1+\frac {2}{x}} (-2+x)}{x} \, dx+\int \frac {e^{-2+\frac {4}{x}} (-4+x)}{x} \, dx\\ &=29 x-8 e^{-1+\frac {2}{x}} x+e^{-2+\frac {4}{x}} x+5 x^2+x^3\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 35, normalized size = 1.21 \begin {gather*} 29 x-8 e^{-1+\frac {2}{x}} x+e^{-2+\frac {4}{x}} x+5 x^2+x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^((2 - x)/x)*(16 - 8*x) + E^((2*(2 - x))/x)*(-4 + x) + 29*x + 10*x^2 + 3*x^3)/x,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 35, normalized size = 1.21 \begin {gather*} x^{3} + 5 \, x^{2} - 8 \, x e^{\left (-\frac {x - 2}{x}\right )} + x e^{\left (-\frac {2 \, {\left (x - 2\right )}}{x}\right )} + 29 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-4)*exp((2-x)/x)^2+(-8*x+16)*exp((2-x)/x)+3*x^3+10*x^2+29*x)/x,x, algorithm="fricas")

[Out]

x^3 + 5*x^2 - 8*x*e^(-(x - 2)/x) + x*e^(-2*(x - 2)/x) + 29*x

________________________________________________________________________________________

giac [A]  time = 0.19, size = 48, normalized size = 1.66 \begin {gather*} x^{3} {\left (\frac {5 \, e^{3}}{x} + \frac {29 \, e^{3}}{x^{2}} + \frac {e^{\left (\frac {4}{x} + 1\right )}}{x^{2}} - \frac {8 \, e^{\left (\frac {2}{x} + 2\right )}}{x^{2}} + e^{3}\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-4)*exp((2-x)/x)^2+(-8*x+16)*exp((2-x)/x)+3*x^3+10*x^2+29*x)/x,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.08, size = 36, normalized size = 1.24




method result size



derivativedivides \(x \,{\mathrm e}^{\frac {4}{x}-2}+x^{3}+5 x^{2}+29 x -8 x \,{\mathrm e}^{\frac {2}{x}-1}\) \(36\)
default \(x \,{\mathrm e}^{\frac {4}{x}-2}+x^{3}+5 x^{2}+29 x -8 x \,{\mathrm e}^{\frac {2}{x}-1}\) \(36\)
risch \(x^{3}+x \,{\mathrm e}^{-\frac {2 \left (x -2\right )}{x}}+29 x +5 x^{2}-8 \,{\mathrm e}^{-\frac {x -2}{x}} x\) \(36\)
norman \(x^{3}+x \,{\mathrm e}^{\frac {4-2 x}{x}}+29 x +5 x^{2}-8 x \,{\mathrm e}^{\frac {2-x}{x}}\) \(40\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x-4)*exp((2-x)/x)^2+(-8*x+16)*exp((2-x)/x)+3*x^3+10*x^2+29*x)/x,x,method=_RETURNVERBOSE)

[Out]

x*exp(2/x-1)^2+x^3+5*x^2+29*x-8*x*exp(2/x-1)

________________________________________________________________________________________

maxima [C]  time = 0.42, size = 54, normalized size = 1.86 \begin {gather*} x^{3} + 5 \, x^{2} - 16 \, {\rm Ei}\left (\frac {2}{x}\right ) e^{\left (-1\right )} + 4 \, {\rm Ei}\left (\frac {4}{x}\right ) e^{\left (-2\right )} + 16 \, e^{\left (-1\right )} \Gamma \left (-1, -\frac {2}{x}\right ) - 4 \, e^{\left (-2\right )} \Gamma \left (-1, -\frac {4}{x}\right ) + 29 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-4)*exp((2-x)/x)^2+(-8*x+16)*exp((2-x)/x)+3*x^3+10*x^2+29*x)/x,x, algorithm="maxima")

[Out]

x^3 + 5*x^2 - 16*Ei(2/x)*e^(-1) + 4*Ei(4/x)*e^(-2) + 16*e^(-1)*gamma(-1, -2/x) - 4*e^(-2)*gamma(-1, -4/x) + 29
*x

________________________________________________________________________________________

mupad [B]  time = 4.15, size = 33, normalized size = 1.14 \begin {gather*} 29\,x+5\,x^2+x^3-8\,x\,{\mathrm {e}}^{-1}\,{\mathrm {e}}^{2/x}+x\,{\mathrm {e}}^{-2}\,{\mathrm {e}}^{4/x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((29*x - exp(-(x - 2)/x)*(8*x - 16) + exp(-(2*(x - 2))/x)*(x - 4) + 10*x^2 + 3*x^3)/x,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 31, normalized size = 1.07 \begin {gather*} x^{3} + 5 x^{2} + x e^{\frac {2 \left (2 - x\right )}{x}} - 8 x e^{\frac {2 - x}{x}} + 29 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-4)*exp((2-x)/x)**2+(-8*x+16)*exp((2-x)/x)+3*x**3+10*x**2+29*x)/x,x)

[Out]

x**3 + 5*x**2 + x*exp(2*(2 - x)/x) - 8*x*exp((2 - x)/x) + 29*x

________________________________________________________________________________________