3.61.82 \(\int \frac {1}{2} (-4+20 x+36 x^2+8 x^3+e^x (5+7 x+x^2)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 35, normalized size of antiderivative = 1.67, number of steps used = 10, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {12, 2196, 2194, 2176} \begin {gather*} x^4+6 x^3+\frac {e^x x^2}{2}+5 x^2+\frac {5 e^x x}{2}-2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-4 + 20*x + 36*x^2 + 8*x^3 + E^x*(5 + 7*x + x^2))/2,x]

[Out]

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

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]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 31, normalized size = 1.48 \begin {gather*} -2 x+5 x^2+6 x^3+x^4+\frac {1}{2} e^x \left (5 x+x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-4 + 20*x + 36*x^2 + 8*x^3 + E^x*(5 + 7*x + x^2))/2,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 28, normalized size = 1.33 \begin {gather*} x^{4} + 6 \, x^{3} + 5 \, x^{2} + \frac {1}{2} \, {\left (x^{2} + 5 \, x\right )} e^{x} - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(x^2+7*x+5)*exp(x)+4*x^3+18*x^2+10*x-2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.24, size = 28, normalized size = 1.33 \begin {gather*} x^{4} + 6 \, x^{3} + 5 \, x^{2} + \frac {1}{2} \, {\left (x^{2} + 5 \, x\right )} e^{x} - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(x^2+7*x+5)*exp(x)+4*x^3+18*x^2+10*x-2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 29, normalized size = 1.38




method result size



risch \(\frac {\left (x^{2}+5 x \right ) {\mathrm e}^{x}}{2}+x^{4}+6 x^{3}+5 x^{2}-2 x\) \(29\)
default \(x^{4}+6 x^{3}+5 x^{2}-2 x +\frac {{\mathrm e}^{x} x^{2}}{2}+\frac {5 \,{\mathrm e}^{x} x}{2}\) \(30\)
norman \(x^{4}+6 x^{3}+5 x^{2}-2 x +\frac {{\mathrm e}^{x} x^{2}}{2}+\frac {5 \,{\mathrm e}^{x} x}{2}\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*(x^2+7*x+5)*exp(x)+4*x^3+18*x^2+10*x-2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(x^2+7*x+5)*exp(x)+4*x^3+18*x^2+10*x-2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.23, size = 26, normalized size = 1.24 \begin {gather*} \frac {x\,\left (10\,x+5\,{\mathrm {e}}^x+x\,{\mathrm {e}}^x+12\,x^2+2\,x^3-4\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(10*x + (exp(x)*(7*x + x^2 + 5))/2 + 18*x^2 + 4*x^3 - 2,x)

[Out]

(x*(10*x + 5*exp(x) + x*exp(x) + 12*x^2 + 2*x^3 - 4))/2

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 27, normalized size = 1.29 \begin {gather*} x^{4} + 6 x^{3} + 5 x^{2} - 2 x + \frac {\left (x^{2} + 5 x\right ) e^{x}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(x**2+7*x+5)*exp(x)+4*x**3+18*x**2+10*x-2,x)

[Out]

x**4 + 6*x**3 + 5*x**2 - 2*x + (x**2 + 5*x)*exp(x)/2

________________________________________________________________________________________