\(\int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} (-16 x-10 x^2)}{e^{2 x}-2 e^x x+x^2} \, dx\) [2012]

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

Optimal result

Integrand size = 51, antiderivative size = 25 \[ \int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} \left (-16 x-10 x^2\right )}{e^{2 x}-2 e^x x+x^2} \, dx=2 e^3 \left (4 x+x \left (5+\frac {5 x}{e^x-x}\right )\right ) \]

[Out]

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

Rubi [F]

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

[In]

Int[(18*E^(3 + 2*x) + 8*E^3*x^2 + E^(3 + x)*(-16*x - 10*x^2))/(E^(2*x) - 2*E^x*x + x^2),x]

[Out]

18*E^3*x + 20*E^3*Defer[Int][x/(E^x - x), x] + 10*E^3*Defer[Int][x^2/(E^x - x)^2, x] - 10*E^3*Defer[Int][x^2/(
E^x - x), x] - 10*E^3*Defer[Int][x^3/(E^x - x)^2, x]

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

Mathematica [A] (verified)

Time = 1.03 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} \left (-16 x-10 x^2\right )}{e^{2 x}-2 e^x x+x^2} \, dx=2 e^3 \left (9 x+\frac {5 x^2}{e^x-x}\right ) \]

[In]

Integrate[(18*E^(3 + 2*x) + 8*E^3*x^2 + E^(3 + x)*(-16*x - 10*x^2))/(E^(2*x) - 2*E^x*x + x^2),x]

[Out]

2*E^3*(9*x + (5*x^2)/(E^x - x))

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.88

method result size
risch \(18 x \,{\mathrm e}^{3}-\frac {10 x^{2} {\mathrm e}^{3}}{x -{\mathrm e}^{x}}\) \(22\)
norman \(\frac {8 x^{2} {\mathrm e}^{3}-18 x \,{\mathrm e}^{3} {\mathrm e}^{x}}{x -{\mathrm e}^{x}}\) \(25\)
parallelrisch \(\frac {8 x^{2} {\mathrm e}^{3}-18 x \,{\mathrm e}^{3} {\mathrm e}^{x}}{x -{\mathrm e}^{x}}\) \(25\)

[In]

int((18*exp(3)*exp(x)^2+(-10*x^2-16*x)*exp(3)*exp(x)+8*x^2*exp(3))/(exp(x)^2-2*exp(x)*x+x^2),x,method=_RETURNV
ERBOSE)

[Out]

18*x*exp(3)-10*x^2*exp(3)/(x-exp(x))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.20 \[ \int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} \left (-16 x-10 x^2\right )}{e^{2 x}-2 e^x x+x^2} \, dx=\frac {2 \, {\left (4 \, x^{2} e^{6} - 9 \, x e^{\left (x + 6\right )}\right )}}{x e^{3} - e^{\left (x + 3\right )}} \]

[In]

integrate((18*exp(3)*exp(x)^2+(-10*x^2-16*x)*exp(3)*exp(x)+8*x^2*exp(3))/(exp(x)^2-2*exp(x)*x+x^2),x, algorith
m="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} \left (-16 x-10 x^2\right )}{e^{2 x}-2 e^x x+x^2} \, dx=\frac {10 x^{2} e^{3}}{- x + e^{x}} + 18 x e^{3} \]

[In]

integrate((18*exp(3)*exp(x)**2+(-10*x**2-16*x)*exp(3)*exp(x)+8*x**2*exp(3))/(exp(x)**2-2*exp(x)*x+x**2),x)

[Out]

10*x**2*exp(3)/(-x + exp(x)) + 18*x*exp(3)

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} \left (-16 x-10 x^2\right )}{e^{2 x}-2 e^x x+x^2} \, dx=\frac {2 \, {\left (4 \, x^{2} e^{3} - 9 \, x e^{\left (x + 3\right )}\right )}}{x - e^{x}} \]

[In]

integrate((18*exp(3)*exp(x)^2+(-10*x^2-16*x)*exp(3)*exp(x)+8*x^2*exp(3))/(exp(x)^2-2*exp(x)*x+x^2),x, algorith
m="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (23) = 46\).

Time = 0.26 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.04 \[ \int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} \left (-16 x-10 x^2\right )}{e^{2 x}-2 e^x x+x^2} \, dx=\frac {2 \, {\left (4 \, {\left (x + 3\right )}^{2} e^{6} + 3 \, {\left (x + 3\right )} e^{6} - 9 \, {\left (x + 3\right )} e^{\left (x + 6\right )} - 45 \, e^{6}\right )}}{{\left (x + 3\right )} e^{3} - 3 \, e^{3} - e^{\left (x + 3\right )}} \]

[In]

integrate((18*exp(3)*exp(x)^2+(-10*x^2-16*x)*exp(3)*exp(x)+8*x^2*exp(3))/(exp(x)^2-2*exp(x)*x+x^2),x, algorith
m="giac")

[Out]

2*(4*(x + 3)^2*e^6 + 3*(x + 3)*e^6 - 9*(x + 3)*e^(x + 6) - 45*e^6)/((x + 3)*e^3 - 3*e^3 - e^(x + 3))

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {18 e^{3+2 x}+8 e^3 x^2+e^{3+x} \left (-16 x-10 x^2\right )}{e^{2 x}-2 e^x x+x^2} \, dx=18\,x\,{\mathrm {e}}^3-\frac {10\,x^2\,{\mathrm {e}}^3}{x-{\mathrm {e}}^x} \]

[In]

int((18*exp(2*x)*exp(3) + 8*x^2*exp(3) - exp(3)*exp(x)*(16*x + 10*x^2))/(exp(2*x) - 2*x*exp(x) + x^2),x)

[Out]

18*x*exp(3) - (10*x^2*exp(3))/(x - exp(x))