\(\int \frac {e^{2 x} (-16-24 x-12 x^2+4 x^3)}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx\) [9964]

   Optimal result
   Rubi [B] (verified)
   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 = 46, antiderivative size = 22 \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=\frac {2 e^{2 x}}{(-4+x) \left (4+\frac {4}{x}+x\right )} \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(45\) vs. \(2(22)=44\).

Time = 0.31 (sec) , antiderivative size = 45, normalized size of antiderivative = 2.05, number of steps used = 13, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {6820, 12, 6874, 2208, 2209} \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=-\frac {2 e^{2 x}}{9 (x+2)}+\frac {2 e^{2 x}}{3 (x+2)^2}-\frac {2 e^{2 x}}{9 (4-x)} \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2208

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*((b*F^(g*(e + f*x)))^n/(d*(m + 1))), x] - Dist[f*g*n*(Log[F]/(d*(m + 1))), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !TrueQ[$UseGamm
a]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \frac {4 e^{2 x} \left (-4-6 x-3 x^2+x^3\right )}{(4-x)^2 (2+x)^3} \, dx \\ & = 4 \int \frac {e^{2 x} \left (-4-6 x-3 x^2+x^3\right )}{(4-x)^2 (2+x)^3} \, dx \\ & = 4 \int \left (-\frac {e^{2 x}}{18 (-4+x)^2}+\frac {e^{2 x}}{9 (-4+x)}-\frac {e^{2 x}}{3 (2+x)^3}+\frac {7 e^{2 x}}{18 (2+x)^2}-\frac {e^{2 x}}{9 (2+x)}\right ) \, dx \\ & = -\left (\frac {2}{9} \int \frac {e^{2 x}}{(-4+x)^2} \, dx\right )+\frac {4}{9} \int \frac {e^{2 x}}{-4+x} \, dx-\frac {4}{9} \int \frac {e^{2 x}}{2+x} \, dx-\frac {4}{3} \int \frac {e^{2 x}}{(2+x)^3} \, dx+\frac {14}{9} \int \frac {e^{2 x}}{(2+x)^2} \, dx \\ & = -\frac {2 e^{2 x}}{9 (4-x)}+\frac {2 e^{2 x}}{3 (2+x)^2}-\frac {14 e^{2 x}}{9 (2+x)}+\frac {4}{9} e^8 \operatorname {ExpIntegralEi}(-2 (4-x))-\frac {4 \operatorname {ExpIntegralEi}(2 (2+x))}{9 e^4}-\frac {4}{9} \int \frac {e^{2 x}}{-4+x} \, dx-\frac {4}{3} \int \frac {e^{2 x}}{(2+x)^2} \, dx+\frac {28}{9} \int \frac {e^{2 x}}{2+x} \, dx \\ & = -\frac {2 e^{2 x}}{9 (4-x)}+\frac {2 e^{2 x}}{3 (2+x)^2}-\frac {2 e^{2 x}}{9 (2+x)}+\frac {8 \operatorname {ExpIntegralEi}(2 (2+x))}{3 e^4}-\frac {8}{3} \int \frac {e^{2 x}}{2+x} \, dx \\ & = -\frac {2 e^{2 x}}{9 (4-x)}+\frac {2 e^{2 x}}{3 (2+x)^2}-\frac {2 e^{2 x}}{9 (2+x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.36 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=\frac {2 e^{2 x} x}{(-4+x) (2+x)^2} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82

method result size
gosper \(\frac {2 \,{\mathrm e}^{2 x} x}{x^{3}-12 x -16}\) \(18\)
norman \(\frac {2 x \,{\mathrm e}^{2 x}}{\left (x -4\right ) \left (2+x \right )^{2}}\) \(18\)
risch \(\frac {2 x \,{\mathrm e}^{2 x}}{\left (x -4\right ) \left (2+x \right )^{2}}\) \(18\)
parallelrisch \(\frac {2 \,{\mathrm e}^{2 x} x}{x^{3}-12 x -16}\) \(18\)
default \(-\frac {2 \,{\mathrm e}^{2 x}}{9 \left (2+x \right )}+\frac {2 \,{\mathrm e}^{2 x}}{9 \left (x -4\right )}+\frac {2 \,{\mathrm e}^{2 x}}{3 \left (2+x \right )^{2}}\) \(35\)

[In]

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

[Out]

2*exp(x)^2*x/(x^3-12*x-16)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=\frac {2 \, x e^{\left (2 \, x\right )}}{x^{3} - 12 \, x - 16} \]

[In]

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

[Out]

2*x*e^(2*x)/(x^3 - 12*x - 16)

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.68 \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=\frac {2 x e^{2 x}}{x^{3} - 12 x - 16} \]

[In]

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

[Out]

2*x*exp(2*x)/(x**3 - 12*x - 16)

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=\frac {2 \, x e^{\left (2 \, x\right )}}{x^{3} - 12 \, x - 16} \]

[In]

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

[Out]

2*x*e^(2*x)/(x^3 - 12*x - 16)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=\frac {2 \, x e^{\left (2 \, x\right )}}{x^{3} - 12 \, x - 16} \]

[In]

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

[Out]

2*x*e^(2*x)/(x^3 - 12*x - 16)

Mupad [B] (verification not implemented)

Time = 15.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int \frac {e^{2 x} \left (-16-24 x-12 x^2+4 x^3\right )}{128+128 x+8 x^2-20 x^3-2 x^4+x^5} \, dx=\frac {2\,x\,{\mathrm {e}}^{2\,x}}{{\left (x+2\right )}^2\,\left (x-4\right )} \]

[In]

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

[Out]

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