\(\int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx\) [6887]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 16 \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=\log \left (\frac {4 e^4 x^2}{-5+e^x}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {6874, 2320, 36, 31, 29, 45} \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=2 \log (x)-\log \left (5-e^x\right ) \]

[In]

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

[Out]

-Log[5 - E^x] + 2*Log[x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {5}{-5+e^x}+\frac {2-x}{x}\right ) \, dx \\ & = -\left (5 \int \frac {1}{-5+e^x} \, dx\right )+\int \frac {2-x}{x} \, dx \\ & = -\left (5 \text {Subst}\left (\int \frac {1}{(-5+x) x} \, dx,x,e^x\right )\right )+\int \left (-1+\frac {2}{x}\right ) \, dx \\ & = -x+2 \log (x)-\text {Subst}\left (\int \frac {1}{-5+x} \, dx,x,e^x\right )+\text {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right ) \\ & = -\log \left (5-e^x\right )+2 \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=-x+\log \left (e^x\right )-\log \left (-5+e^x\right )+2 \log (x) \]

[In]

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

[Out]

-x + Log[E^x] - Log[-5 + E^x] + 2*Log[x]

Maple [A] (verified)

Time = 1.08 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.81

method result size
norman \(2 \ln \left (x \right )-\ln \left ({\mathrm e}^{x}-5\right )\) \(13\)
risch \(2 \ln \left (x \right )-\ln \left ({\mathrm e}^{x}-5\right )\) \(13\)
parallelrisch \(2 \ln \left (x \right )-\ln \left ({\mathrm e}^{x}-5\right )\) \(13\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=2 \, \log \left (x\right ) - \log \left (e^{x} - 5\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.62 \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=2 \log {\left (x \right )} - \log {\left (e^{x} - 5 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=2 \, \log \left (x\right ) - \log \left (e^{x} - 5\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=2 \, \log \left (x\right ) - \log \left (e^{x} - 5\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {-10+e^x (2-x)}{-5 x+e^x x} \, dx=2\,\ln \left (x\right )-\ln \left ({\mathrm {e}}^x-5\right ) \]

[In]

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

[Out]

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