Optimal. Leaf size=39 \[ x+x \left (-x+e^{x^2} \left (-4+\left (-\frac {5}{3 x}+\frac {-e^x+4 x}{x}\right )^2\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 10.78, antiderivative size = 99, normalized size of antiderivative = 2.54, number of steps used = 15, number of rules used = 8, integrand size = 76, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {12, 14, 6742, 2288, 2204, 2214, 2209, 2212} \begin {gather*} -\frac {40 e^{x^2}}{3}+12 e^{x^2} x+\frac {e^{x^2+2 x} \left (x^2+x\right )}{x^2 (x+1)}+\frac {25 e^{x^2}}{9 x}+\frac {2 e^{x^2+x} \left (-24 x^3-2 x^2+5 x\right )}{3 x^2 (2 x+1)}-\frac {1}{4} (1-2 x)^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2204
Rule 2209
Rule 2212
Rule 2214
Rule 2288
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{9} \int \frac {9 x^2-18 x^3+e^{x^2} \left (-25+158 x^2-240 x^3+216 x^4+e^{2 x} \left (-9+18 x+18 x^2\right )+e^x \left (-30+30 x-12 x^2-144 x^3\right )\right )}{x^2} \, dx\\ &=\frac {1}{9} \int \left (-9 (-1+2 x)+\frac {e^{x^2} \left (-25-30 e^x-9 e^{2 x}+30 e^x x+18 e^{2 x} x+158 x^2-12 e^x x^2+18 e^{2 x} x^2-240 x^3-144 e^x x^3+216 x^4\right )}{x^2}\right ) \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {1}{9} \int \frac {e^{x^2} \left (-25-30 e^x-9 e^{2 x}+30 e^x x+18 e^{2 x} x+158 x^2-12 e^x x^2+18 e^{2 x} x^2-240 x^3-144 e^x x^3+216 x^4\right )}{x^2} \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {1}{9} \int \left (\frac {9 e^{2 x+x^2} \left (-1+2 x+2 x^2\right )}{x^2}-\frac {6 e^{x+x^2} \left (5-5 x+2 x^2+24 x^3\right )}{x^2}+\frac {e^{x^2} \left (-25+158 x^2-240 x^3+216 x^4\right )}{x^2}\right ) \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {1}{9} \int \frac {e^{x^2} \left (-25+158 x^2-240 x^3+216 x^4\right )}{x^2} \, dx-\frac {2}{3} \int \frac {e^{x+x^2} \left (5-5 x+2 x^2+24 x^3\right )}{x^2} \, dx+\int \frac {e^{2 x+x^2} \left (-1+2 x+2 x^2\right )}{x^2} \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}+\frac {1}{9} \int \left (158 e^{x^2}-\frac {25 e^{x^2}}{x^2}-240 e^{x^2} x+216 e^{x^2} x^2\right ) \, dx\\ &=-\frac {1}{4} (1-2 x)^2+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}-\frac {25}{9} \int \frac {e^{x^2}}{x^2} \, dx+\frac {158}{9} \int e^{x^2} \, dx+24 \int e^{x^2} x^2 \, dx-\frac {80}{3} \int e^{x^2} x \, dx\\ &=-\frac {40 e^{x^2}}{3}-\frac {1}{4} (1-2 x)^2+\frac {25 e^{x^2}}{9 x}+12 e^{x^2} x+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}+\frac {79}{9} \sqrt {\pi } \text {erfi}(x)-\frac {50}{9} \int e^{x^2} \, dx-12 \int e^{x^2} \, dx\\ &=-\frac {40 e^{x^2}}{3}-\frac {1}{4} (1-2 x)^2+\frac {25 e^{x^2}}{9 x}+12 e^{x^2} x+\frac {e^{2 x+x^2} \left (x+x^2\right )}{x^2 (1+x)}+\frac {2 e^{x+x^2} \left (5 x-2 x^2-24 x^3\right )}{3 x^2 (1+2 x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.52, size = 54, normalized size = 1.38 \begin {gather*} \frac {9 e^{x (2+x)}+e^{x+x^2} (30-72 x)-9 (-1+x) x^2+e^{x^2} \left (25-120 x+108 x^2\right )}{9 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.78, size = 47, normalized size = 1.21 \begin {gather*} -\frac {9 \, x^{3} - 9 \, x^{2} - {\left (108 \, x^{2} - 6 \, {\left (12 \, x - 5\right )} e^{x} - 120 \, x + 9 \, e^{\left (2 \, x\right )} + 25\right )} e^{\left (x^{2}\right )}}{9 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 65, normalized size = 1.67 \begin {gather*} -\frac {9 \, x^{3} - 108 \, x^{2} e^{\left (x^{2}\right )} - 9 \, x^{2} + 72 \, x e^{\left (x^{2} + x\right )} + 120 \, x e^{\left (x^{2}\right )} - 9 \, e^{\left (x^{2} + 2 \, x\right )} - 30 \, e^{\left (x^{2} + x\right )} - 25 \, e^{\left (x^{2}\right )}}{9 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 42, normalized size = 1.08
method | result | size |
risch | \(-x^{2}+x +\frac {\left (108 x^{2}-72 \,{\mathrm e}^{x} x +9 \,{\mathrm e}^{2 x}-120 x +30 \,{\mathrm e}^{x}+25\right ) {\mathrm e}^{x^{2}}}{9 x}\) | \(42\) |
norman | \(\frac {x^{2}+{\mathrm e}^{2 x} {\mathrm e}^{x^{2}}-x^{3}+12 x^{2} {\mathrm e}^{x^{2}}+\frac {10 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}}{3}-\frac {40 \,{\mathrm e}^{x^{2}} x}{3}-8 x \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}+\frac {25 \,{\mathrm e}^{x^{2}}}{9}}{x}\) | \(62\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {2}{3} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} - x^{2} + 12 \, x e^{\left (x^{2}\right )} - \frac {25}{9} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x\right ) + x + \frac {25 \, \sqrt {-x^{2}} \Gamma \left (-\frac {1}{2}, -x^{2}\right )}{18 \, x} + \frac {e^{\left (x^{2} + 2 \, x\right )}}{x} - \frac {40}{3} \, e^{\left (x^{2}\right )} - \frac {1}{9} \, \int \frac {6 \, {\left (24 \, x^{3} - 5 \, x + 5\right )} e^{\left (x^{2} + x\right )}}{x^{2}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.14, size = 57, normalized size = 1.46 \begin {gather*} \frac {\frac {10\,{\mathrm {e}}^{x^2+x}}{3}+\frac {25\,{\mathrm {e}}^{x^2}}{9}+{\mathrm {e}}^{x^2+2\,x}}{x}-\frac {40\,{\mathrm {e}}^{x^2}}{3}-8\,{\mathrm {e}}^{x^2+x}+x\,\left (12\,{\mathrm {e}}^{x^2}+1\right )-x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.24, size = 41, normalized size = 1.05 \begin {gather*} - x^{2} + x + \frac {\left (108 x^{2} - 72 x e^{x} - 120 x + 9 e^{2 x} + 30 e^{x} + 25\right ) e^{x^{2}}}{9 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________