3.52.72 \(\int (-6+6 e^{2 x/3}+2 x-2 e^{x/3} x) \, dx\)

Optimal. Leaf size=20 \[ -4+e^5+\left (-3 \left (1+e^{x/3}\right )+x\right )^2 \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 35, normalized size of antiderivative = 1.75, number of steps used = 4, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2194, 2176} \begin {gather*} x^2-6 e^{x/3} x-6 x+18 e^{x/3}+9 e^{2 x/3} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=-6 x+x^2-2 \int e^{x/3} x \, dx+6 \int e^{2 x/3} \, dx\\ &=9 e^{2 x/3}-6 x-6 e^{x/3} x+x^2+6 \int e^{x/3} \, dx\\ &=18 e^{x/3}+9 e^{2 x/3}-6 x-6 e^{x/3} x+x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 30, normalized size = 1.50 \begin {gather*} 9 e^{2 x/3}-6 x+x^2-2 e^{x/3} (-9+3 x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 25, normalized size = 1.25




method result size



risch \(9 \,{\mathrm e}^{\frac {2 x}{3}}-2 \left (3 x -9\right ) {\mathrm e}^{\frac {x}{3}}+x^{2}-6 x\) \(25\)
derivativedivides \(x^{2}-6 x +9 \,{\mathrm e}^{\frac {2 x}{3}}-6 x \,{\mathrm e}^{\frac {x}{3}}+18 \,{\mathrm e}^{\frac {x}{3}}\) \(29\)
default \(x^{2}-6 x +9 \,{\mathrm e}^{\frac {2 x}{3}}-6 x \,{\mathrm e}^{\frac {x}{3}}+18 \,{\mathrm e}^{\frac {x}{3}}\) \(29\)
norman \(x^{2}-6 x +9 \,{\mathrm e}^{\frac {2 x}{3}}-6 x \,{\mathrm e}^{\frac {x}{3}}+18 \,{\mathrm e}^{\frac {x}{3}}\) \(29\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 26, normalized size = 1.30 \begin {gather*} 18\,{\mathrm {e}}^{x/3}-6\,x+9\,{\mathrm {e}}^{\frac {2\,x}{3}}-6\,x\,{\mathrm {e}}^{x/3}+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*x + 6*exp((2*x)/3) - 2*x*exp(x/3) - 6,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 24, normalized size = 1.20 \begin {gather*} x^{2} - 6 x + \left (18 - 6 x\right ) e^{\frac {x}{3}} + 9 e^{\frac {2 x}{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2 - 6*x + (18 - 6*x)*exp(x/3) + 9*exp(2*x/3)

________________________________________________________________________________________