3.9.92 \(\int (2 e^{2 x}+12 x+4 x^3+e^x (-6-4 x-2 x^2)) \, dx\)

Optimal. Leaf size=12 \[ \left (3-e^x+x^2\right )^2 \]

________________________________________________________________________________________

Rubi [B]  time = 0.05, antiderivative size = 27, normalized size of antiderivative = 2.25, number of steps used = 10, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2194, 2196, 2176} \begin {gather*} x^4-2 e^x x^2+6 x^2-6 e^x+e^{2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-6*E^x + E^(2*x) + 6*x^2 - 2*E^x*x^2 + x^4

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]

Rule 2196

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] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=6 x^2+x^4+2 \int e^{2 x} \, dx+\int e^x \left (-6-4 x-2 x^2\right ) \, dx\\ &=e^{2 x}+6 x^2+x^4+\int \left (-6 e^x-4 e^x x-2 e^x x^2\right ) \, dx\\ &=e^{2 x}+6 x^2+x^4-2 \int e^x x^2 \, dx-4 \int e^x x \, dx-6 \int e^x \, dx\\ &=-6 e^x+e^{2 x}-4 e^x x+6 x^2-2 e^x x^2+x^4+4 \int e^x \, dx+4 \int e^x x \, dx\\ &=-2 e^x+e^{2 x}+6 x^2-2 e^x x^2+x^4-4 \int e^x \, dx\\ &=-6 e^x+e^{2 x}+6 x^2-2 e^x x^2+x^4\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.01, size = 34, normalized size = 2.83 \begin {gather*} 2 \left (\frac {e^{2 x}}{2}+3 x^2+\frac {x^4}{2}-e^x \left (3+x^2\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.77, size = 22, normalized size = 1.83 \begin {gather*} x^{4} + 6 \, x^{2} - 2 \, {\left (x^{2} + 3\right )} e^{x} + e^{\left (2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.25, size = 22, normalized size = 1.83 \begin {gather*} x^{4} + 6 \, x^{2} - 2 \, {\left (x^{2} + 3\right )} e^{x} + e^{\left (2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.03, size = 25, normalized size = 2.08




method result size



default \(-2 \,{\mathrm e}^{x} x^{2}-6 \,{\mathrm e}^{x}+6 x^{2}+x^{4}+{\mathrm e}^{2 x}\) \(25\)
norman \(-2 \,{\mathrm e}^{x} x^{2}-6 \,{\mathrm e}^{x}+6 x^{2}+x^{4}+{\mathrm e}^{2 x}\) \(25\)
risch \(-2 \,{\mathrm e}^{x} x^{2}-6 \,{\mathrm e}^{x}+6 x^{2}+x^{4}+{\mathrm e}^{2 x}\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*exp(x)*x^2-6*exp(x)+6*x^2+x^4+exp(x)^2

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 22, normalized size = 1.83 \begin {gather*} x^{4} + 6 \, x^{2} - 2 \, {\left (x^{2} + 3\right )} e^{x} + e^{\left (2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 24, normalized size = 2.00 \begin {gather*} {\mathrm {e}}^{2\,x}-6\,{\mathrm {e}}^x-2\,x^2\,{\mathrm {e}}^x+6\,x^2+x^4 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(2*x) - 6*exp(x) - 2*x^2*exp(x) + 6*x^2 + x^4

________________________________________________________________________________________

sympy [B]  time = 0.10, size = 24, normalized size = 2.00 \begin {gather*} x^{4} + 6 x^{2} + \left (- 2 x^{2} - 6\right ) e^{x} + e^{2 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________