3.69.93 \(\int (2+e^x-2 x) \, dx\)

Optimal. Leaf size=17 \[ 5+e^x+2 x-x^2-\log (6) \]

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Int[2 + E^x - 2*x,x]

[Out]

E^x + 2*x - 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} &=2 x-x^2+\int e^x \, dx\\ &=e^x+2 x-x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 12, normalized size = 0.71 \begin {gather*} e^x+2 x-x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[2 + E^x - 2*x,x]

[Out]

E^x + 2*x - x^2

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 11, normalized size = 0.65 \begin {gather*} -x^{2} + 2 \, x + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x^2 + 2*x + e^x

________________________________________________________________________________________

giac [A]  time = 0.12, size = 11, normalized size = 0.65 \begin {gather*} -x^{2} + 2 \, x + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x^2 + 2*x + e^x

________________________________________________________________________________________

maple [A]  time = 0.01, size = 12, normalized size = 0.71




method result size



default \({\mathrm e}^{x}-x^{2}+2 x\) \(12\)
norman \({\mathrm e}^{x}-x^{2}+2 x\) \(12\)
risch \({\mathrm e}^{x}-x^{2}+2 x\) \(12\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 11, normalized size = 0.65 \begin {gather*} -x^{2} + 2 \, x + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x^2 + 2*x + e^x

________________________________________________________________________________________

mupad [B]  time = 4.01, size = 11, normalized size = 0.65 \begin {gather*} 2\,x+{\mathrm {e}}^x-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 8, normalized size = 0.47 \begin {gather*} - x^{2} + 2 x + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________