Optimal. Leaf size=19 \[ \frac {1}{125} e^{-x+x^2} (8-x) x \]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 31, normalized size of antiderivative = 1.63, number of steps used = 24, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {12, 6742, 2234, 2204, 2240, 2241} \begin {gather*} \frac {8}{125} e^{x^2-x} x-\frac {1}{125} e^{x^2-x} x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2204
Rule 2234
Rule 2240
Rule 2241
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \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 {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 15, normalized size = 0.79 \begin {gather*} -\frac {1}{125} e^{(-1+x) x} (-8+x) x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 17, normalized size = 0.89 \begin {gather*} -\frac {1}{125} \, {\left (x^{2} - 8 \, x\right )} e^{\left (x^{2} - x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.42, size = 22, normalized size = 1.16 \begin {gather*} -\frac {1}{500} \, {\left ({\left (2 \, x - 1\right )}^{2} - 28 \, x - 1\right )} e^{\left (x^{2} - x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 13, normalized size = 0.68
method | result | size |
risch | \(-\frac {x \left (-8+x \right ) {\mathrm e}^{x \left (x -1\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\) |
default | \(\frac {8 x \,{\mathrm e}^{x^{2}-x}}{125}-\frac {x^{2} {\mathrm e}^{x^{2}-x}}{125}\) | \(26\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.65, size = 250, normalized size = 13.16 \begin {gather*} -\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 )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 14, normalized size = 0.74 \begin {gather*} -\frac {x\,{\mathrm {e}}^{x^2-x}\,\left (x-8\right )}{125} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.18, size = 19, normalized size = 1.00 \begin {gather*} \frac {\left (- x^{2} e^{- x} + 8 x e^{- x}\right ) e^{x^{2}}}{125} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________