3.9.18 \(\int \frac {1}{2} (2+4 x+3 x^2+e^{-5 x+x^2} (-10+4 x)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 21, normalized size of antiderivative = 0.78, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {12, 2236} \begin {gather*} \frac {x^3}{2}+x^2+e^{x^2-5 x}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

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

Rule 2236

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*F^(a + b*x + c*x^2))/(
2*c*Log[F]), x] /; FreeQ[{F, a, b, c, d, e}, x] && EqQ[b*e - 2*c*d, 0]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \left (2+4 x+3 x^2+e^{-5 x+x^2} (-10+4 x)\right ) \, dx\\ &=x+x^2+\frac {x^3}{2}+\frac {1}{2} \int e^{-5 x+x^2} (-10+4 x) \, dx\\ &=e^{-5 x+x^2}+x+x^2+\frac {x^3}{2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 21, normalized size = 0.78 \begin {gather*} e^{-5 x+x^2}+x+x^2+\frac {x^3}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 18, normalized size = 0.67 \begin {gather*} \frac {1}{2} \, x^{3} + x^{2} + x + e^{\left (x^{2} - 5 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.35, size = 18, normalized size = 0.67 \begin {gather*} \frac {1}{2} \, x^{3} + x^{2} + x + e^{\left (x^{2} - 5 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 17, normalized size = 0.63




method result size



risch \(x^{2}+x +\frac {x^{3}}{2}+{\mathrm e}^{\left (x -5\right ) x}\) \(17\)
default \(x^{2}+x +\frac {x^{3}}{2}+{\mathrm e}^{x^{2}-5 x}\) \(19\)
norman \(x^{2}+x +\frac {x^{3}}{2}+{\mathrm e}^{x^{2}-5 x}\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 18, normalized size = 0.67 \begin {gather*} \frac {1}{2} \, x^{3} + x^{2} + x + e^{\left (x^{2} - 5 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 18, normalized size = 0.67 \begin {gather*} x+{\mathrm {e}}^{x^2-5\,x}+x^2+\frac {x^3}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________