3.98.81 \(\int \frac {-4+e^{3+x} (-4+2 x)}{x+e^{3+x} x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 15, normalized size of antiderivative = 1.07, number of steps used = 8, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {6742, 2282, 36, 29, 31, 43} \begin {gather*} 2 \log \left (e^{x+3}+1\right )-4 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 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 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 15, normalized size = 1.07 \begin {gather*} 2 \left (\log \left (1+e^{3+x}\right )-2 \log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 14, normalized size = 1.00 \begin {gather*} -4 \, \log \relax (x) + 2 \, \log \left (e^{\left (x + 3\right )} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 15, normalized size = 1.07




method result size



norman \(-4 \ln \relax (x )+2 \ln \left ({\mathrm e}^{3+x}+1\right )\) \(15\)
risch \(-4 \ln \relax (x )-6+2 \ln \left ({\mathrm e}^{3+x}+1\right )\) \(16\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*ln(x)+2*ln(exp(3+x)+1)

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 17, normalized size = 1.21 \begin {gather*} 2 \, \log \left ({\left (e^{\left (x + 3\right )} + 1\right )} e^{\left (-3\right )}\right ) - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 15, normalized size = 1.07 \begin {gather*} 2\,\ln \left ({\mathrm {e}}^3\,{\mathrm {e}}^x+1\right )-4\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*log(exp(3)*exp(x) + 1) - 4*log(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*log(x) + 2*log(exp(x + 3) + 1)

________________________________________________________________________________________