3.41.54 \(\int \frac {e^{2 x} (8-20 x+24 x^2-14 x^3+2 x^4)+e^{3+x} (-5184 x^3+3888 x^4-972 x^5+81 x^6)}{-5184 x^3+3888 x^4-972 x^5+81 x^6} \, dx\) [4054]

Optimal. Leaf size=28 \[ e^{3+x}+\frac {e^{2 x} (-1+x)^2}{81 (-4+x)^2 x^2} \]

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(62\) vs. \(2(28)=56\).
time = 0.54, antiderivative size = 62, normalized size of antiderivative = 2.21, number of steps used = 17, number of rules used = 5, integrand size = 78, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.064, Rules used = {6820, 2225, 6874, 2208, 2209} \begin {gather*} \frac {e^{2 x}}{1296 x^2}+e^{x+3}-\frac {e^{2 x}}{864 x}-\frac {e^{2 x}}{864 (4-x)}+\frac {e^{2 x}}{144 (4-x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^(2*x)*(8 - 20*x + 24*x^2 - 14*x^3 + 2*x^4) + E^(3 + x)*(-5184*x^3 + 3888*x^4 - 972*x^5 + 81*x^6))/(-518
4*x^3 + 3888*x^4 - 972*x^5 + 81*x^6),x]

[Out]

E^(3 + x) + E^(2*x)/(144*(4 - x)^2) - E^(2*x)/(864*(4 - x)) + E^(2*x)/(1296*x^2) - E^(2*x)/(864*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 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 {gather*} \begin {aligned} \text {integral} &=\int \left (e^{3+x}+\frac {2 e^{2 x} \left (4-10 x+12 x^2-7 x^3+x^4\right )}{81 (-4+x)^3 x^3}\right ) \, dx\\ &=\frac {2}{81} \int \frac {e^{2 x} \left (4-10 x+12 x^2-7 x^3+x^4\right )}{(-4+x)^3 x^3} \, dx+\int e^{3+x} \, dx\\ &=e^{3+x}+\frac {2}{81} \int \left (-\frac {9 e^{2 x}}{16 (-4+x)^3}+\frac {33 e^{2 x}}{64 (-4+x)^2}+\frac {3 e^{2 x}}{32 (-4+x)}-\frac {e^{2 x}}{16 x^3}+\frac {7 e^{2 x}}{64 x^2}-\frac {3 e^{2 x}}{32 x}\right ) \, dx\\ &=e^{3+x}-\frac {1}{648} \int \frac {e^{2 x}}{x^3} \, dx+\frac {1}{432} \int \frac {e^{2 x}}{-4+x} \, dx-\frac {1}{432} \int \frac {e^{2 x}}{x} \, dx+\frac {7 \int \frac {e^{2 x}}{x^2} \, dx}{2592}+\frac {11}{864} \int \frac {e^{2 x}}{(-4+x)^2} \, dx-\frac {1}{72} \int \frac {e^{2 x}}{(-4+x)^3} \, dx\\ &=e^{3+x}+\frac {e^{2 x}}{144 (4-x)^2}+\frac {11 e^{2 x}}{864 (4-x)}+\frac {e^{2 x}}{1296 x^2}-\frac {7 e^{2 x}}{2592 x}+\frac {1}{432} e^8 \text {Ei}(-2 (4-x))-\frac {\text {Ei}(2 x)}{432}-\frac {1}{648} \int \frac {e^{2 x}}{x^2} \, dx+\frac {7 \int \frac {e^{2 x}}{x} \, dx}{1296}-\frac {1}{72} \int \frac {e^{2 x}}{(-4+x)^2} \, dx+\frac {11}{432} \int \frac {e^{2 x}}{-4+x} \, dx\\ &=e^{3+x}+\frac {e^{2 x}}{144 (4-x)^2}-\frac {e^{2 x}}{864 (4-x)}+\frac {e^{2 x}}{1296 x^2}-\frac {e^{2 x}}{864 x}+\frac {1}{36} e^8 \text {Ei}(-2 (4-x))+\frac {\text {Ei}(2 x)}{324}-\frac {1}{324} \int \frac {e^{2 x}}{x} \, dx-\frac {1}{36} \int \frac {e^{2 x}}{-4+x} \, dx\\ &=e^{3+x}+\frac {e^{2 x}}{144 (4-x)^2}-\frac {e^{2 x}}{864 (4-x)}+\frac {e^{2 x}}{1296 x^2}-\frac {e^{2 x}}{864 x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.50, size = 48, normalized size = 1.71 \begin {gather*} e^{3+x}+\frac {2}{81} e^{2 x} \left (\frac {9}{32 (-4+x)^2}+\frac {3}{64 (-4+x)}+\frac {1}{32 x^2}-\frac {3}{64 x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^(2*x)*(8 - 20*x + 24*x^2 - 14*x^3 + 2*x^4) + E^(3 + x)*(-5184*x^3 + 3888*x^4 - 972*x^5 + 81*x^6))
/(-5184*x^3 + 3888*x^4 - 972*x^5 + 81*x^6),x]

[Out]

E^(3 + x) + (2*E^(2*x)*(9/(32*(-4 + x)^2) + 3/(64*(-4 + x)) + 1/(32*x^2) - 3/(64*x)))/81

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.15, size = 179, normalized size = 6.39

method result size
risch \(\frac {\left (x^{2}-2 x +1\right ) {\mathrm e}^{2 x}}{81 \left (x -4\right )^{2} x^{2}}+{\mathrm e}^{3+x}\) \(28\)
norman \(\frac {{\mathrm e}^{x} {\mathrm e}^{3} x^{4}+\frac {{\mathrm e}^{2 x}}{81}-\frac {2 x \,{\mathrm e}^{2 x}}{81}+\frac {{\mathrm e}^{2 x} x^{2}}{81}+16 x^{2} {\mathrm e}^{3} {\mathrm e}^{x}-8 \,{\mathrm e}^{x} {\mathrm e}^{3} x^{3}}{\left (x -4\right )^{2} x^{2}}\) \(59\)
default \(-\frac {{\mathrm e}^{2 x}}{864 x}+\frac {{\mathrm e}^{2 x}}{864 x -3456}+\frac {{\mathrm e}^{2 x}}{1296 x^{2}}+\frac {{\mathrm e}^{2 x}}{144 \left (x -4\right )^{2}}-64 \,{\mathrm e}^{3} \left (-\frac {{\mathrm e}^{x}}{2 \left (x -4\right )^{2}}-\frac {{\mathrm e}^{x}}{2 \left (x -4\right )}-\frac {{\mathrm e}^{4} \expIntegral \left (1, -x +4\right )}{2}\right )+48 \,{\mathrm e}^{3} \left (-\frac {3 \,{\mathrm e}^{x}}{x -4}-3 \,{\mathrm e}^{4} \expIntegral \left (1, -x +4\right )-\frac {2 \,{\mathrm e}^{x}}{\left (x -4\right )^{2}}\right )-12 \,{\mathrm e}^{3} \left (-\frac {16 \,{\mathrm e}^{x}}{x -4}-17 \,{\mathrm e}^{4} \expIntegral \left (1, -x +4\right )-\frac {8 \,{\mathrm e}^{x}}{\left (x -4\right )^{2}}\right )+{\mathrm e}^{3} \left ({\mathrm e}^{x}-\frac {80 \,{\mathrm e}^{x}}{x -4}-92 \,{\mathrm e}^{4} \expIntegral \left (1, -x +4\right )-\frac {32 \,{\mathrm e}^{x}}{\left (x -4\right )^{2}}\right )\) \(179\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((81*x^6-972*x^5+3888*x^4-5184*x^3)*exp(3+x)+(2*x^4-14*x^3+24*x^2-20*x+8)*exp(x)^2)/(81*x^6-972*x^5+3888*x
^4-5184*x^3),x,method=_RETURNVERBOSE)

[Out]

-1/864*exp(x)^2/x+1/864*exp(x)^2/(x-4)+1/1296*exp(x)^2/x^2+1/144*exp(x)^2/(x-4)^2-64*exp(3)*(-1/2*exp(x)/(x-4)
^2-1/2*exp(x)/(x-4)-1/2*exp(4)*Ei(1,-x+4))+48*exp(3)*(-3*exp(x)/(x-4)-3*exp(4)*Ei(1,-x+4)-2*exp(x)/(x-4)^2)-12
*exp(3)*(-16*exp(x)/(x-4)-17*exp(4)*Ei(1,-x+4)-8*exp(x)/(x-4)^2)+exp(3)*(exp(x)-80*exp(x)/(x-4)-92*exp(4)*Ei(1
,-x+4)-32*exp(x)/(x-4)^2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 57 vs. \(2 (24) = 48\).
time = 0.32, size = 57, normalized size = 2.04 \begin {gather*} \frac {{\left (x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} + 81 \, {\left (x^{4} e^{3} - 8 \, x^{3} e^{3} + 16 \, x^{2} e^{3}\right )} e^{x}}{81 \, {\left (x^{4} - 8 \, x^{3} + 16 \, x^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((81*x^6-972*x^5+3888*x^4-5184*x^3)*exp(3+x)+(2*x^4-14*x^3+24*x^2-20*x+8)*exp(x)^2)/(81*x^6-972*x^5+
3888*x^4-5184*x^3),x, algorithm="maxima")

[Out]

1/81*((x^2 - 2*x + 1)*e^(2*x) + 81*(x^4*e^3 - 8*x^3*e^3 + 16*x^2*e^3)*e^x)/(x^4 - 8*x^3 + 16*x^2)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 56 vs. \(2 (24) = 48\).
time = 0.39, size = 56, normalized size = 2.00 \begin {gather*} \frac {{\left ({\left (x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x + 6\right )} + 81 \, {\left (x^{4} - 8 \, x^{3} + 16 \, x^{2}\right )} e^{\left (x + 9\right )}\right )} e^{\left (-6\right )}}{81 \, {\left (x^{4} - 8 \, x^{3} + 16 \, x^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((81*x^6-972*x^5+3888*x^4-5184*x^3)*exp(3+x)+(2*x^4-14*x^3+24*x^2-20*x+8)*exp(x)^2)/(81*x^6-972*x^5+
3888*x^4-5184*x^3),x, algorithm="fricas")

[Out]

1/81*((x^2 - 2*x + 1)*e^(2*x + 6) + 81*(x^4 - 8*x^3 + 16*x^2)*e^(x + 9))*e^(-6)/(x^4 - 8*x^3 + 16*x^2)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (24) = 48\).
time = 0.09, size = 61, normalized size = 2.18 \begin {gather*} \frac {\left (x^{2} - 2 x + 1\right ) e^{2 x} + \left (81 x^{4} e^{3} - 648 x^{3} e^{3} + 1296 x^{2} e^{3}\right ) \sqrt {e^{2 x}}}{81 x^{4} - 648 x^{3} + 1296 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((81*x**6-972*x**5+3888*x**4-5184*x**3)*exp(3+x)+(2*x**4-14*x**3+24*x**2-20*x+8)*exp(x)**2)/(81*x**6
-972*x**5+3888*x**4-5184*x**3),x)

[Out]

((x**2 - 2*x + 1)*exp(2*x) + (81*x**4*exp(3) - 648*x**3*exp(3) + 1296*x**2*exp(3))*sqrt(exp(2*x)))/(81*x**4 -
648*x**3 + 1296*x**2)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (24) = 48\).
time = 0.42, size = 122, normalized size = 4.36 \begin {gather*} \frac {81 \, {\left (x + 3\right )}^{4} e^{\left (x + 9\right )} - 1620 \, {\left (x + 3\right )}^{3} e^{\left (x + 9\right )} + {\left (x + 3\right )}^{2} e^{\left (2 \, x + 6\right )} + 11502 \, {\left (x + 3\right )}^{2} e^{\left (x + 9\right )} - 8 \, {\left (x + 3\right )} e^{\left (2 \, x + 6\right )} - 34020 \, {\left (x + 3\right )} e^{\left (x + 9\right )} + 16 \, e^{\left (2 \, x + 6\right )} + 35721 \, e^{\left (x + 9\right )}}{81 \, {\left ({\left (x + 3\right )}^{4} e^{6} - 20 \, {\left (x + 3\right )}^{3} e^{6} + 142 \, {\left (x + 3\right )}^{2} e^{6} - 420 \, {\left (x + 3\right )} e^{6} + 441 \, e^{6}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((81*x^6-972*x^5+3888*x^4-5184*x^3)*exp(3+x)+(2*x^4-14*x^3+24*x^2-20*x+8)*exp(x)^2)/(81*x^6-972*x^5+
3888*x^4-5184*x^3),x, algorithm="giac")

[Out]

1/81*(81*(x + 3)^4*e^(x + 9) - 1620*(x + 3)^3*e^(x + 9) + (x + 3)^2*e^(2*x + 6) + 11502*(x + 3)^2*e^(x + 9) -
8*(x + 3)*e^(2*x + 6) - 34020*(x + 3)*e^(x + 9) + 16*e^(2*x + 6) + 35721*e^(x + 9))/((x + 3)^4*e^6 - 20*(x + 3
)^3*e^6 + 142*(x + 3)^2*e^6 - 420*(x + 3)*e^6 + 441*e^6)

________________________________________________________________________________________

Mupad [B]
time = 3.21, size = 55, normalized size = 1.96 \begin {gather*} \frac {{\mathrm {e}}^{x-3}\,\left ({\mathrm {e}}^{x+3}-2\,x\,{\mathrm {e}}^{x+3}+x^2\,{\mathrm {e}}^{x+3}+1296\,x^2\,{\mathrm {e}}^6-648\,x^3\,{\mathrm {e}}^6+81\,x^4\,{\mathrm {e}}^6\right )}{81\,x^2\,{\left (x-4\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(2*x)*(24*x^2 - 20*x - 14*x^3 + 2*x^4 + 8) - exp(x + 3)*(5184*x^3 - 3888*x^4 + 972*x^5 - 81*x^6))/(51
84*x^3 - 3888*x^4 + 972*x^5 - 81*x^6),x)

[Out]

(exp(x - 3)*(exp(x + 3) - 2*x*exp(x + 3) + x^2*exp(x + 3) + 1296*x^2*exp(6) - 648*x^3*exp(6) + 81*x^4*exp(6)))
/(81*x^2*(x - 4)^2)

________________________________________________________________________________________