Optimal. Leaf size=25 \[ e^{x^2} \left (1-\frac {1}{10} x \left (x-4 \left (1-e^x+x\right )\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.23, 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, 6742, 2204, 2209, 2212, 2288} \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 2204
Rule 2209
Rule 2212
Rule 2288
Rule 6742
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.14, size = 24, normalized size = 0.96 \begin {gather*} \frac {1}{10} e^{x^2} \left (10-4 \left (-1+e^x\right ) x+3 x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, 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]
________________________________________________________________________________________
giac [A] time = 0.37, 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]
________________________________________________________________________________________
maple [A] time = 0.11, size = 22, normalized size = 0.88
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] time = 0.62, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________
sympy [A] time = 0.21, 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]
________________________________________________________________________________________