\(\int \frac {64 e^{-6+x} (-14+48 x+32 x^2)+16 e^{-4+x} (2-9 x+8 x^2-16 x^3)}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx\) [9217]

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

Optimal result

Integrand size = 68, antiderivative size = 25 \[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=\frac {e^x \left (-\frac {1}{2}+2 x\right )^2}{\left (-2+\frac {e^2 x}{4}\right )^2} \]

[Out]

exp(x)*(2*x-1/2)^2/(-2+x/exp(2*ln(2)-2))^2

Rubi [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.27 (sec) , antiderivative size = 192, normalized size of antiderivative = 7.68, number of steps used = 11, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {6820, 12, 2230, 2225, 2208, 2209} \[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=4 e^{\frac {8}{e^2}-8} \left (1024-320 e^2+9 e^4\right ) \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )-4 e^{\frac {8}{e^2}-8} \left (32-e^2\right )^2 \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )+32 e^{\frac {8}{e^2}-6} \left (32-e^2\right ) \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )+64 e^{x-4}+\frac {4 \left (1024-320 e^2+9 e^4\right ) e^{x-6}}{8-e^2 x}-\frac {4 \left (32-e^2\right )^2 e^{x-6}}{8-e^2 x}+\frac {4 \left (32-e^2\right )^2 e^{x-4}}{\left (8-e^2 x\right )^2} \]

[In]

Int[(64*E^(-6 + x)*(-14 + 48*x + 32*x^2) + 16*E^(-4 + x)*(2 - 9*x + 8*x^2 - 16*x^3))/(2048/E^6 - (768*x)/E^4 +
 (96*x^2)/E^2 - 4*x^3),x]

[Out]

64*E^(-4 + x) + (4*E^(-4 + x)*(32 - E^2)^2)/(8 - E^2*x)^2 - (4*E^(-6 + x)*(32 - E^2)^2)/(8 - E^2*x) + (4*E^(-6
 + x)*(1024 - 320*E^2 + 9*E^4))/(8 - E^2*x) + 32*E^(-6 + 8/E^2)*(32 - E^2)*ExpIntegralEi[-((8 - E^2*x)/E^2)] -
 4*E^(-8 + 8/E^2)*(32 - E^2)^2*ExpIntegralEi[-((8 - E^2*x)/E^2)] + 4*E^(-8 + 8/E^2)*(1024 - 320*E^2 + 9*E^4)*E
xpIntegralEi[-((8 - E^2*x)/E^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 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 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2230

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !TrueQ[$UseGamma]

Rule 6820

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {4 e^x (1-4 x) \left (-2 \left (28-e^2\right )-\left (32+e^2\right ) x+4 e^2 x^2\right )}{\left (8-e^2 x\right )^3} \, dx \\ & = 4 \int \frac {e^x (1-4 x) \left (-2 \left (28-e^2\right )-\left (32+e^2\right ) x+4 e^2 x^2\right )}{\left (8-e^2 x\right )^3} \, dx \\ & = 4 \int \left (16 e^{-4+x}-\frac {2 e^{-2+x} \left (-32+e^2\right )^2}{\left (-8+e^2 x\right )^3}+\frac {e^{-4+x} \left (1024-320 e^2+9 e^4\right )}{\left (-8+e^2 x\right )^2}-\frac {8 e^{-4+x} \left (-32+e^2\right )}{-8+e^2 x}\right ) \, dx \\ & = 64 \int e^{-4+x} \, dx+\left (32 \left (32-e^2\right )\right ) \int \frac {e^{-4+x}}{-8+e^2 x} \, dx-\left (8 \left (32-e^2\right )^2\right ) \int \frac {e^{-2+x}}{\left (-8+e^2 x\right )^3} \, dx+\left (4 \left (1024-320 e^2+9 e^4\right )\right ) \int \frac {e^{-4+x}}{\left (-8+e^2 x\right )^2} \, dx \\ & = 64 e^{-4+x}+\frac {4 e^{-4+x} \left (32-e^2\right )^2}{\left (8-e^2 x\right )^2}+\frac {4 e^{-6+x} \left (1024-320 e^2+9 e^4\right )}{8-e^2 x}+32 e^{-6+\frac {8}{e^2}} \left (32-e^2\right ) \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )-\frac {\left (4 \left (32-e^2\right )^2\right ) \int \frac {e^{-2+x}}{\left (-8+e^2 x\right )^2} \, dx}{e^2}+\frac {\left (4 \left (1024-320 e^2+9 e^4\right )\right ) \int \frac {e^{-4+x}}{-8+e^2 x} \, dx}{e^2} \\ & = 64 e^{-4+x}+\frac {4 e^{-4+x} \left (32-e^2\right )^2}{\left (8-e^2 x\right )^2}-\frac {4 e^{-6+x} \left (32-e^2\right )^2}{8-e^2 x}+\frac {4 e^{-6+x} \left (1024-320 e^2+9 e^4\right )}{8-e^2 x}+32 e^{-6+\frac {8}{e^2}} \left (32-e^2\right ) \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )+4 e^{-8+\frac {8}{e^2}} \left (1024-320 e^2+9 e^4\right ) \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )-\frac {\left (4 \left (32-e^2\right )^2\right ) \int \frac {e^{-2+x}}{-8+e^2 x} \, dx}{e^4} \\ & = 64 e^{-4+x}+\frac {4 e^{-4+x} \left (32-e^2\right )^2}{\left (8-e^2 x\right )^2}-\frac {4 e^{-6+x} \left (32-e^2\right )^2}{8-e^2 x}+\frac {4 e^{-6+x} \left (1024-320 e^2+9 e^4\right )}{8-e^2 x}+32 e^{-6+\frac {8}{e^2}} \left (32-e^2\right ) \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )-4 e^{-8+\frac {8}{e^2}} \left (32-e^2\right )^2 \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right )+4 e^{-8+\frac {8}{e^2}} \left (1024-320 e^2+9 e^4\right ) \operatorname {ExpIntegralEi}\left (-\frac {8-e^2 x}{e^2}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.36 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=\frac {4 e^x (1-4 x)^2}{\left (-8+e^2 x\right )^2} \]

[In]

Integrate[(64*E^(-6 + x)*(-14 + 48*x + 32*x^2) + 16*E^(-4 + x)*(2 - 9*x + 8*x^2 - 16*x^3))/(2048/E^6 - (768*x)
/E^4 + (96*x^2)/E^2 - 4*x^3),x]

[Out]

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

Maple [A] (verified)

Time = 0.38 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.72

method result size
norman \(\frac {\left (4 \,{\mathrm e}^{4} {\mathrm e}^{x}-32 x \,{\mathrm e}^{4} {\mathrm e}^{x}+64 x^{2} {\mathrm e}^{4} {\mathrm e}^{x}\right ) {\mathrm e}^{-4}}{\left ({\mathrm e}^{2} x -8\right )^{2}}\) \(43\)
gosper \(\frac {4 \left (-1+4 x \right )^{2} {\mathrm e}^{x} {\mathrm e}^{-4}}{64 \,{\mathrm e}^{-4}-4 x \,{\mathrm e}^{2 \ln \left (2\right )-2}+x^{2}}\) \(48\)
parallelrisch \(\frac {16 \,{\mathrm e}^{-4} {\mathrm e}^{x}-128 \,{\mathrm e}^{-4} x \,{\mathrm e}^{x}+256 \,{\mathrm e}^{-4} x^{2} {\mathrm e}^{x}}{256 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{2 \ln \left (2\right )-2}+4 x^{2}}\) \(73\)
default \(8 \,{\mathrm e}^{-4} \left (-\frac {{\mathrm e}^{x} \left (-x +8 \,{\mathrm e}^{-2}-1\right )}{2 \left (64 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{-2}+x^{2}\right )}+\frac {{\mathrm e}^{8 \,{\mathrm e}^{-2}} \operatorname {Ei}_{1}\left (8 \,{\mathrm e}^{-2}-x \right )}{2}\right )-224 \,{\mathrm e}^{-6} \left (-\frac {{\mathrm e}^{x} \left (-x +8 \,{\mathrm e}^{-2}-1\right )}{2 \left (64 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{-2}+x^{2}\right )}+\frac {{\mathrm e}^{8 \,{\mathrm e}^{-2}} \operatorname {Ei}_{1}\left (8 \,{\mathrm e}^{-2}-x \right )}{2}\right )-36 \,{\mathrm e}^{-4} \left (-\frac {{\mathrm e}^{x} \left (32 \,{\mathrm e}^{-4}-4 x \,{\mathrm e}^{-2}+4 \,{\mathrm e}^{-2}-x \right )}{64 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{-2}+x^{2}}-\left (-4 \,{\mathrm e}^{-2}-1\right ) {\mathrm e}^{8 \,{\mathrm e}^{-2}} \operatorname {Ei}_{1}\left (8 \,{\mathrm e}^{-2}-x \right )\right )+32 \,{\mathrm e}^{-4} \left (-\frac {16 \,{\mathrm e}^{x} {\mathrm e}^{-2} \left (16 \,{\mathrm e}^{-4}-2 x \,{\mathrm e}^{-2}+6 \,{\mathrm e}^{-2}-x \right )}{64 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{-2}+x^{2}}-\left (-32 \,{\mathrm e}^{-4}-16 \,{\mathrm e}^{-2}-1\right ) {\mathrm e}^{8 \,{\mathrm e}^{-2}} \operatorname {Ei}_{1}\left (8 \,{\mathrm e}^{-2}-x \right )\right )-64 \,{\mathrm e}^{-4} \left (-{\mathrm e}^{x}-\frac {64 \,{\mathrm e}^{x} {\mathrm e}^{-4} \left (32 \,{\mathrm e}^{-4}-4 x \,{\mathrm e}^{-2}+20 \,{\mathrm e}^{-2}-3 x \right )}{64 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{-2}+x^{2}}-\left (-256 \,{\mathrm e}^{-6}-192 \,{\mathrm e}^{-4}-24 \,{\mathrm e}^{-2}\right ) {\mathrm e}^{8 \,{\mathrm e}^{-2}} \operatorname {Ei}_{1}\left (8 \,{\mathrm e}^{-2}-x \right )\right )+768 \,{\mathrm e}^{-6} \left (-\frac {{\mathrm e}^{x} \left (32 \,{\mathrm e}^{-4}-4 x \,{\mathrm e}^{-2}+4 \,{\mathrm e}^{-2}-x \right )}{64 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{-2}+x^{2}}-\left (-4 \,{\mathrm e}^{-2}-1\right ) {\mathrm e}^{8 \,{\mathrm e}^{-2}} \operatorname {Ei}_{1}\left (8 \,{\mathrm e}^{-2}-x \right )\right )+512 \,{\mathrm e}^{-6} \left (-\frac {16 \,{\mathrm e}^{x} {\mathrm e}^{-2} \left (16 \,{\mathrm e}^{-4}-2 x \,{\mathrm e}^{-2}+6 \,{\mathrm e}^{-2}-x \right )}{64 \,{\mathrm e}^{-4}-16 x \,{\mathrm e}^{-2}+x^{2}}-\left (-32 \,{\mathrm e}^{-4}-16 \,{\mathrm e}^{-2}-1\right ) {\mathrm e}^{8 \,{\mathrm e}^{-2}} \operatorname {Ei}_{1}\left (8 \,{\mathrm e}^{-2}-x \right )\right )\) \(487\)

[In]

int(((32*x^2+48*x-14)*exp(x)*exp(2*ln(2)-2)^3+(-16*x^3+8*x^2-9*x+2)*exp(x)*exp(2*ln(2)-2)^2)/(32*exp(2*ln(2)-2
)^3-48*x*exp(2*ln(2)-2)^2+24*x^2*exp(2*ln(2)-2)-4*x^3),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.12 \[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=\frac {{\left (16 \, x^{2} - 8 \, x + 1\right )} e^{\left (x + 6 \, \log \left (2\right ) - 6\right )}}{4 \, {\left (x^{2} e^{\left (2 \, \log \left (2\right ) - 2\right )} - 4 \, x e^{\left (4 \, \log \left (2\right ) - 4\right )} + 4 \, e^{\left (6 \, \log \left (2\right ) - 6\right )}\right )}} \]

[In]

integrate(((32*x^2+48*x-14)*exp(x)*exp(2*log(2)-2)^3+(-16*x^3+8*x^2-9*x+2)*exp(x)*exp(2*log(2)-2)^2)/(32*exp(2
*log(2)-2)^3-48*x*exp(2*log(2)-2)^2+24*x^2*exp(2*log(2)-2)-4*x^3),x, algorithm="fricas")

[Out]

1/4*(16*x^2 - 8*x + 1)*e^(x + 6*log(2) - 6)/(x^2*e^(2*log(2) - 2) - 4*x*e^(4*log(2) - 4) + 4*e^(6*log(2) - 6))

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08 \[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=\frac {\left (64 x^{2} - 32 x + 4\right ) e^{x}}{x^{2} e^{4} - 16 x e^{2} + 64} \]

[In]

integrate(((32*x**2+48*x-14)*exp(x)*exp(2*ln(2)-2)**3+(-16*x**3+8*x**2-9*x+2)*exp(x)*exp(2*ln(2)-2)**2)/(32*ex
p(2*ln(2)-2)**3-48*x*exp(2*ln(2)-2)**2+24*x**2*exp(2*ln(2)-2)-4*x**3),x)

[Out]

(64*x**2 - 32*x + 4)*exp(x)/(x**2*exp(4) - 16*x*exp(2) + 64)

Maxima [F]

\[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=\int { -\frac {2 \, {\left (16 \, x^{2} + 24 \, x - 7\right )} e^{\left (x + 6 \, \log \left (2\right ) - 6\right )} - {\left (16 \, x^{3} - 8 \, x^{2} + 9 \, x - 2\right )} e^{\left (x + 4 \, \log \left (2\right ) - 4\right )}}{4 \, {\left (x^{3} - 6 \, x^{2} e^{\left (2 \, \log \left (2\right ) - 2\right )} + 12 \, x e^{\left (4 \, \log \left (2\right ) - 4\right )} - 8 \, e^{\left (6 \, \log \left (2\right ) - 6\right )}\right )}} \,d x } \]

[In]

integrate(((32*x^2+48*x-14)*exp(x)*exp(2*log(2)-2)^3+(-16*x^3+8*x^2-9*x+2)*exp(x)*exp(2*log(2)-2)^2)/(32*exp(2
*log(2)-2)^3-48*x*exp(2*log(2)-2)^2+24*x^2*exp(2*log(2)-2)-4*x^3),x, algorithm="maxima")

[Out]

4*(16*x^3*e^2 - 8*x^2*(e^2 + 16) + x*(e^2 + 64))*e^x/(x^3*e^6 - 24*x^2*e^4 + 192*x*e^2 - 512) - 224*e^(8*e^(-2
) - 2)*exp_integral_e(3, -(x*e^2 - 8)*e^(-2))/(x*e^2 - 8)^2 - 1/4*integrate(128*(8*x*e^2 - 3*e^2 - 64)*e^x/(x^
4*e^8 - 32*x^3*e^6 + 384*x^2*e^4 - 2048*x*e^2 + 4096), x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.28 \[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=\frac {4 \, {\left (16 \, x^{2} e^{x} - 8 \, x e^{x} + e^{x}\right )}}{x^{2} e^{4} - 16 \, x e^{2} + 64} \]

[In]

integrate(((32*x^2+48*x-14)*exp(x)*exp(2*log(2)-2)^3+(-16*x^3+8*x^2-9*x+2)*exp(x)*exp(2*log(2)-2)^2)/(32*exp(2
*log(2)-2)^3-48*x*exp(2*log(2)-2)^2+24*x^2*exp(2*log(2)-2)-4*x^3),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.53 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {64 e^{-6+x} \left (-14+48 x+32 x^2\right )+16 e^{-4+x} \left (2-9 x+8 x^2-16 x^3\right )}{\frac {2048}{e^6}-\frac {768 x}{e^4}+\frac {96 x^2}{e^2}-4 x^3} \, dx=\frac {4\,{\mathrm {e}}^x\,{\left (4\,x-1\right )}^2}{{\left (x\,{\mathrm {e}}^2-8\right )}^2} \]

[In]

int((exp(6*log(2) - 6)*exp(x)*(48*x + 32*x^2 - 14) - exp(4*log(2) - 4)*exp(x)*(9*x - 8*x^2 + 16*x^3 - 2))/(32*
exp(6*log(2) - 6) - 48*x*exp(4*log(2) - 4) + 24*x^2*exp(2*log(2) - 2) - 4*x^3),x)

[Out]

(4*exp(x)*(4*x - 1)^2)/(x*exp(2) - 8)^2