\(\int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} (8 x+4 x^2)}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx\) [9275]

   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 [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 77, antiderivative size = 24 \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\log \left (x \left (-x+e \left (-\frac {1}{2 e}+\left (e^x+x\right )^2\right )\right )\right ) \]

[Out]

ln((((exp(x)+x)^2-1/2/exp(1))/exp(-1)-x)*x)

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.42, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.013, Rules used = {6816} \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\log \left (-2 e x^3-4 e^{x+1} x^2+2 x^2-2 e^{2 x+1} x+x\right ) \]

[In]

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

[Out]

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

Rule 6816

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

Rubi steps \begin{align*} \text {integral}& = \log \left (x-2 e^{1+2 x} x+2 x^2-4 e^{1+x} x^2-2 e x^3\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 2.50 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.33 \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\log (x)+\log \left (1-2 e^{1+2 x}+2 x-4 e^{1+x} x-2 e x^2\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.23 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12

method result size
risch \(\ln \left (x \right )+\ln \left ({\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x +x^{2}-{\mathrm e}^{-1} x -\frac {{\mathrm e}^{-1}}{2}\right )\) \(27\)
norman \(\ln \left (x \right )+\ln \left (2 \,{\mathrm e} \,{\mathrm e}^{2 x}+4 x \,{\mathrm e} \,{\mathrm e}^{x}+2 x^{2} {\mathrm e}-2 x -1\right )\) \(32\)
parallelrisch \(\ln \left (x \right )+\ln \left (\frac {\left (2 \,{\mathrm e} \,{\mathrm e}^{2 x}+4 x \,{\mathrm e} \,{\mathrm e}^{x}+2 x^{2} {\mathrm e}-2 x -1\right ) {\mathrm e}^{-1}}{2}\right )\) \(38\)

[In]

int(((4*x+2)*exp(1)*exp(x)^2+(4*x^2+8*x)*exp(1)*exp(x)+6*x^2*exp(1)-4*x-1)/(2*x*exp(1)*exp(x)^2+4*x^2*exp(1)*e
xp(x)+2*x^3*exp(1)-2*x^2-x),x,method=_RETURNVERBOSE)

[Out]

ln(x)+ln(exp(2*x)+2*exp(x)*x+x^2-exp(-1)*x-1/2*exp(-1))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.50 \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\log \left (2 \, x^{2} e^{2} - {\left (2 \, x + 1\right )} e + 4 \, x e^{\left (x + 2\right )} + 2 \, e^{\left (2 \, x + 2\right )}\right ) + \log \left (x\right ) \]

[In]

integrate(((4*x+2)*exp(1)*exp(x)^2+(4*x^2+8*x)*exp(1)*exp(x)+6*x^2*exp(1)-4*x-1)/(2*x*exp(1)*exp(x)^2+4*x^2*ex
p(1)*exp(x)+2*x^3*exp(1)-2*x^2-x),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.42 \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\log {\left (x \right )} + \log {\left (2 x e^{x} + \frac {2 e x^{2} - 2 x - 1}{2 e} + e^{2 x} \right )} \]

[In]

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

[Out]

log(x) + log(2*x*exp(x) + (2*E*x**2 - 2*x - 1)*exp(-1)/2 + exp(2*x))

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.46 \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\log \left (\frac {1}{2} \, {\left (2 \, x^{2} e + 4 \, x e^{\left (x + 1\right )} - 2 \, x + 2 \, e^{\left (2 \, x + 1\right )} - 1\right )} e^{\left (-1\right )}\right ) + \log \left (x\right ) \]

[In]

integrate(((4*x+2)*exp(1)*exp(x)^2+(4*x^2+8*x)*exp(1)*exp(x)+6*x^2*exp(1)-4*x-1)/(2*x*exp(1)*exp(x)^2+4*x^2*ex
p(1)*exp(x)+2*x^3*exp(1)-2*x^2-x),x, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 57 vs. \(2 (24) = 48\).

Time = 0.28 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.38 \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\log \left (2 \, {\left (x + 1\right )}^{2} e^{2} - 4 \, {\left (x + 1\right )} e^{2} - 2 \, {\left (x + 1\right )} e + 4 \, {\left (x + 1\right )} e^{\left (x + 2\right )} + 2 \, e^{2} + e + 2 \, e^{\left (2 \, x + 2\right )} - 4 \, e^{\left (x + 2\right )}\right ) + \log \left (x\right ) \]

[In]

integrate(((4*x+2)*exp(1)*exp(x)^2+(4*x^2+8*x)*exp(1)*exp(x)+6*x^2*exp(1)-4*x-1)/(2*x*exp(1)*exp(x)^2+4*x^2*ex
p(1)*exp(x)+2*x^3*exp(1)-2*x^2-x),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.55 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08 \[ \int \frac {-1-4 x+6 e x^2+e^{1+2 x} (2+4 x)+e^{1+x} \left (8 x+4 x^2\right )}{-x+2 e^{1+2 x} x-2 x^2+4 e^{1+x} x^2+2 e x^3} \, dx=\ln \left ({\mathrm {e}}^{2\,x}-\frac {{\mathrm {e}}^{-1}}{2}-x\,{\mathrm {e}}^{-1}+2\,x\,{\mathrm {e}}^x+x^2\right )+\ln \left (x\right ) \]

[In]

int((6*x^2*exp(1) - 4*x + exp(1)*exp(x)*(8*x + 4*x^2) + exp(2*x)*exp(1)*(4*x + 2) - 1)/(2*x^3*exp(1) - x - 2*x
^2 + 2*x*exp(2*x)*exp(1) + 4*x^2*exp(1)*exp(x)),x)

[Out]

log(exp(2*x) - exp(-1)/2 - x*exp(-1) + 2*x*exp(x) + x^2) + log(x)