\(\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\) [4128]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 51, antiderivative size = 22 \[ \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=\log \left (-2+e^2-e^x-2 x-\log (3-x)\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.039, Rules used = {6873, 6816} \[ \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=\log \left (2 x+e^x+\log (3-x)-e^2+2\right ) \]

[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 6816

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

Rule 6873

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

Rubi steps \begin{align*} \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{align*}

Mathematica [A] (verified)

Time = 0.64 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \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=\log \left (2-e^2+e^x+2 x+\log (3-x)\right ) \]

[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]]

Maple [A] (verified)

Time = 1.32 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86

method result size
risch \(\ln \left (2 x -{\mathrm e}^{2}+{\mathrm e}^{x}+\ln \left (-x +3\right )+2\right )\) \(19\)
norman \(\ln \left ({\mathrm e}^{2}-2 x -\ln \left (-x +3\right )-{\mathrm e}^{x}-2\right )\) \(21\)
parallelrisch \(\ln \left (x -\frac {{\mathrm e}^{2}}{2}+\frac {{\mathrm e}^{x}}{2}+\frac {\ln \left (-x +3\right )}{2}+1\right )\) \(21\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \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=\log \left (2 \, x - e^{2} + e^{x} + \log \left (-x + 3\right ) + 2\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \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=\log {\left (2 x + e^{x} + \log {\left (3 - x \right )} - e^{2} + 2 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \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=\log \left (2 \, x - e^{2} + e^{x} + \log \left (-x + 3\right ) + 2\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \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=\log \left (2 \, x - e^{2} + e^{x} + \log \left (-x + 3\right ) + 2\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.51 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \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=\ln \left (2\,x-{\mathrm {e}}^2+\ln \left (3-x\right )+{\mathrm {e}}^x+2\right ) \]

[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)