\(\int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx\) [6682]

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

Optimal result

Integrand size = 40, antiderivative size = 22 \[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=\frac {\left (-4+e^x\right )^2}{\left (1-x^2+(4+x)^2\right )^2} \]

[Out]

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

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.59, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {6820, 12, 6874, 2228} \[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=-\frac {8 e^x}{(8 x+17)^2}+\frac {e^{2 x}}{(8 x+17)^2}+\frac {16}{(8 x+17)^2} \]

[In]

Int[(-256 + E^x*(-8 - 64*x) + E^(2*x)*(18 + 16*x))/(4913 + 6936*x + 3264*x^2 + 512*x^3),x]

[Out]

16/(17 + 8*x)^2 - (8*E^x)/(17 + 8*x)^2 + E^(2*x)/(17 + 8*x)^2

Rule 12

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

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

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 {2 \left (4-e^x\right ) \left (-32-e^x (9+8 x)\right )}{(17+8 x)^3} \, dx \\ & = 2 \int \frac {\left (4-e^x\right ) \left (-32-e^x (9+8 x)\right )}{(17+8 x)^3} \, dx \\ & = 2 \int \left (-\frac {128}{(17+8 x)^3}-\frac {4 e^x (1+8 x)}{(17+8 x)^3}+\frac {e^{2 x} (9+8 x)}{(17+8 x)^3}\right ) \, dx \\ & = \frac {16}{(17+8 x)^2}+2 \int \frac {e^{2 x} (9+8 x)}{(17+8 x)^3} \, dx-8 \int \frac {e^x (1+8 x)}{(17+8 x)^3} \, dx \\ & = \frac {16}{(17+8 x)^2}-\frac {8 e^x}{(17+8 x)^2}+\frac {e^{2 x}}{(17+8 x)^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.05 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.68 \[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=\frac {\left (-4+e^x\right )^2}{(17+8 x)^2} \]

[In]

Integrate[(-256 + E^x*(-8 - 64*x) + E^(2*x)*(18 + 16*x))/(4913 + 6936*x + 3264*x^2 + 512*x^3),x]

[Out]

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

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86

method result size
norman \(\frac {{\mathrm e}^{2 x}+16-8 \,{\mathrm e}^{x}}{\left (8 x +17\right )^{2}}\) \(19\)
parallelrisch \(\frac {1024+64 \,{\mathrm e}^{2 x}-512 \,{\mathrm e}^{x}}{4096 x^{2}+17408 x +18496}\) \(27\)
default \(\frac {16}{\left (8 x +17\right )^{2}}-\frac {{\mathrm e}^{x}}{8 \left (x +\frac {17}{8}\right )^{2}}+\frac {{\mathrm e}^{2 x}}{64 \left (x +\frac {17}{8}\right )^{2}}\) \(31\)
parts \(\frac {16}{\left (8 x +17\right )^{2}}-\frac {{\mathrm e}^{x}}{8 \left (x +\frac {17}{8}\right )^{2}}+\frac {{\mathrm e}^{2 x}}{64 \left (x +\frac {17}{8}\right )^{2}}\) \(31\)
risch \(\frac {1}{4 x^{2}+17 x +\frac {289}{16}}+\frac {{\mathrm e}^{2 x}}{\left (8 x +17\right )^{2}}-\frac {8 \,{\mathrm e}^{x}}{\left (8 x +17\right )^{2}}\) \(37\)

[In]

int(((16*x+18)*exp(x)^2+(-64*x-8)*exp(x)-256)/(512*x^3+3264*x^2+6936*x+4913),x,method=_RETURNVERBOSE)

[Out]

(exp(x)^2+16-8*exp(x))/(8*x+17)^2

Fricas [A] (verification not implemented)

none

Time = 0.47 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=\frac {e^{\left (2 \, x\right )} - 8 \, e^{x} + 16}{64 \, x^{2} + 272 \, x + 289} \]

[In]

integrate(((16*x+18)*exp(x)^2+(-64*x-8)*exp(x)-256)/(512*x^3+3264*x^2+6936*x+4913),x, algorithm="fricas")

[Out]

(e^(2*x) - 8*e^x + 16)/(64*x^2 + 272*x + 289)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (17) = 34\).

Time = 0.10 (sec) , antiderivative size = 61, normalized size of antiderivative = 2.77 \[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=\frac {\left (- 512 x^{2} - 2176 x - 2312\right ) e^{x} + \left (64 x^{2} + 272 x + 289\right ) e^{2 x}}{4096 x^{4} + 34816 x^{3} + 110976 x^{2} + 157216 x + 83521} + \frac {256}{1024 x^{2} + 4352 x + 4624} \]

[In]

integrate(((16*x+18)*exp(x)**2+(-64*x-8)*exp(x)-256)/(512*x**3+3264*x**2+6936*x+4913),x)

[Out]

((-512*x**2 - 2176*x - 2312)*exp(x) + (64*x**2 + 272*x + 289)*exp(2*x))/(4096*x**4 + 34816*x**3 + 110976*x**2
+ 157216*x + 83521) + 256/(1024*x**2 + 4352*x + 4624)

Maxima [F]

\[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=\int { \frac {2 \, {\left ({\left (8 \, x + 9\right )} e^{\left (2 \, x\right )} - 4 \, {\left (8 \, x + 1\right )} e^{x} - 128\right )}}{512 \, x^{3} + 3264 \, x^{2} + 6936 \, x + 4913} \,d x } \]

[In]

integrate(((16*x+18)*exp(x)^2+(-64*x-8)*exp(x)-256)/(512*x^3+3264*x^2+6936*x+4913),x, algorithm="maxima")

[Out]

((8*x + 17)*e^(2*x) - 64*x*e^x)/(512*x^3 + 3264*x^2 + 6936*x + 4913) + e^(-17/8)*exp_integral_e(3, -x - 17/8)/
(8*x + 17)^2 + 16/(64*x^2 + 272*x + 289) - 2*integrate(32*(16*x - 17)*e^x/(4096*x^4 + 34816*x^3 + 110976*x^2 +
 157216*x + 83521), x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=\frac {e^{\left (2 \, x\right )} - 8 \, e^{x} + 16}{64 \, x^{2} + 272 \, x + 289} \]

[In]

integrate(((16*x+18)*exp(x)^2+(-64*x-8)*exp(x)-256)/(512*x^3+3264*x^2+6936*x+4913),x, algorithm="giac")

[Out]

(e^(2*x) - 8*e^x + 16)/(64*x^2 + 272*x + 289)

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.64 \[ \int \frac {-256+e^x (-8-64 x)+e^{2 x} (18+16 x)}{4913+6936 x+3264 x^2+512 x^3} \, dx=\frac {{\left ({\mathrm {e}}^x-4\right )}^2}{{\left (8\,x+17\right )}^2} \]

[In]

int(-(exp(x)*(64*x + 8) - exp(2*x)*(16*x + 18) + 256)/(6936*x + 3264*x^2 + 512*x^3 + 4913),x)

[Out]

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