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

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.58, number of steps used = 4, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {12, 2176, 2194} \begin {gather*} \frac {x^3}{6}-\frac {2 x}{3}+\frac {2 e^x}{3}-\frac {2}{3} e^x (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

(-4*x - 4*E^x*x + x^3)/6

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 14, normalized size = 0.74 \begin {gather*} \frac {1}{6} \, x^{3} - \frac {2}{3} \, x e^{x} - \frac {2}{3} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*x^3 - 2/3*x*e^x - 2/3*x

________________________________________________________________________________________

giac [A]  time = 0.22, size = 14, normalized size = 0.74 \begin {gather*} \frac {1}{6} \, x^{3} - \frac {2}{3} \, x e^{x} - \frac {2}{3} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*x^3 - 2/3*x*e^x - 2/3*x

________________________________________________________________________________________

maple [A]  time = 0.02, size = 15, normalized size = 0.79




method result size



default \(-\frac {2 x}{3}+\frac {x^{3}}{6}-\frac {2 \,{\mathrm e}^{x} x}{3}\) \(15\)
norman \(-\frac {2 x}{3}+\frac {x^{3}}{6}-\frac {2 \,{\mathrm e}^{x} x}{3}\) \(15\)
risch \(-\frac {2 x}{3}+\frac {x^{3}}{6}-\frac {2 \,{\mathrm e}^{x} x}{3}\) \(15\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/3*x+1/6*x^3-2/3*exp(x)*x

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 14, normalized size = 0.74 \begin {gather*} \frac {1}{6} \, x^{3} - \frac {2}{3} \, x e^{x} - \frac {2}{3} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*x^3 - 2/3*x*e^x - 2/3*x

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 14, normalized size = 0.74 \begin {gather*} -\frac {x\,\left (4\,{\mathrm {e}}^x-x^2+4\right )}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x*(4*exp(x) - x^2 + 4))/6

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 17, normalized size = 0.89 \begin {gather*} \frac {x^{3}}{6} - \frac {2 x e^{x}}{3} - \frac {2 x}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**3/6 - 2*x*exp(x)/3 - 2*x/3

________________________________________________________________________________________