3.92.64 \(\int \frac {-10+e^x (5-3 x)+x}{-4 x+2 e^x x} \, dx\) [9164]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.33, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {6873, 12, 6874, 2320, 36, 31, 29, 45} \begin {gather*} -\frac {x}{4}-\frac {5}{4} \log \left (2-e^x\right )+\frac {5 \log (x)}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/4*x - (5*Log[2 - E^x])/4 + (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 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 6873

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

Rule 6874

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 22, normalized size = 0.92 \begin {gather*} \frac {1}{2} \left (-3 x-5 \tanh ^{-1}\left (1-e^x\right )+5 \log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-3*x - 5*ArcTanh[1 - E^x] + 5*Log[x])/2

________________________________________________________________________________________

Maple [A]
time = 4.94, size = 16, normalized size = 0.67

method result size
norman \(-\frac {x}{4}+\frac {5 \ln \left (x \right )}{2}-\frac {5 \ln \left ({\mathrm e}^{x}-2\right )}{4}\) \(16\)
risch \(-\frac {x}{4}+\frac {5 \ln \left (x \right )}{2}-\frac {5 \ln \left ({\mathrm e}^{x}-2\right )}{4}\) \(16\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 15, normalized size = 0.62 \begin {gather*} -\frac {1}{4} \, x + \frac {5}{2} \, \log \left (x\right ) - \frac {5}{4} \, \log \left (e^{x} - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 15, normalized size = 0.62 \begin {gather*} -\frac {1}{4} \, x + \frac {5}{2} \, \log \left (x\right ) - \frac {5}{4} \, \log \left (e^{x} - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 19, normalized size = 0.79 \begin {gather*} - \frac {x}{4} + \frac {5 \log {\left (x \right )}}{2} - \frac {5 \log {\left (e^{x} - 2 \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 15, normalized size = 0.62 \begin {gather*} -\frac {1}{4} \, x + \frac {5}{2} \, \log \left (x\right ) - \frac {5}{4} \, \log \left (e^{x} - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.10, size = 15, normalized size = 0.62 \begin {gather*} \frac {5\,\ln \left (x\right )}{2}-\frac {5\,\ln \left ({\mathrm {e}}^x-2\right )}{4}-\frac {x}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________