3.99.71 \(\int \frac {e^{-x} (-5 x+e^x (e^{4/x} (4-x)+e^4 x-2 x^2))}{5 x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 33, normalized size of antiderivative = 1.18, number of steps used = 5, number of rules used = 4, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {12, 6688, 2194, 2288} \begin {gather*} -\frac {x^2}{5}-\frac {1}{5} e^{4/x} x+\frac {e^4 x}{5}+e^{-x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(-x) + (E^4*x)/5 - (E^(4/x)*x)/5 - x^2/5

Rule 12

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

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 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]

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 32, normalized size = 1.14 \begin {gather*} \frac {1}{5} \left (5 e^{-x}+e^4 x-e^{4/x} x-x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(5/E^x + E^4*x - E^(4/x)*x - x^2)/5

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 28, normalized size = 1.00 \begin {gather*} -\frac {1}{5} \, {\left ({\left (x^{2} - x e^{4} + x e^{\frac {4}{x}}\right )} e^{x} - 5\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 24, normalized size = 0.86 \begin {gather*} -\frac {1}{5} \, x^{2} + \frac {1}{5} \, x e^{4} - \frac {1}{5} \, x e^{\frac {4}{x}} + e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 25, normalized size = 0.89




method result size



default \(\frac {x \,{\mathrm e}^{4}}{5}-\frac {x^{2}}{5}+{\mathrm e}^{-x}-\frac {x \,{\mathrm e}^{\frac {4}{x}}}{5}\) \(25\)
risch \(\frac {x \,{\mathrm e}^{4}}{5}-\frac {x^{2}}{5}+{\mathrm e}^{-x}-\frac {x \,{\mathrm e}^{\frac {4}{x}}}{5}\) \(25\)
norman \(\left (1-\frac {{\mathrm e}^{x} x^{2}}{5}+\frac {x \,{\mathrm e}^{4} {\mathrm e}^{x}}{5}-\frac {{\mathrm e}^{x} {\mathrm e}^{\frac {4}{x}} x}{5}\right ) {\mathrm e}^{-x}\) \(33\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.39, size = 32, normalized size = 1.14 \begin {gather*} -\frac {1}{5} \, x^{2} + \frac {1}{5} \, x e^{4} - \frac {4}{5} \, {\rm Ei}\left (\frac {4}{x}\right ) + e^{\left (-x\right )} + \frac {4}{5} \, \Gamma \left (-1, -\frac {4}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.67, size = 24, normalized size = 0.86 \begin {gather*} {\mathrm {e}}^{-x}+\frac {x\,{\mathrm {e}}^4}{5}-\frac {x\,{\mathrm {e}}^{4/x}}{5}-\frac {x^2}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(-x) + (x*exp(4))/5 - (x*exp(4/x))/5 - x^2/5

________________________________________________________________________________________

sympy [A]  time = 0.34, size = 24, normalized size = 0.86 \begin {gather*} - \frac {x^{2}}{5} - \frac {x e^{\frac {4}{x}}}{5} + \frac {x e^{4}}{5} + e^{- x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**2/5 - x*exp(4/x)/5 + x*exp(4)/5 + exp(-x)

________________________________________________________________________________________