\(\int (5-2 x+2 e^2 x+e^{3 x} (-6 x^2+2 x^3+6 x^4)) \, dx\) [7842]

   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 = 33, antiderivative size = 27 \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=x \left (5-x+x \left (e^2+2 e^{3 x} \left (-x+x^2\right )\right )\right ) \]

[Out]

(5-x+x*(exp(2)+exp(3*x)*(2*x^2-2*x)))*x

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.33, number of steps used = 17, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {6, 1608, 2227, 2207, 2225} \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=2 e^{3 x} x^4-2 e^{3 x} x^3-\left (1-e^2\right ) x^2+5 x \]

[In]

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

[Out]

5*x - (1 - E^2)*x^2 - 2*E^(3*x)*x^3 + 2*E^(3*x)*x^4

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

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]

Rule 2227

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

Rubi steps \begin{align*} \text {integral}& = \int \left (5+\left (-2+2 e^2\right ) x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx \\ & = 5 x-\left (1-e^2\right ) x^2+\int e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right ) \, dx \\ & = 5 x-\left (1-e^2\right ) x^2+\int e^{3 x} x^2 \left (-6+2 x+6 x^2\right ) \, dx \\ & = 5 x-\left (1-e^2\right ) x^2+\int \left (-6 e^{3 x} x^2+2 e^{3 x} x^3+6 e^{3 x} x^4\right ) \, dx \\ & = 5 x-\left (1-e^2\right ) x^2+2 \int e^{3 x} x^3 \, dx-6 \int e^{3 x} x^2 \, dx+6 \int e^{3 x} x^4 \, dx \\ & = 5 x-2 e^{3 x} x^2-\left (1-e^2\right ) x^2+\frac {2}{3} e^{3 x} x^3+2 e^{3 x} x^4-2 \int e^{3 x} x^2 \, dx+4 \int e^{3 x} x \, dx-8 \int e^{3 x} x^3 \, dx \\ & = 5 x+\frac {4}{3} e^{3 x} x-\frac {8}{3} e^{3 x} x^2-\left (1-e^2\right ) x^2-2 e^{3 x} x^3+2 e^{3 x} x^4-\frac {4}{3} \int e^{3 x} \, dx+\frac {4}{3} \int e^{3 x} x \, dx+8 \int e^{3 x} x^2 \, dx \\ & = -\frac {4 e^{3 x}}{9}+5 x+\frac {16}{9} e^{3 x} x-\left (1-e^2\right ) x^2-2 e^{3 x} x^3+2 e^{3 x} x^4-\frac {4}{9} \int e^{3 x} \, dx-\frac {16}{3} \int e^{3 x} x \, dx \\ & = -\frac {16 e^{3 x}}{27}+5 x-\left (1-e^2\right ) x^2-2 e^{3 x} x^3+2 e^{3 x} x^4+\frac {16}{9} \int e^{3 x} \, dx \\ & = 5 x-\left (1-e^2\right ) x^2-2 e^{3 x} x^3+2 e^{3 x} x^4 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=5 x-x^2+e^2 x^2+2 e^{3 x} \left (-x^3+x^4\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15

method result size
norman \(\left ({\mathrm e}^{2}-1\right ) x^{2}+5 x -2 x^{3} {\mathrm e}^{3 x}+2 \,{\mathrm e}^{3 x} x^{4}\) \(31\)
risch \(\left (2 x^{4}-2 x^{3}\right ) {\mathrm e}^{3 x}+x^{2} {\mathrm e}^{2}-x^{2}+5 x\) \(32\)
derivativedivides \(5 x -x^{2}-2 x^{3} {\mathrm e}^{3 x}+2 \,{\mathrm e}^{3 x} x^{4}+x^{2} {\mathrm e}^{2}\) \(34\)
default \(5 x -x^{2}-2 x^{3} {\mathrm e}^{3 x}+2 \,{\mathrm e}^{3 x} x^{4}+x^{2} {\mathrm e}^{2}\) \(34\)
parallelrisch \(5 x -x^{2}-2 x^{3} {\mathrm e}^{3 x}+2 \,{\mathrm e}^{3 x} x^{4}+x^{2} {\mathrm e}^{2}\) \(34\)
parts \(5 x -x^{2}-2 x^{3} {\mathrm e}^{3 x}+2 \,{\mathrm e}^{3 x} x^{4}+x^{2} {\mathrm e}^{2}\) \(34\)

[In]

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

[Out]

(exp(2)-1)*x^2+5*x-2*x^3*exp(3*x)+2*exp(3*x)*x^4

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11 \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=x^{2} e^{2} - x^{2} + 2 \, {\left (x^{4} - x^{3}\right )} e^{\left (3 \, x\right )} + 5 \, x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=x^{2} \left (-1 + e^{2}\right ) + 5 x + \left (2 x^{4} - 2 x^{3}\right ) e^{3 x} \]

[In]

integrate((6*x**4+2*x**3-6*x**2)*exp(3*x)+2*exp(2)*x-2*x+5,x)

[Out]

x**2*(-1 + exp(2)) + 5*x + (2*x**4 - 2*x**3)*exp(3*x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11 \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=x^{2} e^{2} - x^{2} + 2 \, {\left (x^{4} - x^{3}\right )} e^{\left (3 \, x\right )} + 5 \, x \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11 \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=x^{2} e^{2} - x^{2} + 2 \, {\left (x^{4} - x^{3}\right )} e^{\left (3 \, x\right )} + 5 \, x \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11 \[ \int \left (5-2 x+2 e^2 x+e^{3 x} \left (-6 x^2+2 x^3+6 x^4\right )\right ) \, dx=5\,x-2\,x^3\,{\mathrm {e}}^{3\,x}+2\,x^4\,{\mathrm {e}}^{3\,x}+x^2\,\left ({\mathrm {e}}^2-1\right ) \]

[In]

int(2*x*exp(2) - 2*x + exp(3*x)*(2*x^3 - 6*x^2 + 6*x^4) + 5,x)

[Out]

5*x - 2*x^3*exp(3*x) + 2*x^4*exp(3*x) + x^2*(exp(2) - 1)