Optimal. Leaf size=25 \[ x \left (-5 e^{-1-x}+3 \left (e^{x+x^2}+x\right )^2\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.51, antiderivative size = 67, normalized size of antiderivative = 2.68, number of steps used = 7, number of rules used = 4, integrand size = 71, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {6742, 2194, 2176, 2288} \begin {gather*} 3 x^3+\frac {6 e^{x^2+x} \left (2 x^2+x\right ) x}{2 x+1}+\frac {3 e^{2 x^2+2 x} \left (2 x^2+x\right )}{2 x+1}-5 e^{-x-1} x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2194
Rule 2288
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-5 e^{-1-x}+5 e^{-1-x} x+9 x^2+6 e^{x+x^2} x \left (2+x+2 x^2\right )+3 e^{2 x+2 x^2} \left (1+2 x+4 x^2\right )\right ) \, dx\\ &=3 x^3+3 \int e^{2 x+2 x^2} \left (1+2 x+4 x^2\right ) \, dx-5 \int e^{-1-x} \, dx+5 \int e^{-1-x} x \, dx+6 \int e^{x+x^2} x \left (2+x+2 x^2\right ) \, dx\\ &=5 e^{-1-x}-5 e^{-1-x} x+3 x^3+\frac {3 e^{2 x+2 x^2} \left (x+2 x^2\right )}{1+2 x}+\frac {6 e^{x+x^2} x \left (x+2 x^2\right )}{1+2 x}+5 \int e^{-1-x} \, dx\\ &=-5 e^{-1-x} x+3 x^3+\frac {3 e^{2 x+2 x^2} \left (x+2 x^2\right )}{1+2 x}+\frac {6 e^{x+x^2} x \left (x+2 x^2\right )}{1+2 x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.31, size = 40, normalized size = 1.60 \begin {gather*} 3-5 e^{-1-x} x+3 e^{2 x (1+x)} x+6 e^{x (1+x)} x^2+3 x^3 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.73, size = 73, normalized size = 2.92 \begin {gather*} {\left (3 \, x^{3} e^{\left (2 \, x^{2} + 4 \, x + 2\right )} + 3 \, x e^{\left (4 \, x^{2} + 6 \, x + 2\right )} + {\left (6 \, x^{2} e^{\left (x^{2} + 2 \, x + 1\right )} - 5 \, x\right )} e^{\left (2 \, x^{2} + 3 \, x + 1\right )}\right )} e^{\left (-2 \, x^{2} - 4 \, x - 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 44, normalized size = 1.76 \begin {gather*} {\left (3 \, x^{3} e + 6 \, x^{2} e^{\left (x^{2} + x + 1\right )} + 3 \, x e^{\left (2 \, x^{2} + 2 \, x + 1\right )} - 5 \, x e^{\left (-x\right )}\right )} e^{\left (-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 37, normalized size = 1.48
method | result | size |
risch | \(3 x^{3}-5 x \,{\mathrm e}^{-x -1}+3 x \,{\mathrm e}^{2 \left (x +1\right ) x}+6 x^{2} {\mathrm e}^{\left (x +1\right ) x}\) | \(37\) |
norman | \(\left (-5 x +3 x^{3} {\mathrm e}^{x +1}+6 \,{\mathrm e}^{x +1} {\mathrm e}^{x^{2}+x} x^{2}+3 \,{\mathrm e}^{x +1} {\mathrm e}^{2 x^{2}+2 x} x \right ) {\mathrm e}^{-x -1}\) | \(51\) |
default | \(3 x^{3}+5 \,{\mathrm e}^{-1} {\mathrm e}^{-x}+5 \,{\mathrm e}^{-1} \left (-x \,{\mathrm e}^{-x}-{\mathrm e}^{-x}\right )+6 x^{2} {\mathrm e}^{x^{2}+x}+3 x \,{\mathrm e}^{2 x^{2}+2 x}\) | \(61\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.53, size = 362, normalized size = 14.48 \begin {gather*} 3 \, x^{3} - \frac {3}{4} i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (i \, \sqrt {2} x + \frac {1}{2} i \, \sqrt {2}\right ) e^{\left (-\frac {1}{2}\right )} - \frac {3}{4} \, \sqrt {2} {\left (\frac {\sqrt {\pi } {\left (2 \, x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {-{\left (2 \, x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 1\right )}^{2}}} - \sqrt {2} e^{\left (\frac {1}{2} \, {\left (2 \, x + 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{2}\right )} + \frac {3}{4} \, {\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 {3}{4} \, {\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 )} - 3 \, {\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 )} + \frac {3}{2} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x^{2} + 2 \, x\right )} - 5 \, {\left (x + 1\right )} e^{\left (-x - 1\right )} + 5 \, e^{\left (-x - 1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.23, size = 39, normalized size = 1.56 \begin {gather*} 6\,x^2\,{\mathrm {e}}^{x^2+x}-5\,x\,{\mathrm {e}}^{-x-1}+3\,x\,{\mathrm {e}}^{2\,x^2+2\,x}+3\,x^3 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.22, size = 39, normalized size = 1.56 \begin {gather*} 3 x^{3} + 6 x^{2} e^{x^{2} + x} - 5 x e^{- x - 1} + 3 x e^{2 x^{2} + 2 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________