3.30.21 \(\int (2-6 x+e^{2 x} (2 x+2 x^2)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 18, normalized size of antiderivative = 0.86, number of steps used = 9, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1593, 2196, 2176, 2194} \begin {gather*} e^{2 x} x^2-3 x^2+2 x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1593

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

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} &=2 x-3 x^2+\int e^{2 x} \left (2 x+2 x^2\right ) \, dx\\ &=2 x-3 x^2+\int e^{2 x} x (2+2 x) \, dx\\ &=2 x-3 x^2+\int \left (2 e^{2 x} x+2 e^{2 x} x^2\right ) \, dx\\ &=2 x-3 x^2+2 \int e^{2 x} x \, dx+2 \int e^{2 x} x^2 \, dx\\ &=2 x+e^{2 x} x-3 x^2+e^{2 x} x^2-2 \int e^{2 x} x \, dx-\int e^{2 x} \, dx\\ &=-\frac {e^{2 x}}{2}+2 x-3 x^2+e^{2 x} x^2+\int e^{2 x} \, dx\\ &=2 x-3 x^2+e^{2 x} x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 18, normalized size = 0.86 \begin {gather*} 2 x-3 x^2+e^{2 x} x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.86, size = 17, normalized size = 0.81 \begin {gather*} x^{2} e^{\left (2 \, x\right )} - 3 \, x^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 17, normalized size = 0.81 \begin {gather*} x^{2} e^{\left (2 \, x\right )} - 3 \, x^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 18, normalized size = 0.86




method result size



derivativedivides \(2 x -3 x^{2}+{\mathrm e}^{2 x} x^{2}\) \(18\)
default \(2 x -3 x^{2}+{\mathrm e}^{2 x} x^{2}\) \(18\)
norman \(2 x -3 x^{2}+{\mathrm e}^{2 x} x^{2}\) \(18\)
risch \(2 x -3 x^{2}+{\mathrm e}^{2 x} x^{2}\) \(18\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 17, normalized size = 0.81 \begin {gather*} x^{2} e^{\left (2 \, x\right )} - 3 \, x^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 13, normalized size = 0.62 \begin {gather*} x\,\left (x\,{\mathrm {e}}^{2\,x}-3\,x+2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 15, normalized size = 0.71 \begin {gather*} x^{2} e^{2 x} - 3 x^{2} + 2 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2+2*x)*exp(2*x)-6*x+2,x)

[Out]

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

________________________________________________________________________________________