\(\int e^{3 x} x^2 \, dx\) [347]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 32 \[ \int e^{3 x} x^2 \, dx=\frac {2 e^{3 x}}{27}-\frac {2}{9} e^{3 x} x+\frac {1}{3} e^{3 x} x^2 \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2207, 2225} \[ \int e^{3 x} x^2 \, dx=\frac {1}{3} e^{3 x} x^2-\frac {2}{9} e^{3 x} x+\frac {2 e^{3 x}}{27} \]

[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 2207

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] &&  !TrueQ[$UseGamma]

Rule 2225

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*} \text {integral}& = \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] (verified)

Time = 0.02 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.59 \[ \int e^{3 x} x^2 \, dx=\frac {1}{27} e^{3 x} \left (2-6 x+9 x^2\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.50

method result size
risch \(\left (\frac {1}{3} x^{2}-\frac {2}{9} x +\frac {2}{27}\right ) {\mathrm e}^{3 x}\) \(16\)
gosper \(\frac {\left (9 x^{2}-6 x +2\right ) {\mathrm e}^{3 x}}{27}\) \(17\)
meijerg \(-\frac {2}{27}+\frac {\left (27 x^{2}-18 x +6\right ) {\mathrm e}^{3 x}}{81}\) \(19\)
derivativedivides \(\frac {2 \,{\mathrm e}^{3 x}}{27}-\frac {2 \,{\mathrm e}^{3 x} x}{9}+\frac {{\mathrm e}^{3 x} x^{2}}{3}\) \(24\)
default \(\frac {2 \,{\mathrm e}^{3 x}}{27}-\frac {2 \,{\mathrm e}^{3 x} x}{9}+\frac {{\mathrm e}^{3 x} x^{2}}{3}\) \(24\)
norman \(\frac {2 \,{\mathrm e}^{3 x}}{27}-\frac {2 \,{\mathrm e}^{3 x} x}{9}+\frac {{\mathrm e}^{3 x} x^{2}}{3}\) \(24\)
parallelrisch \(\frac {2 \,{\mathrm e}^{3 x}}{27}-\frac {2 \,{\mathrm e}^{3 x} x}{9}+\frac {{\mathrm e}^{3 x} x^{2}}{3}\) \(24\)
parts \(\frac {2 \,{\mathrm e}^{3 x}}{27}-\frac {2 \,{\mathrm e}^{3 x} x}{9}+\frac {{\mathrm e}^{3 x} x^{2}}{3}\) \(24\)

[In]

int(exp(3*x)*x^2,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.50 \[ \int e^{3 x} x^2 \, dx=\frac {1}{27} \, {\left (9 \, x^{2} - 6 \, x + 2\right )} e^{\left (3 \, x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.47 \[ \int e^{3 x} x^2 \, dx=\frac {\left (9 x^{2} - 6 x + 2\right ) e^{3 x}}{27} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.50 \[ \int e^{3 x} x^2 \, dx=\frac {1}{27} \, {\left (9 \, x^{2} - 6 \, x + 2\right )} e^{\left (3 \, x\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.50 \[ \int e^{3 x} x^2 \, dx=\frac {1}{27} \, {\left (9 \, x^{2} - 6 \, x + 2\right )} e^{\left (3 \, x\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.50 \[ \int e^{3 x} x^2 \, dx=\frac {{\mathrm {e}}^{3\,x}\,\left (9\,x^2-6\,x+2\right )}{27} \]

[In]

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

[Out]

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