\(\int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} (32+40 x+12 x^2)+e^{2 x} (-96 x-96 x^2-24 x^3)}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} (96 x+96 x^2+24 x^3)} \, dx\) [5705]

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

Optimal result

Integrand size = 128, antiderivative size = 28 \[ \int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} \left (32+40 x+12 x^2\right )+e^{2 x} \left (-96 x-96 x^2-24 x^3\right )}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} \left (96 x+96 x^2+24 x^3\right )} \, dx=-x+\frac {e^x}{3 x+\frac {1}{4} e^{-2 x} (2+x)^2} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {48 e^{5 x} (-1+x)-144 e^{4 x} x^2-24 e^{2 x} x (2+x)^2-(2+x)^4+4 e^{3 x} \left (8+10 x+3 x^2\right )}{\left (4+4 \left (1+3 e^{2 x}\right ) x+x^2\right )^2} \, dx \\ & = \int \left (-1+\frac {e^x (-1+x)}{3 x^2}-\frac {e^x (2+x)^3 \left (2+3 x+2 x^2\right )}{3 x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )^2}+\frac {e^x \left (8+8 x+4 x^2+x^3\right )}{3 x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )}\right ) \, dx \\ & = -x+\frac {1}{3} \int \frac {e^x (-1+x)}{x^2} \, dx-\frac {1}{3} \int \frac {e^x (2+x)^3 \left (2+3 x+2 x^2\right )}{x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )^2} \, dx+\frac {1}{3} \int \frac {e^x \left (8+8 x+4 x^2+x^3\right )}{x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )} \, dx \\ & = \frac {e^x}{3 x}-x-\frac {1}{3} \int \left (\frac {64 e^x}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2}+\frac {16 e^x}{x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )^2}+\frac {48 e^x}{x \left (4+4 x+12 e^{2 x} x+x^2\right )^2}+\frac {44 e^x x}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2}+\frac {15 e^x x^2}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2}+\frac {2 e^x x^3}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2}\right ) \, dx+\frac {1}{3} \int \left (\frac {4 e^x}{4+4 x+12 e^{2 x} x+x^2}+\frac {8 e^x}{x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )}+\frac {8 e^x}{x \left (4+4 x+12 e^{2 x} x+x^2\right )}+\frac {e^x x}{4+4 x+12 e^{2 x} x+x^2}\right ) \, dx \\ & = \frac {e^x}{3 x}-x+\frac {1}{3} \int \frac {e^x x}{4+4 x+12 e^{2 x} x+x^2} \, dx-\frac {2}{3} \int \frac {e^x x^3}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2} \, dx+\frac {4}{3} \int \frac {e^x}{4+4 x+12 e^{2 x} x+x^2} \, dx+\frac {8}{3} \int \frac {e^x}{x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )} \, dx+\frac {8}{3} \int \frac {e^x}{x \left (4+4 x+12 e^{2 x} x+x^2\right )} \, dx-5 \int \frac {e^x x^2}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2} \, dx-\frac {16}{3} \int \frac {e^x}{x^2 \left (4+4 x+12 e^{2 x} x+x^2\right )^2} \, dx-\frac {44}{3} \int \frac {e^x x}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2} \, dx-16 \int \frac {e^x}{x \left (4+4 x+12 e^{2 x} x+x^2\right )^2} \, dx-\frac {64}{3} \int \frac {e^x}{\left (4+4 x+12 e^{2 x} x+x^2\right )^2} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 4.20 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.68 \[ \int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} \left (32+40 x+12 x^2\right )+e^{2 x} \left (-96 x-96 x^2-24 x^3\right )}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} \left (96 x+96 x^2+24 x^3\right )} \, dx=\frac {e^x}{3 x}-x-\frac {e^x (2+x)^2}{3 x \left (4+4 x+12 e^{2 x} x+x^2\right )} \]

[In]

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

[Out]

E^x/(3*x) - x - (E^x*(2 + x)^2)/(3*x*(4 + 4*x + 12*E^(2*x)*x + x^2))

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.71

method result size
risch \(\frac {-12 \,{\mathrm e}^{2 x} x^{2}-x^{3}+4 \,{\mathrm e}^{3 x}-4 x^{2}-4 x}{12 x \,{\mathrm e}^{2 x}+x^{2}+4 x +4}\) \(48\)
parallelrisch \(-\frac {144 \,{\mathrm e}^{2 x} x^{2}+12 x^{3}-48 \,{\mathrm e}^{3 x}+48 x^{2}+48 x}{12 \left (12 x \,{\mathrm e}^{2 x}+x^{2}+4 x +4\right )}\) \(49\)
norman \(\frac {12 x +48 x \,{\mathrm e}^{2 x}-x^{3}+4 \,{\mathrm e}^{3 x}-12 \,{\mathrm e}^{2 x} x^{2}+16}{12 x \,{\mathrm e}^{2 x}+x^{2}+4 x +4}\) \(51\)

[In]

int(((48*x-48)*exp(x)^5-144*x^2*exp(x)^4+(12*x^2+40*x+32)*exp(x)^3+(-24*x^3-96*x^2-96*x)*exp(x)^2-x^4-8*x^3-24
*x^2-32*x-16)/(144*x^2*exp(x)^4+(24*x^3+96*x^2+96*x)*exp(x)^2+x^4+8*x^3+24*x^2+32*x+16),x,method=_RETURNVERBOS
E)

[Out]

(-12*exp(2*x)*x^2-x^3+4*exp(3*x)-4*x^2-4*x)/(12*x*exp(2*x)+x^2+4*x+4)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.64 \[ \int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} \left (32+40 x+12 x^2\right )+e^{2 x} \left (-96 x-96 x^2-24 x^3\right )}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} \left (96 x+96 x^2+24 x^3\right )} \, dx=-\frac {x^{3} + 12 \, x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} + 4 \, x - 4 \, e^{\left (3 \, x\right )}}{x^{2} + 12 \, x e^{\left (2 \, x\right )} + 4 \, x + 4} \]

[In]

integrate(((48*x-48)*exp(x)^5-144*x^2*exp(x)^4+(12*x^2+40*x+32)*exp(x)^3+(-24*x^3-96*x^2-96*x)*exp(x)^2-x^4-8*
x^3-24*x^2-32*x-16)/(144*x^2*exp(x)^4+(24*x^3+96*x^2+96*x)*exp(x)^2+x^4+8*x^3+24*x^2+32*x+16),x, algorithm="fr
icas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 44 vs. \(2 (19) = 38\).

Time = 0.14 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.57 \[ \int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} \left (32+40 x+12 x^2\right )+e^{2 x} \left (-96 x-96 x^2-24 x^3\right )}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} \left (96 x+96 x^2+24 x^3\right )} \, dx=- x + \frac {\left (- x^{2} - 4 x - 4\right ) e^{x}}{3 x^{3} + 36 x^{2} e^{2 x} + 12 x^{2} + 12 x} + \frac {e^{x}}{3 x} \]

[In]

integrate(((48*x-48)*exp(x)**5-144*x**2*exp(x)**4+(12*x**2+40*x+32)*exp(x)**3+(-24*x**3-96*x**2-96*x)*exp(x)**
2-x**4-8*x**3-24*x**2-32*x-16)/(144*x**2*exp(x)**4+(24*x**3+96*x**2+96*x)*exp(x)**2+x**4+8*x**3+24*x**2+32*x+1
6),x)

[Out]

-x + (-x**2 - 4*x - 4)*exp(x)/(3*x**3 + 36*x**2*exp(2*x) + 12*x**2 + 12*x) + exp(x)/(3*x)

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.64 \[ \int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} \left (32+40 x+12 x^2\right )+e^{2 x} \left (-96 x-96 x^2-24 x^3\right )}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} \left (96 x+96 x^2+24 x^3\right )} \, dx=-\frac {x^{3} + 12 \, x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} + 4 \, x - 4 \, e^{\left (3 \, x\right )}}{x^{2} + 12 \, x e^{\left (2 \, x\right )} + 4 \, x + 4} \]

[In]

integrate(((48*x-48)*exp(x)^5-144*x^2*exp(x)^4+(12*x^2+40*x+32)*exp(x)^3+(-24*x^3-96*x^2-96*x)*exp(x)^2-x^4-8*
x^3-24*x^2-32*x-16)/(144*x^2*exp(x)^4+(24*x^3+96*x^2+96*x)*exp(x)^2+x^4+8*x^3+24*x^2+32*x+16),x, algorithm="ma
xima")

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.29 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.57 \[ \int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} \left (32+40 x+12 x^2\right )+e^{2 x} \left (-96 x-96 x^2-24 x^3\right )}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} \left (96 x+96 x^2+24 x^3\right )} \, dx=-\frac {3 \, x^{4} + 36 \, x^{3} e^{\left (2 \, x\right )} + 12 \, x^{3} + x^{2} e^{x} + 12 \, x^{2} - 12 \, x e^{\left (3 \, x\right )} + 4 \, x e^{x} + 4 \, e^{x}}{3 \, {\left (x^{3} + 12 \, x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} + 4 \, x\right )}} \]

[In]

integrate(((48*x-48)*exp(x)^5-144*x^2*exp(x)^4+(12*x^2+40*x+32)*exp(x)^3+(-24*x^3-96*x^2-96*x)*exp(x)^2-x^4-8*
x^3-24*x^2-32*x-16)/(144*x^2*exp(x)^4+(24*x^3+96*x^2+96*x)*exp(x)^2+x^4+8*x^3+24*x^2+32*x+16),x, algorithm="gi
ac")

[Out]

-1/3*(3*x^4 + 36*x^3*e^(2*x) + 12*x^3 + x^2*e^x + 12*x^2 - 12*x*e^(3*x) + 4*x*e^x + 4*e^x)/(x^3 + 12*x^2*e^(2*
x) + 4*x^2 + 4*x)

Mupad [F(-1)]

Timed out. \[ \int \frac {-16-32 x-24 x^2-144 e^{4 x} x^2-8 x^3-x^4+e^{5 x} (-48+48 x)+e^{3 x} \left (32+40 x+12 x^2\right )+e^{2 x} \left (-96 x-96 x^2-24 x^3\right )}{16+32 x+24 x^2+144 e^{4 x} x^2+8 x^3+x^4+e^{2 x} \left (96 x+96 x^2+24 x^3\right )} \, dx=\int -\frac {32\,x-{\mathrm {e}}^{3\,x}\,\left (12\,x^2+40\,x+32\right )+{\mathrm {e}}^{2\,x}\,\left (24\,x^3+96\,x^2+96\,x\right )+144\,x^2\,{\mathrm {e}}^{4\,x}-{\mathrm {e}}^{5\,x}\,\left (48\,x-48\right )+24\,x^2+8\,x^3+x^4+16}{32\,x+{\mathrm {e}}^{2\,x}\,\left (24\,x^3+96\,x^2+96\,x\right )+144\,x^2\,{\mathrm {e}}^{4\,x}+24\,x^2+8\,x^3+x^4+16} \,d x \]

[In]

int(-(32*x - exp(3*x)*(40*x + 12*x^2 + 32) + exp(2*x)*(96*x + 96*x^2 + 24*x^3) + 144*x^2*exp(4*x) - exp(5*x)*(
48*x - 48) + 24*x^2 + 8*x^3 + x^4 + 16)/(32*x + exp(2*x)*(96*x + 96*x^2 + 24*x^3) + 144*x^2*exp(4*x) + 24*x^2
+ 8*x^3 + x^4 + 16),x)

[Out]

int(-(32*x - exp(3*x)*(40*x + 12*x^2 + 32) + exp(2*x)*(96*x + 96*x^2 + 24*x^3) + 144*x^2*exp(4*x) - exp(5*x)*(
48*x - 48) + 24*x^2 + 8*x^3 + x^4 + 16)/(32*x + exp(2*x)*(96*x + 96*x^2 + 24*x^3) + 144*x^2*exp(4*x) + 24*x^2
+ 8*x^3 + x^4 + 16), x)