3.31.18 \(\int \frac {6-6 x-6 x^2+4 x^3+e^x (4 x-x^2-x^3)}{9 e^3} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.09, antiderivative size = 63, normalized size of antiderivative = 2.33, number of steps used = 14, number of rules used = 5, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 1594, 2196, 2176, 2194} \begin {gather*} \frac {x^4}{9 e^3}-\frac {1}{9} e^{x-3} x^3-\frac {2 x^3}{9 e^3}+\frac {2}{9} e^{x-3} x^2-\frac {x^2}{3 e^3}+\frac {2 x}{3 e^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(6 - 6*x - 6*x^2 + 4*x^3 + E^x*(4*x - x^2 - x^3))/(9*E^3),x]

[Out]

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

Rule 12

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

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), 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] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

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 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \left (6-6 x-6 x^2+4 x^3+e^x \left (4 x-x^2-x^3\right )\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}+\frac {\int e^x \left (4 x-x^2-x^3\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}+\frac {\int e^x x \left (4-x-x^2\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}+\frac {\int \left (4 e^x x-e^x x^2-e^x x^3\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}-\frac {\int e^x x^2 \, dx}{9 e^3}-\frac {\int e^x x^3 \, dx}{9 e^3}+\frac {4 \int e^x x \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}+\frac {4}{9} e^{-3+x} x-\frac {x^2}{3 e^3}-\frac {1}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}+\frac {2 \int e^x x \, dx}{9 e^3}+\frac {\int e^x x^2 \, dx}{3 e^3}-\frac {4 \int e^x \, dx}{9 e^3}\\ &=-\frac {4}{9} e^{-3+x}+\frac {2 x}{3 e^3}+\frac {2}{3} e^{-3+x} x-\frac {x^2}{3 e^3}+\frac {2}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}-\frac {2 \int e^x \, dx}{9 e^3}-\frac {2 \int e^x x \, dx}{3 e^3}\\ &=-\frac {2}{3} e^{-3+x}+\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}+\frac {2}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}+\frac {2 \int e^x \, dx}{3 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}+\frac {2}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 22, normalized size = 0.81 \begin {gather*} \frac {(-2+x) x \left (-3-e^x x+x^2\right )}{9 e^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(6 - 6*x - 6*x^2 + 4*x^3 + E^x*(4*x - x^2 - x^3))/(9*E^3),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.61, size = 34, normalized size = 1.26 \begin {gather*} \frac {1}{9} \, {\left (x^{4} - 2 \, x^{3} - 3 \, x^{2} - {\left (x^{3} - 2 \, x^{2}\right )} e^{x} + 6 \, x\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*((-x^3-x^2+4*x)*exp(x)+4*x^3-6*x^2-6*x+6)/exp(3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.50, size = 34, normalized size = 1.26 \begin {gather*} \frac {1}{9} \, {\left (x^{4} - 2 \, x^{3} - 3 \, x^{2} - {\left (x^{3} - 2 \, x^{2}\right )} e^{x} + 6 \, x\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*((-x^3-x^2+4*x)*exp(x)+4*x^3-6*x^2-6*x+6)/exp(3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 38, normalized size = 1.41




method result size



default \(\frac {{\mathrm e}^{-3} \left (6 x +2 \,{\mathrm e}^{x} x^{2}-{\mathrm e}^{x} x^{3}-3 x^{2}-2 x^{3}+x^{4}\right )}{9}\) \(38\)
risch \(\frac {{\mathrm e}^{-3} x^{4}}{9}-\frac {2 \,{\mathrm e}^{-3} x^{3}}{9}-\frac {x^{2} {\mathrm e}^{-3}}{3}+\frac {2 \,{\mathrm e}^{-3} x}{3}+\frac {\left (-x^{3}+2 x^{2}\right ) {\mathrm e}^{x -3}}{9}\) \(45\)
norman \(\frac {2 \,{\mathrm e}^{-3} x}{3}-\frac {x^{2} {\mathrm e}^{-3}}{3}-\frac {2 \,{\mathrm e}^{-3} x^{3}}{9}+\frac {{\mathrm e}^{-3} x^{4}}{9}+\frac {2 x^{2} {\mathrm e}^{-3} {\mathrm e}^{x}}{9}-\frac {{\mathrm e}^{-3} x^{3} {\mathrm e}^{x}}{9}\) \(58\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/9*((-x^3-x^2+4*x)*exp(x)+4*x^3-6*x^2-6*x+6)/exp(3),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 34, normalized size = 1.26 \begin {gather*} \frac {1}{9} \, {\left (x^{4} - 2 \, x^{3} - 3 \, x^{2} - {\left (x^{3} - 2 \, x^{2}\right )} e^{x} + 6 \, x\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*((-x^3-x^2+4*x)*exp(x)+4*x^3-6*x^2-6*x+6)/exp(3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 19, normalized size = 0.70 \begin {gather*} -\frac {x\,{\mathrm {e}}^{-3}\,\left (x-2\right )\,\left (x\,{\mathrm {e}}^x-x^2+3\right )}{9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-exp(-3)*((2*x)/3 + (exp(x)*(x^2 - 4*x + x^3))/9 + (2*x^2)/3 - (4*x^3)/9 - 2/3),x)

[Out]

-(x*exp(-3)*(x - 2)*(x*exp(x) - x^2 + 3))/9

________________________________________________________________________________________

sympy [B]  time = 0.14, size = 51, normalized size = 1.89 \begin {gather*} \frac {x^{4}}{9 e^{3}} - \frac {2 x^{3}}{9 e^{3}} - \frac {x^{2}}{3 e^{3}} + \frac {2 x}{3 e^{3}} + \frac {\left (- x^{3} + 2 x^{2}\right ) e^{x}}{9 e^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*((-x**3-x**2+4*x)*exp(x)+4*x**3-6*x**2-6*x+6)/exp(3),x)

[Out]

x**4*exp(-3)/9 - 2*x**3*exp(-3)/9 - x**2*exp(-3)/3 + 2*x*exp(-3)/3 + (-x**3 + 2*x**2)*exp(-3)*exp(x)/9

________________________________________________________________________________________