3.42.28 \(\int \frac {-5+e^x (-3+x)+2 x}{-6+e^2 (3-x)+e^x (-3+x)-4 x+2 x^2+(-3+x) \log (3-x)} \, dx\)

Optimal. Leaf size=22 \[ \log \left (-2+e^2-e^x-2 x-\log (3-x)\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 20, normalized size of antiderivative = 0.91, number of steps used = 2, number of rules used = 2, integrand size = 51, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.039, Rules used = {6741, 6684} \begin {gather*} \log \left (2 x+e^x+\log (3-x)-e^2+2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6684

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rule 6741

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 18, normalized size = 0.82 \begin {gather*} \log \left (2 \, x - e^{2} + e^{x} + \log \left (-x + 3\right ) + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.13, size = 19, normalized size = 0.86




method result size



risch \(\ln \left (2 x -{\mathrm e}^{2}+{\mathrm e}^{x}+\ln \left (3-x \right )+2\right )\) \(19\)
norman \(\ln \left ({\mathrm e}^{2}-2 x -\ln \left (3-x \right )-{\mathrm e}^{x}-2\right )\) \(21\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 18, normalized size = 0.82 \begin {gather*} \log \left (2 \, x - e^{2} + e^{x} + \log \left (-x + 3\right ) + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 17, normalized size = 0.77 \begin {gather*} \log {\left (2 x + e^{x} + \log {\left (3 - x \right )} - e^{2} + 2 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________