3.347 \(\int e^{3 x} x^2 \, dx\)

Optimal. Leaf size=32 \[ \frac{1}{3} e^{3 x} x^2-\frac{2}{9} e^{3 x} x+\frac{2 e^{3 x}}{27} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0194959, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2176, 2194} \[ \frac{1}{3} e^{3 x} x^2-\frac{2}{9} e^{3 x} x+\frac{2 e^{3 x}}{27} \]

Antiderivative was successfully verified.

[In]

Int[E^(3*x)*x^2,x]

[Out]

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

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{align*} \int e^{3 x} x^2 \, dx &=\frac{1}{3} e^{3 x} x^2-\frac{2}{3} \int e^{3 x} x \, dx\\ &=-\frac{2}{9} e^{3 x} x+\frac{1}{3} e^{3 x} x^2+\frac{2}{9} \int e^{3 x} \, dx\\ &=\frac{2 e^{3 x}}{27}-\frac{2}{9} e^{3 x} x+\frac{1}{3} e^{3 x} x^2\\ \end{align*}

Mathematica [A]  time = 0.00593, size = 19, normalized size = 0.59 \[ \frac{1}{27} e^{3 x} \left (9 x^2-6 x+2\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[E^(3*x)*x^2,x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 17, normalized size = 0.5 \begin{align*}{\frac{ \left ( 9\,{x}^{2}-6\,x+2 \right ){{\rm e}^{3\,x}}}{27}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(3*x)*x^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.941502, size = 22, normalized size = 0.69 \begin{align*} \frac{1}{27} \,{\left (9 \, x^{2} - 6 \, x + 2\right )} e^{\left (3 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(3*x)*x^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.73333, size = 43, normalized size = 1.34 \begin{align*} \frac{1}{27} \,{\left (9 \, x^{2} - 6 \, x + 2\right )} e^{\left (3 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(3*x)*x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.079068, size = 15, normalized size = 0.47 \begin{align*} \frac{\left (9 x^{2} - 6 x + 2\right ) e^{3 x}}{27} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(3*x)*x**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.06645, size = 22, normalized size = 0.69 \begin{align*} \frac{1}{27} \,{\left (9 \, x^{2} - 6 \, x + 2\right )} e^{\left (3 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(3*x)*x^2,x, algorithm="giac")

[Out]

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