\(\int (-3+30 x-12 x^2+e^{3 x} (1+3 x)) \, dx\) [3774]

   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 = 21, antiderivative size = 26 \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=-6+e^2-x \left (3-e^{3 x}+x-4 (4-x) x\right ) \]

[Out]

exp(2)-6-x*(x-exp(3*x)-x*(-4*x+16)+3)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.42, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2207, 2225} \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=-4 x^3+15 x^2-3 x-\frac {e^{3 x}}{3}+\frac {1}{3} e^{3 x} (3 x+1) \]

[In]

Int[-3 + 30*x - 12*x^2 + E^(3*x)*(1 + 3*x),x]

[Out]

-1/3*E^(3*x) - 3*x + 15*x^2 - 4*x^3 + (E^(3*x)*(1 + 3*x))/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}& = -3 x+15 x^2-4 x^3+\int e^{3 x} (1+3 x) \, dx \\ & = -3 x+15 x^2-4 x^3+\frac {1}{3} e^{3 x} (1+3 x)-\int e^{3 x} \, dx \\ & = -\frac {e^{3 x}}{3}-3 x+15 x^2-4 x^3+\frac {1}{3} e^{3 x} (1+3 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.81 \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=-3 x+e^{3 x} x+15 x^2-4 x^3 \]

[In]

Integrate[-3 + 30*x - 12*x^2 + E^(3*x)*(1 + 3*x),x]

[Out]

-3*x + E^(3*x)*x + 15*x^2 - 4*x^3

Maple [A] (verified)

Time = 0.44 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.81

method result size
derivativedivides \(-3 x +15 x^{2}-4 x^{3}+x \,{\mathrm e}^{3 x}\) \(21\)
default \(-3 x +15 x^{2}-4 x^{3}+x \,{\mathrm e}^{3 x}\) \(21\)
norman \(-3 x +15 x^{2}-4 x^{3}+x \,{\mathrm e}^{3 x}\) \(21\)
risch \(-3 x +15 x^{2}-4 x^{3}+x \,{\mathrm e}^{3 x}\) \(21\)
parallelrisch \(-3 x +15 x^{2}-4 x^{3}+x \,{\mathrm e}^{3 x}\) \(21\)
parts \(-3 x +15 x^{2}-4 x^{3}+x \,{\mathrm e}^{3 x}\) \(21\)

[In]

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

[Out]

-3*x+15*x^2-4*x^3+x*exp(3*x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=-4 \, x^{3} + 15 \, x^{2} + x e^{\left (3 \, x\right )} - 3 \, x \]

[In]

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

[Out]

-4*x^3 + 15*x^2 + x*e^(3*x) - 3*x

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.73 \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=- 4 x^{3} + 15 x^{2} + x e^{3 x} - 3 x \]

[In]

integrate((1+3*x)*exp(3*x)-12*x**2+30*x-3,x)

[Out]

-4*x**3 + 15*x**2 + x*exp(3*x) - 3*x

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=-4 \, x^{3} + 15 \, x^{2} + x e^{\left (3 \, x\right )} - 3 \, x \]

[In]

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

[Out]

-4*x^3 + 15*x^2 + x*e^(3*x) - 3*x

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=-4 \, x^{3} + 15 \, x^{2} + x e^{\left (3 \, x\right )} - 3 \, x \]

[In]

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

[Out]

-4*x^3 + 15*x^2 + x*e^(3*x) - 3*x

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.62 \[ \int \left (-3+30 x-12 x^2+e^{3 x} (1+3 x)\right ) \, dx=x\,\left (15\,x+{\mathrm {e}}^{3\,x}-4\,x^2-3\right ) \]

[In]

int(30*x + exp(3*x)*(3*x + 1) - 12*x^2 - 3,x)

[Out]

x*(15*x + exp(3*x) - 4*x^2 - 3)