3.29.95 \(\int \frac {1}{9} (e^{2 x} (-9-18 x)+e^x (27+27 x-x^2)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 49, normalized size of antiderivative = 1.88, number of steps used = 12, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {12, 2176, 2194, 2196} \begin {gather*} -\frac {1}{9} e^x x^2+\frac {29 e^x x}{9}-\frac {2 e^x}{9}+\frac {e^{2 x}}{2}-\frac {1}{2} e^{2 x} (2 x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^(2*x)*(-9 - 18*x) + E^x*(27 + 27*x - x^2))/9,x]

[Out]

(-2*E^x)/9 + E^(2*x)/2 + (29*E^x*x)/9 - (E^x*x^2)/9 - (E^(2*x)*(1 + 2*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 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 {1}{9} \int \left (e^{2 x} (-9-18 x)+e^x \left (27+27 x-x^2\right )\right ) \, dx\\ &=\frac {1}{9} \int e^{2 x} (-9-18 x) \, dx+\frac {1}{9} \int e^x \left (27+27 x-x^2\right ) \, dx\\ &=-\frac {1}{2} e^{2 x} (1+2 x)+\frac {1}{9} \int \left (27 e^x+27 e^x x-e^x x^2\right ) \, dx+\int e^{2 x} \, dx\\ &=\frac {e^{2 x}}{2}-\frac {1}{2} e^{2 x} (1+2 x)-\frac {1}{9} \int e^x x^2 \, dx+3 \int e^x \, dx+3 \int e^x x \, dx\\ &=3 e^x+\frac {e^{2 x}}{2}+3 e^x x-\frac {e^x x^2}{9}-\frac {1}{2} e^{2 x} (1+2 x)+\frac {2}{9} \int e^x x \, dx-3 \int e^x \, dx\\ &=\frac {e^{2 x}}{2}+\frac {29 e^x x}{9}-\frac {e^x x^2}{9}-\frac {1}{2} e^{2 x} (1+2 x)-\frac {2 \int e^x \, dx}{9}\\ &=-\frac {2 e^x}{9}+\frac {e^{2 x}}{2}+\frac {29 e^x x}{9}-\frac {e^x x^2}{9}-\frac {1}{2} e^{2 x} (1+2 x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(E^(2*x)*(-9 - 18*x) + E^x*(27 + 27*x - x^2))/9,x]

[Out]

-1/9*(E^x*(2 + (-29 + 9*E^x)*x + x^2))

________________________________________________________________________________________

fricas [A]  time = 0.97, size = 20, normalized size = 0.77 \begin {gather*} -x e^{\left (2 \, x\right )} - \frac {1}{9} \, {\left (x^{2} - 29 \, x + 2\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-18*x-9)*exp(x)^2+1/9*(-x^2+27*x+27)*exp(x),x, algorithm="fricas")

[Out]

-x*e^(2*x) - 1/9*(x^2 - 29*x + 2)*e^x

________________________________________________________________________________________

giac [A]  time = 0.29, size = 20, normalized size = 0.77 \begin {gather*} -x e^{\left (2 \, x\right )} - \frac {1}{9} \, {\left (x^{2} - 29 \, x + 2\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-18*x-9)*exp(x)^2+1/9*(-x^2+27*x+27)*exp(x),x, algorithm="giac")

[Out]

-x*e^(2*x) - 1/9*(x^2 - 29*x + 2)*e^x

________________________________________________________________________________________

maple [A]  time = 0.02, size = 23, normalized size = 0.88




method result size



risch \(-x \,{\mathrm e}^{2 x}+\frac {\left (-x^{2}+29 x -2\right ) {\mathrm e}^{x}}{9}\) \(23\)
default \(-x \,{\mathrm e}^{2 x}+\frac {29 \,{\mathrm e}^{x} x}{9}-\frac {2 \,{\mathrm e}^{x}}{9}-\frac {{\mathrm e}^{x} x^{2}}{9}\) \(25\)
norman \(-x \,{\mathrm e}^{2 x}+\frac {29 \,{\mathrm e}^{x} x}{9}-\frac {2 \,{\mathrm e}^{x}}{9}-\frac {{\mathrm e}^{x} x^{2}}{9}\) \(25\)
meijerg \(\frac {2}{9}-\frac {{\mathrm e}^{2 x}}{2}+\frac {\left (-4 x +2\right ) {\mathrm e}^{2 x}}{4}+3 \,{\mathrm e}^{x}-\frac {\left (3 x^{2}-6 x +6\right ) {\mathrm e}^{x}}{27}-\frac {3 \left (-2 x +2\right ) {\mathrm e}^{x}}{2}\) \(47\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/9*(-18*x-9)*exp(x)^2+1/9*(-x^2+27*x+27)*exp(x),x,method=_RETURNVERBOSE)

[Out]

-x*exp(2*x)+1/9*(-x^2+29*x-2)*exp(x)

________________________________________________________________________________________

maxima [A]  time = 0.55, size = 31, normalized size = 1.19 \begin {gather*} -x e^{\left (2 \, x\right )} - \frac {1}{9} \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 3 \, {\left (x - 1\right )} e^{x} + 3 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-18*x-9)*exp(x)^2+1/9*(-x^2+27*x+27)*exp(x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.66, size = 17, normalized size = 0.65 \begin {gather*} -\frac {{\mathrm {e}}^x\,\left (9\,x\,{\mathrm {e}}^x-29\,x+x^2+2\right )}{9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)*(27*x - x^2 + 27))/9 - (exp(2*x)*(18*x + 9))/9,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 19, normalized size = 0.73 \begin {gather*} - x e^{2 x} + \frac {\left (- x^{2} + 29 x - 2\right ) e^{x}}{9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-18*x-9)*exp(x)**2+1/9*(-x**2+27*x+27)*exp(x),x)

[Out]

-x*exp(2*x) + (-x**2 + 29*x - 2)*exp(x)/9

________________________________________________________________________________________