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

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

________________________________________________________________________________________

Rubi [A]  time = 0.67, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {6741, 6742, 2282, 36, 29, 31, 893} \begin {gather*} \log \left (e^{x+3}+1\right )-\log (2-x)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 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 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 {2 x-e^{3+x} x \left (-2-2 x+x^2\right )}{\left (1+e^{3+x}\right ) (2-x) x^2} \, dx\\ &=\int \left (-\frac {1}{1+e^{3+x}}+\frac {-2-2 x+x^2}{(-2+x) x}\right ) \, dx\\ &=-\int \frac {1}{1+e^{3+x}} \, dx+\int \frac {-2-2 x+x^2}{(-2+x) x} \, dx\\ &=\int \left (1+\frac {1}{2-x}+\frac {1}{x}\right ) \, dx-\operatorname {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,e^{3+x}\right )\\ &=x-\log (2-x)+\log (x)-\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^{3+x}\right )+\operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,e^{3+x}\right )\\ &=\log \left (1+e^{3+x}\right )-\log (2-x)+\log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 16, normalized size = 0.84 \begin {gather*} \log \left (x + e^{\left (x + \log \relax (x) + 3\right )}\right ) - \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + e^(x + log(x) + 3)) - log(x - 2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.15, size = 17, normalized size = 0.89




method result size



norman \(-\ln \left (x -2\right )+\ln \left ({\mathrm e}^{3+x +\ln \relax (x )}+x \right )\) \(17\)
risch \(-\ln \left (x -2\right )-3+\ln \left ({\mathrm e}^{3+x} x +x \right )\) \(18\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(x-2)+ln(exp(3+x+ln(x))+x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.23, size = 16, normalized size = 0.84 \begin {gather*} \ln \left (x+x\,{\mathrm {e}}^3\,{\mathrm {e}}^x\right )-\ln \left (x-2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________