Optimal. Leaf size=24 \[ e^{-5 x+x^2} \left (4-e^x\right )^2 (4+5 x) \]
________________________________________________________________________________________
Rubi [B] time = 0.68, antiderivative size = 70, normalized size of antiderivative = 2.92, number of steps used = 39, number of rules used = 5, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {6742, 2234, 2204, 2240, 2241} \begin {gather*} 80 e^{x^2-5 x} x-40 e^{x^2-4 x} x+5 e^{x^2-3 x} x+64 e^{x^2-5 x}-32 e^{x^2-4 x}+4 e^{x^2-3 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2204
Rule 2234
Rule 2240
Rule 2241
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-240 e^{-5 x+x^2}-272 e^{-5 x+x^2} x+160 e^{-5 x+x^2} x^2-8 e^{-4 x+x^2} \left (-11-12 x+10 x^2\right )+e^{-3 x+x^2} \left (-7-7 x+10 x^2\right )\right ) \, dx\\ &=-\left (8 \int e^{-4 x+x^2} \left (-11-12 x+10 x^2\right ) \, dx\right )+160 \int e^{-5 x+x^2} x^2 \, dx-240 \int e^{-5 x+x^2} \, dx-272 \int e^{-5 x+x^2} x \, dx+\int e^{-3 x+x^2} \left (-7-7 x+10 x^2\right ) \, dx\\ &=-136 e^{-5 x+x^2}+80 e^{-5 x+x^2} x-8 \int \left (-11 e^{-4 x+x^2}-12 e^{-4 x+x^2} x+10 e^{-4 x+x^2} x^2\right ) \, dx-80 \int e^{-5 x+x^2} \, dx+400 \int e^{-5 x+x^2} x \, dx-680 \int e^{-5 x+x^2} \, dx-\frac {240 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}+\int \left (-7 e^{-3 x+x^2}-7 e^{-3 x+x^2} x+10 e^{-3 x+x^2} x^2\right ) \, dx\\ &=64 e^{-5 x+x^2}+80 e^{-5 x+x^2} x-\frac {120 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-5+2 x)\right )}{e^{25/4}}-7 \int e^{-3 x+x^2} \, dx-7 \int e^{-3 x+x^2} x \, dx+10 \int e^{-3 x+x^2} x^2 \, dx-80 \int e^{-4 x+x^2} x^2 \, dx+88 \int e^{-4 x+x^2} \, dx+96 \int e^{-4 x+x^2} x \, dx+1000 \int e^{-5 x+x^2} \, dx-\frac {80 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}-\frac {680 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}\\ &=64 e^{-5 x+x^2}+48 e^{-4 x+x^2}-\frac {7}{2} e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x-\frac {500 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-5+2 x)\right )}{e^{25/4}}-5 \int e^{-3 x+x^2} \, dx-\frac {21}{2} \int e^{-3 x+x^2} \, dx+15 \int e^{-3 x+x^2} x \, dx+40 \int e^{-4 x+x^2} \, dx-160 \int e^{-4 x+x^2} x \, dx+192 \int e^{-4 x+x^2} \, dx+\frac {1000 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}+\frac {88 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}-\frac {7 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{e^{9/4}}\\ &=64 e^{-5 x+x^2}-32 e^{-4 x+x^2}+4 e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x-\frac {44 \sqrt {\pi } \text {erfi}(2-x)}{e^4}-\frac {7 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-3+2 x)\right )}{2 e^{9/4}}+\frac {45}{2} \int e^{-3 x+x^2} \, dx-320 \int e^{-4 x+x^2} \, dx+\frac {40 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}+\frac {192 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}-\frac {5 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{e^{9/4}}-\frac {21 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{2 e^{9/4}}\\ &=64 e^{-5 x+x^2}-32 e^{-4 x+x^2}+4 e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x-\frac {160 \sqrt {\pi } \text {erfi}(2-x)}{e^4}-\frac {45 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-3+2 x)\right )}{4 e^{9/4}}-\frac {320 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}+\frac {45 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{2 e^{9/4}}\\ &=64 e^{-5 x+x^2}-32 e^{-4 x+x^2}+4 e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 20, normalized size = 0.83 \begin {gather*} e^{(-5+x) x} \left (-4+e^x\right )^2 (4+5 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.83, size = 33, normalized size = 1.38 \begin {gather*} {\left ({\left (5 \, x + 4\right )} e^{\left (2 \, x\right )} - 8 \, {\left (5 \, x + 4\right )} e^{x} + 80 \, x + 64\right )} e^{\left (x^{2} - 5 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 64, normalized size = 2.67 \begin {gather*} 5 \, x e^{\left (x^{2} - 3 \, x\right )} - 40 \, x e^{\left (x^{2} - 4 \, x\right )} + 80 \, x e^{\left (x^{2} - 5 \, x\right )} + 4 \, e^{\left (x^{2} - 3 \, x\right )} - 32 \, e^{\left (x^{2} - 4 \, x\right )} + 64 \, e^{\left (x^{2} - 5 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 35, normalized size = 1.46
method | result | size |
risch | \(\left (5 x \,{\mathrm e}^{2 x}-40 \,{\mathrm e}^{x} x +4 \,{\mathrm e}^{2 x}+80 x -32 \,{\mathrm e}^{x}+64\right ) {\mathrm e}^{\left (x -5\right ) x}\) | \(35\) |
default | \(64 \,{\mathrm e}^{x^{2}-5 x}+80 x \,{\mathrm e}^{x^{2}-5 x}-32 \,{\mathrm e}^{x^{2}-4 x}-40 x \,{\mathrm e}^{x^{2}-4 x}+4 \,{\mathrm e}^{x^{2}-3 x}+5 x \,{\mathrm e}^{x^{2}-3 x}\) | \(65\) |
norman | \(80 x \,{\mathrm e}^{x^{2}-5 x}-32 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}-5 x}+4 \,{\mathrm e}^{2 x} {\mathrm e}^{x^{2}-5 x}+5 x \,{\mathrm e}^{2 x} {\mathrm e}^{x^{2}-5 x}-40 \,{\mathrm e}^{x} x \,{\mathrm e}^{x^{2}-5 x}+64 \,{\mathrm e}^{x^{2}-5 x}\) | \(77\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.45, size = 424, normalized size = 17.67 \begin {gather*} \frac {7}{2} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - \frac {3}{2} i\right ) e^{\left (-\frac {9}{4}\right )} - 44 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - 2 i\right ) e^{\left (-4\right )} + 120 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - \frac {5}{2} i\right ) e^{\left (-\frac {25}{4}\right )} - \frac {5}{4} \, {\left (\frac {4 \, {\left (2 \, x - 3\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x - 3\right )}^{2}\right )}{\left (-{\left (2 \, x - 3\right )}^{2}\right )^{\frac {3}{2}}} - \frac {9 \, \sqrt {\pi } {\left (2 \, x - 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 3\right )}^{2}}} - 12 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 3\right )}^{2}\right )}\right )} e^{\left (-\frac {9}{4}\right )} - \frac {7}{4} \, {\left (\frac {3 \, \sqrt {\pi } {\left (2 \, x - 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 3\right )}^{2}}} + 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 3\right )}^{2}\right )}\right )} e^{\left (-\frac {9}{4}\right )} + 40 \, {\left (\frac {{\left (x - 2\right )}^{3} \Gamma \left (\frac {3}{2}, -{\left (x - 2\right )}^{2}\right )}{\left (-{\left (x - 2\right )}^{2}\right )^{\frac {3}{2}}} - \frac {4 \, \sqrt {\pi } {\left (x - 2\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x - 2\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x - 2\right )}^{2}}} - 4 \, e^{\left ({\left (x - 2\right )}^{2}\right )}\right )} e^{\left (-4\right )} + 48 \, {\left (\frac {2 \, \sqrt {\pi } {\left (x - 2\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x - 2\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x - 2\right )}^{2}}} + e^{\left ({\left (x - 2\right )}^{2}\right )}\right )} e^{\left (-4\right )} - 20 \, {\left (\frac {4 \, {\left (2 \, x - 5\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x - 5\right )}^{2}\right )}{\left (-{\left (2 \, x - 5\right )}^{2}\right )^{\frac {3}{2}}} - \frac {25 \, \sqrt {\pi } {\left (2 \, x - 5\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 5\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 5\right )}^{2}}} - 20 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 5\right )}^{2}\right )}\right )} e^{\left (-\frac {25}{4}\right )} - 68 \, {\left (\frac {5 \, \sqrt {\pi } {\left (2 \, x - 5\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 5\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 5\right )}^{2}}} + 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 5\right )}^{2}\right )}\right )} e^{\left (-\frac {25}{4}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.71, size = 20, normalized size = 0.83 \begin {gather*} {\mathrm {e}}^{x^2-5\,x}\,\left (5\,x+4\right )\,{\left ({\mathrm {e}}^x-4\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.29, size = 39, normalized size = 1.62 \begin {gather*} \left (5 x e^{2 x} - 40 x e^{x} + 80 x + 4 e^{2 x} - 32 e^{x} + 64\right ) e^{x^{2} - 5 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________