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

Optimal. Leaf size=22 \[ -8+5 e^6+\frac {5}{x}-\frac {e^{-5+x}}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 16, normalized size of antiderivative = 0.73, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14, 2197} \begin {gather*} \frac {5}{x}-\frac {e^{x-5}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

5/x - E^(-5 + x)/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 2197

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[(g*u^(m + 1)*F^(c*v))/(b*c
*e*Log[F]), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 12, normalized size = 0.55 \begin {gather*} -\frac {-5+e^{-5+x}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-((-5 + E^(-5 + x))/x)

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 17, normalized size = 0.77 \begin {gather*} -\frac {x e^{\left (x - \log \relax (x) - 5\right )} - 5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x*e^(x - log(x) - 5) - 5)/x

________________________________________________________________________________________

giac [A]  time = 0.12, size = 15, normalized size = 0.68 \begin {gather*} \frac {{\left (5 \, e^{5} - e^{x}\right )} e^{\left (-5\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(5*e^5 - e^x)*e^(-5)/x

________________________________________________________________________________________

maple [A]  time = 0.03, size = 16, normalized size = 0.73




method result size



default \(\frac {5}{x}-\frac {{\mathrm e}^{x -5}}{x}\) \(16\)
risch \(\frac {5}{x}-\frac {{\mathrm e}^{x -5}}{x}\) \(16\)
norman \(\frac {5-{\mathrm e}^{-\ln \relax (x )+x -5} x}{x}\) \(18\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/x-1/x*exp(x-5)

________________________________________________________________________________________

maxima [C]  time = 0.38, size = 20, normalized size = 0.91 \begin {gather*} -{\rm Ei}\relax (x) e^{\left (-5\right )} + e^{\left (-5\right )} \Gamma \left (-1, -x\right ) + \frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.24, size = 11, normalized size = 0.50 \begin {gather*} -\frac {{\mathrm {e}}^{x-5}-5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(exp(x - 5) - 5)/x

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 8, normalized size = 0.36 \begin {gather*} - \frac {e^{x - 5}}{x} + \frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-exp(x - 5)/x + 5/x

________________________________________________________________________________________