\(\int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x (-20 x+8 x^2)+e^{2 x} (-3 x^2+x^3)} \, dx\) [9366]

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

Optimal result

Integrand size = 64, antiderivative size = 23 \[ \int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x \left (-20 x+8 x^2\right )+e^{2 x} \left (-3 x^2+x^3\right )} \, dx=e^4 \log \left (2-x+\frac {x}{4 e^{-x}+x}\right ) \]

[Out]

ln(2+x/(4/exp(x)+x)-x)*exp(4)

Rubi [F]

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

[In]

Int[(16*E^4 + E^(4 + 2*x)*x^2 + E^(4 + x)*(-4 + 4*x))/(-32 + 16*x + E^x*(-20*x + 8*x^2) + E^(2*x)*(-3*x^2 + x^
3)),x]

[Out]

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

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

Mathematica [A] (verified)

Time = 1.71 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.52 \[ \int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x \left (-20 x+8 x^2\right )+e^{2 x} \left (-3 x^2+x^3\right )} \, dx=e^4 \left (-2 \text {arctanh}\left (5-2 x+\frac {3 e^x x}{2}-\frac {e^x x^2}{2}\right )+\log (-3+x)\right ) \]

[In]

Integrate[(16*E^4 + E^(4 + 2*x)*x^2 + E^(4 + x)*(-4 + 4*x))/(-32 + 16*x + E^x*(-20*x + 8*x^2) + E^(2*x)*(-3*x^
2 + x^3)),x]

[Out]

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

Maple [A] (verified)

Time = 0.55 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.43

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

[In]

int((x^2*exp(4)*exp(x)^2+(-4+4*x)*exp(4)*exp(x)+16*exp(4))/((x^3-3*x^2)*exp(x)^2+(8*x^2-20*x)*exp(x)+16*x-32),
x,method=_RETURNVERBOSE)

[Out]

exp(4)*ln(exp(x)*x^2-3*exp(x)*x+4*x-8)-exp(4)*ln(exp(x)*x+4)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (21) = 42\).

Time = 0.26 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.70 \[ \int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x \left (-20 x+8 x^2\right )+e^{2 x} \left (-3 x^2+x^3\right )} \, dx=e^{4} \log \left (x - 3\right ) + e^{4} \log \left (\frac {4 \, {\left (x - 2\right )} e^{4} + {\left (x^{2} - 3 \, x\right )} e^{\left (x + 4\right )}}{x^{2} - 3 \, x}\right ) - e^{4} \log \left (\frac {x e^{\left (x + 4\right )} + 4 \, e^{4}}{x}\right ) \]

[In]

integrate((x^2*exp(4)*exp(x)^2+(-4+4*x)*exp(4)*exp(x)+16*exp(4))/((x^3-3*x^2)*exp(x)^2+(8*x^2-20*x)*exp(x)+16*
x-32),x, algorithm="fricas")

[Out]

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

Sympy [F(-2)]

Exception generated. \[ \int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x \left (-20 x+8 x^2\right )+e^{2 x} \left (-3 x^2+x^3\right )} \, dx=\text {Exception raised: PolynomialError} \]

[In]

integrate((x**2*exp(4)*exp(x)**2+(-4+4*x)*exp(4)*exp(x)+16*exp(4))/((x**3-3*x**2)*exp(x)**2+(8*x**2-20*x)*exp(
x)+16*x-32),x)

[Out]

Exception raised: PolynomialError >> 1/(x**4 - 6*x**3 + 9*x**2) contains an element of the set of generators.

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 52 vs. \(2 (21) = 42\).

Time = 0.24 (sec) , antiderivative size = 52, normalized size of antiderivative = 2.26 \[ \int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x \left (-20 x+8 x^2\right )+e^{2 x} \left (-3 x^2+x^3\right )} \, dx=e^{4} \log \left (x - 3\right ) + e^{4} \log \left (\frac {{\left (x^{2} - 3 \, x\right )} e^{x} + 4 \, x - 8}{x^{2} - 3 \, x}\right ) - e^{4} \log \left (\frac {x e^{x} + 4}{x}\right ) \]

[In]

integrate((x^2*exp(4)*exp(x)^2+(-4+4*x)*exp(4)*exp(x)+16*exp(4))/((x^3-3*x^2)*exp(x)^2+(8*x^2-20*x)*exp(x)+16*
x-32),x, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (21) = 42\).

Time = 0.28 (sec) , antiderivative size = 66, normalized size of antiderivative = 2.87 \[ \int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x \left (-20 x+8 x^2\right )+e^{2 x} \left (-3 x^2+x^3\right )} \, dx=e^{4} \log \left ({\left (x + 4\right )}^{2} e^{\left (x + 4\right )} + 4 \, {\left (x + 4\right )} e^{4} - 11 \, {\left (x + 4\right )} e^{\left (x + 4\right )} - 24 \, e^{4} + 28 \, e^{\left (x + 4\right )}\right ) - e^{4} \log \left ({\left (x + 4\right )} e^{\left (x + 4\right )} + 4 \, e^{4} - 4 \, e^{\left (x + 4\right )}\right ) \]

[In]

integrate((x^2*exp(4)*exp(x)^2+(-4+4*x)*exp(4)*exp(x)+16*exp(4))/((x^3-3*x^2)*exp(x)^2+(8*x^2-20*x)*exp(x)+16*
x-32),x, algorithm="giac")

[Out]

e^4*log((x + 4)^2*e^(x + 4) + 4*(x + 4)*e^4 - 11*(x + 4)*e^(x + 4) - 24*e^4 + 28*e^(x + 4)) - e^4*log((x + 4)*
e^(x + 4) + 4*e^4 - 4*e^(x + 4))

Mupad [B] (verification not implemented)

Time = 14.50 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.30 \[ \int \frac {16 e^4+e^{4+2 x} x^2+e^{4+x} (-4+4 x)}{-32+16 x+e^x \left (-20 x+8 x^2\right )+e^{2 x} \left (-3 x^2+x^3\right )} \, dx={\mathrm {e}}^4\,\left (\ln \left (4\,x+x^2\,{\mathrm {e}}^x-3\,x\,{\mathrm {e}}^x-8\right )-\ln \left (x\,{\mathrm {e}}^x+4\right )\right ) \]

[In]

int(-(16*exp(4) + exp(4)*exp(x)*(4*x - 4) + x^2*exp(2*x)*exp(4))/(exp(2*x)*(3*x^2 - x^3) - 16*x + exp(x)*(20*x
 - 8*x^2) + 32),x)

[Out]

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