\(\int \frac {1}{125} e^{-x+x^2} (8-10 x+17 x^2-2 x^3) \, dx\) [1371]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 19 \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=\frac {1}{125} e^{-x+x^2} (8-x) x \]

[Out]

1/125*exp(x^2)*x/exp(x)*(8-x)

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.63, number of steps used = 24, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {12, 6874, 2266, 2235, 2272, 2273} \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=\frac {8}{125} e^{x^2-x} x-\frac {1}{125} e^{x^2-x} x^2 \]

[In]

Int[(E^(-x + x^2)*(8 - 10*x + 17*x^2 - 2*x^3))/125,x]

[Out]

(8*E^(-x + x^2)*x)/125 - (E^(-x + x^2)*x^2)/125

Rule 12

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

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2266

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2272

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] - Dist[(b*e - 2*c*d)/(2*c), Int[F^(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e}, x] &&
 NeQ[b*e - 2*c*d, 0]

Rule 2273

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

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{125} \int e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx \\ & = \frac {1}{125} \int \left (8 e^{-x+x^2}-10 e^{-x+x^2} x+17 e^{-x+x^2} x^2-2 e^{-x+x^2} x^3\right ) \, dx \\ & = -\left (\frac {2}{125} \int e^{-x+x^2} x^3 \, dx\right )+\frac {8}{125} \int e^{-x+x^2} \, dx-\frac {2}{25} \int e^{-x+x^2} x \, dx+\frac {17}{125} \int e^{-x+x^2} x^2 \, dx \\ & = -\frac {1}{25} e^{-x+x^2}+\frac {17}{250} e^{-x+x^2} x-\frac {1}{125} e^{-x+x^2} x^2-\frac {1}{125} \int e^{-x+x^2} x^2 \, dx+\frac {2}{125} \int e^{-x+x^2} x \, dx-\frac {1}{25} \int e^{-x+x^2} \, dx-\frac {17}{250} \int e^{-x+x^2} \, dx+\frac {17}{250} \int e^{-x+x^2} x \, dx+\frac {8 \int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{125 \sqrt [4]{e}} \\ & = \frac {1}{500} e^{-x+x^2}+\frac {8}{125} e^{-x+x^2} x-\frac {1}{125} e^{-x+x^2} x^2+\frac {4 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-1+2 x)\right )}{125 \sqrt [4]{e}}+\frac {1}{250} \int e^{-x+x^2} \, dx-\frac {1}{250} \int e^{-x+x^2} x \, dx+\frac {1}{125} \int e^{-x+x^2} \, dx+\frac {17}{500} \int e^{-x+x^2} \, dx-\frac {\int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{25 \sqrt [4]{e}}-\frac {17 \int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{250 \sqrt [4]{e}} \\ & = \frac {8}{125} e^{-x+x^2} x-\frac {1}{125} e^{-x+x^2} x^2-\frac {11 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-1+2 x)\right )}{500 \sqrt [4]{e}}-\frac {1}{500} \int e^{-x+x^2} \, dx+\frac {\int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{250 \sqrt [4]{e}}+\frac {\int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{125 \sqrt [4]{e}}+\frac {17 \int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{500 \sqrt [4]{e}} \\ & = \frac {8}{125} e^{-x+x^2} x-\frac {1}{125} e^{-x+x^2} x^2+\frac {\sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-1+2 x)\right )}{1000 \sqrt [4]{e}}-\frac {\int e^{\frac {1}{4} (-1+2 x)^2} \, dx}{500 \sqrt [4]{e}} \\ & = \frac {8}{125} e^{-x+x^2} x-\frac {1}{125} e^{-x+x^2} x^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.79 \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=-\frac {1}{125} e^{(-1+x) x} (-8+x) x \]

[In]

Integrate[(E^(-x + x^2)*(8 - 10*x + 17*x^2 - 2*x^3))/125,x]

[Out]

-1/125*(E^((-1 + x)*x)*(-8 + x)*x)

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.68

method result size
risch \(-\frac {x \left (-8+x \right ) {\mathrm e}^{x \left (-1+x \right )}}{125}\) \(13\)
gosper \(-\frac {{\mathrm e}^{x^{2}} x \left (-8+x \right ) {\mathrm e}^{-x}}{125}\) \(15\)
norman \(\left (-\frac {x^{2} {\mathrm e}^{x^{2}}}{125}+\frac {8 \,{\mathrm e}^{x^{2}} x}{125}\right ) {\mathrm e}^{-x}\) \(23\)
parallelrisch \(\frac {\left (-x^{2} {\mathrm e}^{x^{2}}+8 \,{\mathrm e}^{x^{2}} x \right ) {\mathrm e}^{-x}}{125}\) \(24\)
default \(\frac {8 x \,{\mathrm e}^{x^{2}-x}}{125}-\frac {x^{2} {\mathrm e}^{x^{2}-x}}{125}\) \(26\)

[In]

int(1/125*(-2*x^3+17*x^2-10*x+8)*exp(x^2)/exp(x),x,method=_RETURNVERBOSE)

[Out]

-1/125*x*(-8+x)*exp(x*(-1+x))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=-\frac {1}{125} \, {\left (x^{2} - 8 \, x\right )} e^{\left (x^{2} - x\right )} \]

[In]

integrate(1/125*(-2*x^3+17*x^2-10*x+8)*exp(x^2)/exp(x),x, algorithm="fricas")

[Out]

-1/125*(x^2 - 8*x)*e^(x^2 - x)

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=\frac {\left (- x^{2} e^{- x} + 8 x e^{- x}\right ) e^{x^{2}}}{125} \]

[In]

integrate(1/125*(-2*x**3+17*x**2-10*x+8)*exp(x**2)/exp(x),x)

[Out]

(-x**2*exp(-x) + 8*x*exp(-x))*exp(x**2)/125

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.24 (sec) , antiderivative size = 250, normalized size of antiderivative = 13.16 \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=-\frac {4}{125} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} + \frac {1}{1000} \, {\left (\frac {12 \, {\left (2 \, x - 1\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )}{\left (-{\left (2 \, x - 1\right )}^{2}\right )^{\frac {3}{2}}} - \frac {\sqrt {\pi } {\left (2 \, x - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 1\right )}^{2}}} - 6 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )} + 8 \, \Gamma \left (2, -\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )\right )} e^{\left (-\frac {1}{4}\right )} - \frac {17}{1000} \, {\left (\frac {4 \, {\left (2 \, x - 1\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )}{\left (-{\left (2 \, x - 1\right )}^{2}\right )^{\frac {3}{2}}} - \frac {\sqrt {\pi } {\left (2 \, x - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 1\right )}^{2}}} - 4 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} - \frac {1}{50} \, {\left (\frac {\sqrt {\pi } {\left (2 \, x - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 1\right )}^{2}}} + 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} \]

[In]

integrate(1/125*(-2*x^3+17*x^2-10*x+8)*exp(x^2)/exp(x),x, algorithm="maxima")

[Out]

-4/125*I*sqrt(pi)*erf(I*x - 1/2*I)*e^(-1/4) + 1/1000*(12*(2*x - 1)^3*gamma(3/2, -1/4*(2*x - 1)^2)/(-(2*x - 1)^
2)^(3/2) - sqrt(pi)*(2*x - 1)*(erf(1/2*sqrt(-(2*x - 1)^2)) - 1)/sqrt(-(2*x - 1)^2) - 6*e^(1/4*(2*x - 1)^2) + 8
*gamma(2, -1/4*(2*x - 1)^2))*e^(-1/4) - 17/1000*(4*(2*x - 1)^3*gamma(3/2, -1/4*(2*x - 1)^2)/(-(2*x - 1)^2)^(3/
2) - sqrt(pi)*(2*x - 1)*(erf(1/2*sqrt(-(2*x - 1)^2)) - 1)/sqrt(-(2*x - 1)^2) - 4*e^(1/4*(2*x - 1)^2))*e^(-1/4)
 - 1/50*(sqrt(pi)*(2*x - 1)*(erf(1/2*sqrt(-(2*x - 1)^2)) - 1)/sqrt(-(2*x - 1)^2) + 2*e^(1/4*(2*x - 1)^2))*e^(-
1/4)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.16 \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=-\frac {1}{500} \, {\left ({\left (2 \, x - 1\right )}^{2} - 28 \, x - 1\right )} e^{\left (x^{2} - x\right )} \]

[In]

integrate(1/125*(-2*x^3+17*x^2-10*x+8)*exp(x^2)/exp(x),x, algorithm="giac")

[Out]

-1/500*((2*x - 1)^2 - 28*x - 1)*e^(x^2 - x)

Mupad [B] (verification not implemented)

Time = 9.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.74 \[ \int \frac {1}{125} e^{-x+x^2} \left (8-10 x+17 x^2-2 x^3\right ) \, dx=-\frac {x\,{\mathrm {e}}^{x^2-x}\,\left (x-8\right )}{125} \]

[In]

int(-(exp(-x)*exp(x^2)*(10*x - 17*x^2 + 2*x^3 - 8))/125,x)

[Out]

-(x*exp(x^2 - x)*(x - 8))/125