3.45.16 \(\int \frac {e^{-x} (e^x (84+132 x-108 x^2-72 x^3)+e^{2+e^{e^{2-x}}+e^{2-x}} (81-81 x-54 x^2+51 x^3+18 x^4-9 x^5-3 x^6))}{-27+27 x+18 x^2-17 x^3-6 x^4+3 x^5+x^6} \, dx\)

Optimal. Leaf size=30 \[ 2+3 \left (e^{e^{e^{2-x}}}+\left (3+\frac {2}{-3+x+x^2}\right )^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.49, antiderivative size = 42, normalized size of antiderivative = 1.40, number of steps used = 7, number of rules used = 5, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.047, Rules used = {6688, 2282, 2194, 1660, 629} \begin {gather*} -\frac {36}{-x^2-x+3}+\frac {12}{\left (-x^2-x+3\right )^2}+3 e^{e^{e^{2-x}}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^x*(84 + 132*x - 108*x^2 - 72*x^3) + E^(2 + E^E^(2 - x) + E^(2 - x))*(81 - 81*x - 54*x^2 + 51*x^3 + 18*x
^4 - 9*x^5 - 3*x^6))/(E^x*(-27 + 27*x + 18*x^2 - 17*x^3 - 6*x^4 + 3*x^5 + x^6)),x]

[Out]

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

Rule 629

Int[((d_) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d*(a + b*x + c*x^2)^(p +
 1))/(b*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 2194

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 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6688

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-3 e^{2+e^{e^{2-x}}+e^{2-x}-x}-\frac {12 \left (-7-11 x+9 x^2+6 x^3\right )}{\left (-3+x+x^2\right )^3}\right ) \, dx\\ &=-\left (3 \int e^{2+e^{e^{2-x}}+e^{2-x}-x} \, dx\right )-12 \int \frac {-7-11 x+9 x^2+6 x^3}{\left (-3+x+x^2\right )^3} \, dx\\ &=\frac {12}{\left (3-x-x^2\right )^2}+\frac {6}{13} \int \frac {-78-156 x}{\left (-3+x+x^2\right )^2} \, dx+3 \operatorname {Subst}\left (\int e^{2+e^{e^2 x}+e^2 x} \, dx,x,e^{-x}\right )\\ &=\frac {12}{\left (3-x-x^2\right )^2}-\frac {36}{3-x-x^2}+\frac {3 \operatorname {Subst}\left (\int e^{2+x} \, dx,x,e^{e^{2-x}}\right )}{e^2}\\ &=3 e^{e^{e^{2-x}}}+\frac {12}{\left (3-x-x^2\right )^2}-\frac {36}{3-x-x^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 34, normalized size = 1.13 \begin {gather*} 3 e^{e^{e^{2-x}}}+\frac {12}{\left (-3+x+x^2\right )^2}+\frac {36}{-3+x+x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^x*(84 + 132*x - 108*x^2 - 72*x^3) + E^(2 + E^E^(2 - x) + E^(2 - x))*(81 - 81*x - 54*x^2 + 51*x^3
+ 18*x^4 - 9*x^5 - 3*x^6))/(E^x*(-27 + 27*x + 18*x^2 - 17*x^3 - 6*x^4 + 3*x^5 + x^6)),x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.62, size = 96, normalized size = 3.20 \begin {gather*} \frac {3 \, {\left ({\left (x^{4} + 2 \, x^{3} - 5 \, x^{2} - 6 \, x + 9\right )} e^{\left ({\left (e^{2} + e^{\left (x + e^{\left (-x + 2\right )}\right )} + 2 \, e^{x}\right )} e^{\left (-x\right )}\right )} + 4 \, {\left (3 \, x^{2} + 3 \, x - 8\right )} e^{\left (e^{\left (-x + 2\right )} + 2\right )}\right )} e^{\left (-e^{\left (-x + 2\right )} - 2\right )}}{x^{4} + 2 \, x^{3} - 5 \, x^{2} - 6 \, x + 9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-3*x^6-9*x^5+18*x^4+51*x^3-54*x^2-81*x+81)*exp(2)*exp(exp(2)/exp(x))*exp(exp(exp(2)/exp(x)))+(-72*
x^3-108*x^2+132*x+84)*exp(x))/(x^6+3*x^5-6*x^4-17*x^3+18*x^2+27*x-27)/exp(x),x, algorithm="fricas")

[Out]

3*((x^4 + 2*x^3 - 5*x^2 - 6*x + 9)*e^((e^2 + e^(x + e^(-x + 2)) + 2*e^x)*e^(-x)) + 4*(3*x^2 + 3*x - 8)*e^(e^(-
x + 2) + 2))*e^(-e^(-x + 2) - 2)/(x^4 + 2*x^3 - 5*x^2 - 6*x + 9)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int -\frac {3 \, {\left (4 \, {\left (6 \, x^{3} + 9 \, x^{2} - 11 \, x - 7\right )} e^{x} + {\left (x^{6} + 3 \, x^{5} - 6 \, x^{4} - 17 \, x^{3} + 18 \, x^{2} + 27 \, x - 27\right )} e^{\left (e^{\left (-x + 2\right )} + e^{\left (e^{\left (-x + 2\right )}\right )} + 2\right )}\right )} e^{\left (-x\right )}}{x^{6} + 3 \, x^{5} - 6 \, x^{4} - 17 \, x^{3} + 18 \, x^{2} + 27 \, x - 27}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-3*x^6-9*x^5+18*x^4+51*x^3-54*x^2-81*x+81)*exp(2)*exp(exp(2)/exp(x))*exp(exp(exp(2)/exp(x)))+(-72*
x^3-108*x^2+132*x+84)*exp(x))/(x^6+3*x^5-6*x^4-17*x^3+18*x^2+27*x-27)/exp(x),x, algorithm="giac")

[Out]

integrate(-3*(4*(6*x^3 + 9*x^2 - 11*x - 7)*e^x + (x^6 + 3*x^5 - 6*x^4 - 17*x^3 + 18*x^2 + 27*x - 27)*e^(e^(-x
+ 2) + e^(e^(-x + 2)) + 2))*e^(-x)/(x^6 + 3*x^5 - 6*x^4 - 17*x^3 + 18*x^2 + 27*x - 27), x)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 43, normalized size = 1.43




method result size



risch \(\frac {36 x^{2}+36 x -96}{x^{4}+2 x^{3}-5 x^{2}-6 x +9}+3 \,{\mathrm e}^{{\mathrm e}^{{\mathrm e}^{2-x}}}\) \(43\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-3*x^6-9*x^5+18*x^4+51*x^3-54*x^2-81*x+81)*exp(2)*exp(exp(2)/exp(x))*exp(exp(exp(2)/exp(x)))+(-72*x^3-10
8*x^2+132*x+84)*exp(x))/(x^6+3*x^5-6*x^4-17*x^3+18*x^2+27*x-27)/exp(x),x,method=_RETURNVERBOSE)

[Out]

(36*x^2+36*x-96)/(x^4+2*x^3-5*x^2-6*x+9)+3*exp(exp(exp(2-x)))

________________________________________________________________________________________

maxima [B]  time = 0.68, size = 159, normalized size = 5.30 \begin {gather*} -\frac {36 \, {\left (18 \, x^{3} - 142 \, x^{2} - 84 \, x + 207\right )}}{169 \, {\left (x^{4} + 2 \, x^{3} - 5 \, x^{2} - 6 \, x + 9\right )}} + \frac {42 \, {\left (12 \, x^{3} + 18 \, x^{2} - 56 \, x - 31\right )}}{169 \, {\left (x^{4} + 2 \, x^{3} - 5 \, x^{2} - 6 \, x + 9\right )}} + \frac {54 \, {\left (10 \, x^{3} + 15 \, x^{2} + 66 \, x - 54\right )}}{169 \, {\left (x^{4} + 2 \, x^{3} - 5 \, x^{2} - 6 \, x + 9\right )}} - \frac {66 \, {\left (6 \, x^{3} + 9 \, x^{2} - 28 \, x + 69\right )}}{169 \, {\left (x^{4} + 2 \, x^{3} - 5 \, x^{2} - 6 \, x + 9\right )}} + 3 \, e^{\left (e^{\left (e^{\left (-x + 2\right )}\right )}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-3*x^6-9*x^5+18*x^4+51*x^3-54*x^2-81*x+81)*exp(2)*exp(exp(2)/exp(x))*exp(exp(exp(2)/exp(x)))+(-72*
x^3-108*x^2+132*x+84)*exp(x))/(x^6+3*x^5-6*x^4-17*x^3+18*x^2+27*x-27)/exp(x),x, algorithm="maxima")

[Out]

-36/169*(18*x^3 - 142*x^2 - 84*x + 207)/(x^4 + 2*x^3 - 5*x^2 - 6*x + 9) + 42/169*(12*x^3 + 18*x^2 - 56*x - 31)
/(x^4 + 2*x^3 - 5*x^2 - 6*x + 9) + 54/169*(10*x^3 + 15*x^2 + 66*x - 54)/(x^4 + 2*x^3 - 5*x^2 - 6*x + 9) - 66/1
69*(6*x^3 + 9*x^2 - 28*x + 69)/(x^4 + 2*x^3 - 5*x^2 - 6*x + 9) + 3*e^(e^(e^(-x + 2)))

________________________________________________________________________________________

mupad [B]  time = 3.29, size = 31, normalized size = 1.03 \begin {gather*} 3\,{\mathrm {e}}^{{\mathrm {e}}^{{\mathrm {e}}^{-x}\,{\mathrm {e}}^2}}+\frac {36\,x^2+36\,x-96}{{\left (x^2+x-3\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-x)*(exp(x)*(132*x - 108*x^2 - 72*x^3 + 84) - exp(2)*exp(exp(-x)*exp(2))*exp(exp(exp(-x)*exp(2)))*(81
*x + 54*x^2 - 51*x^3 - 18*x^4 + 9*x^5 + 3*x^6 - 81)))/(27*x + 18*x^2 - 17*x^3 - 6*x^4 + 3*x^5 + x^6 - 27),x)

[Out]

3*exp(exp(exp(-x)*exp(2))) + (36*x + 36*x^2 - 96)/(x + x^2 - 3)^2

________________________________________________________________________________________

sympy [A]  time = 0.43, size = 39, normalized size = 1.30 \begin {gather*} - \frac {- 36 x^{2} - 36 x + 96}{x^{4} + 2 x^{3} - 5 x^{2} - 6 x + 9} + 3 e^{e^{e^{2} e^{- x}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-3*x**6-9*x**5+18*x**4+51*x**3-54*x**2-81*x+81)*exp(2)*exp(exp(2)/exp(x))*exp(exp(exp(2)/exp(x)))+
(-72*x**3-108*x**2+132*x+84)*exp(x))/(x**6+3*x**5-6*x**4-17*x**3+18*x**2+27*x-27)/exp(x),x)

[Out]

-(-36*x**2 - 36*x + 96)/(x**4 + 2*x**3 - 5*x**2 - 6*x + 9) + 3*exp(exp(exp(2)*exp(-x)))

________________________________________________________________________________________