Optimal. Leaf size=25 \[ e^{x^2} \left (1-\frac {1}{10} x \left (x-4 \left (1-e^x+x\right )\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(53\) vs. \(2(25)=50\).
time = 0.15, antiderivative size = 53, normalized size of antiderivative = 2.12, number of steps
used = 10, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {12, 6874,
2235, 2240, 2243, 2326} \begin {gather*} \frac {3}{10} e^{x^2} x^2+\frac {2 e^{x^2} x}{5}+e^{x^2}-\frac {2 e^{x^2+x} \left (2 x^2+x\right )}{5 (2 x+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2235
Rule 2240
Rule 2243
Rule 2326
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{5} \int e^{x^2} \left (2+13 x+4 x^2+3 x^3+e^x \left (-2-2 x-4 x^2\right )\right ) \, dx\\ &=\frac {1}{5} \int \left (2 e^{x^2}+13 e^{x^2} x+4 e^{x^2} x^2+3 e^{x^2} x^3-2 e^{x+x^2} \left (1+x+2 x^2\right )\right ) \, dx\\ &=\frac {2}{5} \int e^{x^2} \, dx-\frac {2}{5} \int e^{x+x^2} \left (1+x+2 x^2\right ) \, dx+\frac {3}{5} \int e^{x^2} x^3 \, dx+\frac {4}{5} \int e^{x^2} x^2 \, dx+\frac {13}{5} \int e^{x^2} x \, dx\\ &=\frac {13 e^{x^2}}{10}+\frac {2 e^{x^2} x}{5}+\frac {3}{10} e^{x^2} x^2-\frac {2 e^{x+x^2} \left (x+2 x^2\right )}{5 (1+2 x)}+\frac {1}{5} \sqrt {\pi } \text {erfi}(x)-\frac {2}{5} \int e^{x^2} \, dx-\frac {3}{5} \int e^{x^2} x \, dx\\ &=e^{x^2}+\frac {2 e^{x^2} x}{5}+\frac {3}{10} e^{x^2} x^2-\frac {2 e^{x+x^2} \left (x+2 x^2\right )}{5 (1+2 x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 27, normalized size = 1.08 \begin {gather*} \frac {1}{5} e^{x^2} \left (5+2 x-2 e^x x+\frac {3 x^2}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 31, normalized size = 1.24
method | result | size |
risch | \(\frac {\left (5+2 x +\frac {3 x^{2}}{2}-2 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{x^{2}}}{5}\) | \(22\) |
default | \(\frac {2 \,{\mathrm e}^{x^{2}} x}{5}+\frac {3 x^{2} {\mathrm e}^{x^{2}}}{10}+{\mathrm e}^{x^{2}}-\frac {2 x \,{\mathrm e}^{x^{2}+x}}{5}\) | \(31\) |
norman | \(\frac {3 x^{2} {\mathrm e}^{x^{2}}}{10}+\frac {2 \,{\mathrm e}^{x^{2}} x}{5}-\frac {2 x \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}}{5}+{\mathrm e}^{x^{2}}\) | \(31\) |
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.30, size = 176, normalized size = 7.04 \begin {gather*} \frac {1}{5} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} + \frac {1}{10} \, {\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}{10} \, {\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}{10} \, {\left (x^{2} - 1\right )} e^{\left (x^{2}\right )} + \frac {2}{5} \, x e^{\left (x^{2}\right )} + \frac {13}{10} \, e^{\left (x^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 21, normalized size = 0.84 \begin {gather*} \frac {1}{10} \, {\left (3 \, x^{2} - 4 \, x e^{x} + 4 \, x + 10\right )} e^{\left (x^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.09, size = 22, normalized size = 0.88 \begin {gather*} \frac {\left (3 x^{2} - 4 x e^{x} + 4 x + 10\right ) e^{x^{2}}}{10} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 26, normalized size = 1.04 \begin {gather*} -\frac {2}{5} \, x e^{\left (x^{2} + x\right )} + \frac {1}{10} \, {\left (3 \, x^{2} + 4 \, x + 10\right )} e^{\left (x^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.38, size = 21, normalized size = 0.84 \begin {gather*} \frac {{\mathrm {e}}^{x^2}\,\left (4\,x-4\,x\,{\mathrm {e}}^x+3\,x^2+10\right )}{10} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________