\(\int \frac {16-24 e^{2 x}-16 x+e^x (40-8 x-4 x^2)}{-2 x+3 e^{2 x} x+e^x (-5 x-x^2)} \, dx\) [4338]

   Optimal result
   Rubi [F]
   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 = 54, antiderivative size = 32 \[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=4 \left (4+x-\log \left (\frac {1}{15} \left (-5-2 e^{-x}+3 e^x-x\right ) x^2\right )\right ) \]

[Out]

4*x-4*ln(1/3*x^2*(3/5*exp(x)-1/5*x-1-2/5/exp(x)))+16

Rubi [F]

\[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=\int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx \]

[In]

Int[(16 - 24*E^(2*x) - 16*x + E^x*(40 - 8*x - 4*x^2))/(-2*x + 3*E^(2*x)*x + E^x*(-5*x - x^2)),x]

[Out]

-8*Log[x] - 16*Defer[Int][(-2 - 5*E^x + 3*E^(2*x) - E^x*x)^(-1), x] - 16*Defer[Int][E^x/(-2 - 5*E^x + 3*E^(2*x
) - E^x*x), x] - 4*Defer[Int][(E^x*x)/(-2 - 5*E^x + 3*E^(2*x) - E^x*x), x]

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {8}{x}-\frac {4 \left (4+4 e^x+e^x x\right )}{-2-5 e^x+3 e^{2 x}-e^x x}\right ) \, dx \\ & = -8 \log (x)-4 \int \frac {4+4 e^x+e^x x}{-2-5 e^x+3 e^{2 x}-e^x x} \, dx \\ & = -8 \log (x)-4 \int \left (\frac {4}{-2-5 e^x+3 e^{2 x}-e^x x}+\frac {4 e^x}{-2-5 e^x+3 e^{2 x}-e^x x}+\frac {e^x x}{-2-5 e^x+3 e^{2 x}-e^x x}\right ) \, dx \\ & = -8 \log (x)-4 \int \frac {e^x x}{-2-5 e^x+3 e^{2 x}-e^x x} \, dx-16 \int \frac {1}{-2-5 e^x+3 e^{2 x}-e^x x} \, dx-16 \int \frac {e^x}{-2-5 e^x+3 e^{2 x}-e^x x} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 1.28 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00 \[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=4 \left (2 x-2 \log (x)-\log \left (2+5 e^x-3 e^{2 x}+e^x x\right )\right ) \]

[In]

Integrate[(16 - 24*E^(2*x) - 16*x + E^x*(40 - 8*x - 4*x^2))/(-2*x + 3*E^(2*x)*x + E^x*(-5*x - x^2)),x]

[Out]

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

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.81

method result size
risch \(-8 \ln \left (x \right )+8 x -4 \ln \left ({\mathrm e}^{2 x}+\left (-\frac {x}{3}-\frac {5}{3}\right ) {\mathrm e}^{x}-\frac {2}{3}\right )\) \(26\)
norman \(8 x -8 \ln \left (x \right )-4 \ln \left ({\mathrm e}^{x} x -3 \,{\mathrm e}^{2 x}+5 \,{\mathrm e}^{x}+2\right )\) \(28\)
parallelrisch \(8 x -8 \ln \left (x \right )-4 \ln \left ({\mathrm e}^{x} x -3 \,{\mathrm e}^{2 x}+5 \,{\mathrm e}^{x}+2\right )\) \(28\)

[In]

int((-24*exp(x)^2+(-4*x^2-8*x+40)*exp(x)-16*x+16)/(3*x*exp(x)^2+(-x^2-5*x)*exp(x)-2*x),x,method=_RETURNVERBOSE
)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.81 \[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=8 \, x - 4 \, \log \left (-{\left (x + 5\right )} e^{x} + 3 \, e^{\left (2 \, x\right )} - 2\right ) - 8 \, \log \left (x\right ) \]

[In]

integrate((-24*exp(x)^2+(-4*x^2-8*x+40)*exp(x)-16*x+16)/(3*x*exp(x)^2+(-x^2-5*x)*exp(x)-2*x),x, algorithm="fri
cas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.97 \[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=8 x - 8 \log {\left (x \right )} - 4 \log {\left (\left (- \frac {x}{3} - \frac {5}{3}\right ) e^{x} + e^{2 x} - \frac {2}{3} \right )} \]

[In]

integrate((-24*exp(x)**2+(-4*x**2-8*x+40)*exp(x)-16*x+16)/(3*x*exp(x)**2+(-x**2-5*x)*exp(x)-2*x),x)

[Out]

8*x - 8*log(x) - 4*log((-x/3 - 5/3)*exp(x) + exp(2*x) - 2/3)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.75 \[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=8 \, x - 4 \, \log \left (-\frac {1}{3} \, {\left (x + 5\right )} e^{x} + e^{\left (2 \, x\right )} - \frac {2}{3}\right ) - 8 \, \log \left (x\right ) \]

[In]

integrate((-24*exp(x)^2+(-4*x^2-8*x+40)*exp(x)-16*x+16)/(3*x*exp(x)^2+(-x^2-5*x)*exp(x)-2*x),x, algorithm="max
ima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.88 \[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=8 \, x - 4 \, \log \left (-x e^{x} + 3 \, e^{\left (2 \, x\right )} - 5 \, e^{x} - 2\right ) - 8 \, \log \left (x\right ) \]

[In]

integrate((-24*exp(x)^2+(-4*x^2-8*x+40)*exp(x)-16*x+16)/(3*x*exp(x)^2+(-x^2-5*x)*exp(x)-2*x),x, algorithm="gia
c")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.84 \[ \int \frac {16-24 e^{2 x}-16 x+e^x \left (40-8 x-4 x^2\right )}{-2 x+3 e^{2 x} x+e^x \left (-5 x-x^2\right )} \, dx=8\,x-4\,\ln \left (5\,{\mathrm {e}}^x-3\,{\mathrm {e}}^{2\,x}+x\,{\mathrm {e}}^x+2\right )-8\,\ln \left (x\right ) \]

[In]

int((16*x + 24*exp(2*x) + exp(x)*(8*x + 4*x^2 - 40) - 16)/(2*x - 3*x*exp(2*x) + exp(x)*(5*x + x^2)),x)

[Out]

8*x - 4*log(5*exp(x) - 3*exp(2*x) + x*exp(x) + 2) - 8*log(x)