3.64.49 \(\int (12-2 e^{2 x}-2 x+2 e^x x) \, dx\)

Optimal. Leaf size=23 \[ -4+10 x-\left (-1-e^x+x\right )^2-2 \log (2)+\log (3) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.17, number of steps used = 4, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2194, 2176} \begin {gather*} -x^2+2 e^x x+12 x-2 e^x-e^{2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 22, normalized size = 0.96 \begin {gather*} -x^{2} + 2 \, {\left (x - 1\right )} e^{x} + 12 \, 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*exp(x)*x-2*x+12,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.20, size = 22, normalized size = 0.96 \begin {gather*} -x^{2} + 2 \, {\left (x - 1\right )} e^{x} + 12 \, 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*exp(x)*x-2*x+12,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 23, normalized size = 1.00




method result size



risch \(-{\mathrm e}^{2 x}+2 \left (x -1\right ) {\mathrm e}^{x}-x^{2}+12 x\) \(23\)
default \(-x^{2}+12 x -{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x -2 \,{\mathrm e}^{x}\) \(25\)
norman \(-x^{2}+12 x -{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x -2 \,{\mathrm e}^{x}\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 22, normalized size = 0.96 \begin {gather*} -x^{2} + 2 \, {\left (x - 1\right )} e^{x} + 12 \, 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*exp(x)*x-2*x+12,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.02, size = 24, normalized size = 1.04 \begin {gather*} 12\,x-{\mathrm {e}}^{2\,x}-2\,{\mathrm {e}}^x+2\,x\,{\mathrm {e}}^x-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 19, normalized size = 0.83 \begin {gather*} - x^{2} + 12 x + \left (2 x - 2\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*exp(x)*x-2*x+12,x)

[Out]

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

________________________________________________________________________________________