Optimal. Leaf size=25 \[ x \left (-5 e^{-1-x}+3 \left (e^{x+x^2}+x\right )^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(67\) vs. \(2(25)=50\).
time = 0.36, 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 = {6874, 2225,
2207, 2326} \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 2207
Rule 2225
Rule 2326
Rule 6874
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 = 3.69, 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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(60\) vs.
\(2(23)=46\).
time = 0.31, size = 61, normalized size = 2.44
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] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.56, 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]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs.
\(2 (23) = 46\).
time = 0.38, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.10, 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]
________________________________________________________________________________________
Giac [A]
time = 0.41, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________