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

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

________________________________________________________________________________________

Rubi [B]  time = 0.06, antiderivative size = 37, normalized size of antiderivative = 2.31, number of steps used = 10, number of rules used = 3, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {2194, 2196, 2176} \begin {gather*} x^4-2 x^3-2 e^{x-1} x^2+x^2+2 e^{x-1} x+e^{2 x-2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 17, normalized size = 1.06 \begin {gather*} \frac {\left (e^x-e (-1+x) x\right )^2}{e^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(E^x - E*(-1 + x)*x)^2/E^2

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 31, normalized size = 1.94 \begin {gather*} x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{\left (x - 1\right )} + e^{\left (2 \, x - 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 31, normalized size = 1.94 \begin {gather*} x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{\left (x - 1\right )} + e^{\left (2 \, x - 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.09, size = 33, normalized size = 2.06




method result size



risch \({\mathrm e}^{2 x -2}+\left (-2 x^{2}+2 x \right ) {\mathrm e}^{x -1}+x^{4}-2 x^{3}+x^{2}\) \(33\)
norman \(x^{2}+x^{4}+{\mathrm e}^{2 x -2}-2 x^{3}+2 x \,{\mathrm e}^{x -1}-2 x^{2} {\mathrm e}^{x -1}\) \(35\)
default \(-2 \,{\mathrm e}^{x -1} \left (x -1\right )-2 \,{\mathrm e}^{x -1} \left (x -1\right )^{2}+x^{2}-2 x^{3}+x^{4}+{\mathrm e}^{2 x -2}\) \(39\)
derivativedivides \(2 x -2-2 \,{\mathrm e}^{x -1} \left (x -1\right )-2 \,{\mathrm e}^{x -1} \left (x -1\right )^{2}+\left (x -1\right )^{2}-2 x^{3}+x^{4}+{\mathrm e}^{2 x -2}\) \(45\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 31, normalized size = 1.94 \begin {gather*} x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{\left (x - 1\right )} + e^{\left (2 \, x - 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + exp(x - 1) - x^2)^2

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________