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

Optimal. Leaf size=21 \[ \frac {e^x+x \left (7+e^3-\frac {5 \log (x)}{2}\right )}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 14, normalized size of antiderivative = 0.67, number of steps used = 4, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {12, 14, 2197} \begin {gather*} \frac {e^x}{x}-\frac {5 \log (x)}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x/x - (5*Log[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 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} &=\frac {1}{2} \int \frac {-5 x+e^x (-2+2 x)}{x^2} \, dx\\ &=\frac {1}{2} \int \left (\frac {2 e^x (-1+x)}{x^2}-\frac {5}{x}\right ) \, dx\\ &=-\frac {5 \log (x)}{2}+\int \frac {e^x (-1+x)}{x^2} \, dx\\ &=\frac {e^x}{x}-\frac {5 \log (x)}{2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 17, normalized size = 0.81 \begin {gather*} \frac {1}{2} \left (\frac {2 e^x}{x}-5 \log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((2*E^x)/x - 5*Log[x])/2

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 15, normalized size = 0.71 \begin {gather*} -\frac {5 \, x \log \relax (x) - 2 \, e^{x}}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 15, normalized size = 0.71 \begin {gather*} -\frac {5 \, x \log \relax (x) - 2 \, e^{x}}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 12, normalized size = 0.57




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.40, size = 14, normalized size = 0.67 \begin {gather*} {\rm Ei}\relax (x) - \Gamma \left (-1, -x\right ) - \frac {5}{2} \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Ei(x) - gamma(-1, -x) - 5/2*log(x)

________________________________________________________________________________________

mupad [B]  time = 4.16, size = 11, normalized size = 0.52 \begin {gather*} \frac {{\mathrm {e}}^x}{x}-\frac {5\,\ln \relax (x)}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(x)/x - (5*log(x))/2

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 10, normalized size = 0.48 \begin {gather*} - \frac {5 \log {\relax (x )}}{2} + \frac {e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________