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

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

________________________________________________________________________________________

Rubi [A]  time = 0.84, antiderivative size = 21, normalized size of antiderivative = 0.84, number of steps used = 8, number of rules used = 7, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.180, Rules used = {6741, 6688, 6742, 2282, 36, 29, 31} \begin {gather*} -x-\log (x+1)+\log \left (e^x \log (5)+e^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2282

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 6688

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

Rule 6741

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

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 21, normalized size = 0.84 \begin {gather*} -x-\log (1+x)+\log \left (e^2+e^x \log (5)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 17, normalized size = 0.68 \begin {gather*} -\log \left (x + 1\right ) + \log \left (e^{\left (-x + 2\right )} + \log \relax (5)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x + 1) + log(e^(-x + 2) + log(5))

________________________________________________________________________________________

giac [A]  time = 0.29, size = 21, normalized size = 0.84 \begin {gather*} -\log \left (x + 1\right ) + \log \left (-e^{\left (-x + 2\right )} - \log \relax (5)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x + 1) + log(-e^(-x + 2) - log(5))

________________________________________________________________________________________

maple [A]  time = 0.13, size = 18, normalized size = 0.72




method result size



norman \(-\ln \left (x +1\right )+\ln \left ({\mathrm e}^{2-x}+\ln \relax (5)\right )\) \(18\)
risch \(-\ln \left (x +1\right )-2+\ln \left ({\mathrm e}^{2-x}+\ln \relax (5)\right )\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(x+1)+ln(exp(2-x)+ln(5))

________________________________________________________________________________________

maxima [A]  time = 0.82, size = 24, normalized size = 0.96 \begin {gather*} -x - \log \left (x + 1\right ) + \log \left (\frac {e^{x} \log \relax (5) + e^{2}}{\log \relax (5)}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 18, normalized size = 0.72 \begin {gather*} \ln \left (\ln \relax (5)+{\mathrm {e}}^{-x}\,{\mathrm {e}}^2\right )-\ln \left (x+1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 14, normalized size = 0.56 \begin {gather*} - \log {\left (x + 1 \right )} + \log {\left (e^{2 - x} + \log {\relax (5 )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x + 1) + log(exp(2 - x) + log(5))

________________________________________________________________________________________