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

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 21, normalized size of antiderivative = 0.70, number of steps used = 3, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {2194} \begin {gather*} 2 x^2+x-2 e^x-e^{2 x+2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=x+2 x^2-2 \int e^x \, dx-2 \int e^{2+2 x} \, dx\\ &=-2 e^x-e^{2+2 x}+x+2 x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.74, size = 19, normalized size = 0.63 \begin {gather*} 2 \, x^{2} + x - e^{\left (2 \, x + 2\right )} - 2 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 19, normalized size = 0.63 \begin {gather*} 2 \, x^{2} + x - e^{\left (2 \, x + 2\right )} - 2 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 20, normalized size = 0.67




method result size



default \(2 x^{2}+x -{\mathrm e}^{2 x +2}-2 \,{\mathrm e}^{x}\) \(20\)
risch \(2 x^{2}+x -{\mathrm e}^{2 x +2}-2 \,{\mathrm e}^{x}\) \(20\)
norman \(x +2 x^{2}-{\mathrm e}^{2} {\mathrm e}^{2 x}-2 \,{\mathrm e}^{x}\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 19, normalized size = 0.63 \begin {gather*} 2 \, x^{2} + x - e^{\left (2 \, x + 2\right )} - 2 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 19, normalized size = 0.63 \begin {gather*} x-{\mathrm {e}}^{2\,x+2}-2\,{\mathrm {e}}^x+2\,x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 19, normalized size = 0.63 \begin {gather*} 2 x^{2} + x - e^{2} e^{2 x} - 2 e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________