Optimal. Leaf size=31 \[ 1+2 x+x \left (-e^x-e^{x^2}-\frac {x}{3 \log (x)}+\log (x)\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.35, antiderivative size = 38, normalized size of antiderivative = 1.23, number of steps used = 18, number of rules used = 12, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {12, 6742, 2226, 2204, 2212, 6688, 2176, 2194, 2306, 2309, 2178, 2295} \begin {gather*} -e^{x^2} x-\frac {x^2}{3 \log (x)}+2 x+e^x-e^x (x+1)+x \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2178
Rule 2194
Rule 2204
Rule 2212
Rule 2226
Rule 2295
Rule 2306
Rule 2309
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{3} \int \frac {x-2 x \log (x)+\left (9+e^x (-3-3 x)+e^{x^2} \left (-3-6 x^2\right )\right ) \log ^2(x)+3 \log ^3(x)}{\log ^2(x)} \, dx\\ &=\frac {1}{3} \int \left (-3 e^{x^2} \left (1+2 x^2\right )+\frac {x-2 x \log (x)+9 \log ^2(x)-3 e^x \log ^2(x)-3 e^x x \log ^2(x)+3 \log ^3(x)}{\log ^2(x)}\right ) \, dx\\ &=\frac {1}{3} \int \frac {x-2 x \log (x)+9 \log ^2(x)-3 e^x \log ^2(x)-3 e^x x \log ^2(x)+3 \log ^3(x)}{\log ^2(x)} \, dx-\int e^{x^2} \left (1+2 x^2\right ) \, dx\\ &=\frac {1}{3} \int \left (9-3 e^x (1+x)+\frac {x}{\log ^2(x)}-\frac {2 x}{\log (x)}+3 \log (x)\right ) \, dx-\int \left (e^{x^2}+2 e^{x^2} x^2\right ) \, dx\\ &=3 x+\frac {1}{3} \int \frac {x}{\log ^2(x)} \, dx-\frac {2}{3} \int \frac {x}{\log (x)} \, dx-2 \int e^{x^2} x^2 \, dx-\int e^{x^2} \, dx-\int e^x (1+x) \, dx+\int \log (x) \, dx\\ &=2 x-e^{x^2} x-e^x (1+x)-\frac {1}{2} \sqrt {\pi } \text {erfi}(x)-\frac {x^2}{3 \log (x)}+x \log (x)+\frac {2}{3} \int \frac {x}{\log (x)} \, dx-\frac {2}{3} \operatorname {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,\log (x)\right )+\int e^x \, dx+\int e^{x^2} \, dx\\ &=e^x+2 x-e^{x^2} x-e^x (1+x)-\frac {2}{3} \text {Ei}(2 \log (x))-\frac {x^2}{3 \log (x)}+x \log (x)+\frac {2}{3} \operatorname {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,\log (x)\right )\\ &=e^x+2 x-e^{x^2} x-e^x (1+x)-\frac {x^2}{3 \log (x)}+x \log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 33, normalized size = 1.06 \begin {gather*} 2 x-e^x x-e^{x^2} x-\frac {x^2}{3 \log (x)}+x \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.58, size = 37, normalized size = 1.19 \begin {gather*} \frac {3 \, x \log \relax (x)^{2} - x^{2} - 3 \, {\left (x e^{\left (x^{2}\right )} + x e^{x} - 2 \, x\right )} \log \relax (x)}{3 \, \log \relax (x)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 38, normalized size = 1.23 \begin {gather*} -\frac {3 \, x e^{\left (x^{2}\right )} \log \relax (x) + 3 \, x e^{x} \log \relax (x) - 3 \, x \log \relax (x)^{2} + x^{2} - 6 \, x \log \relax (x)}{3 \, \log \relax (x)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 30, normalized size = 0.97
method | result | size |
default | \(2 x -\frac {x^{2}}{3 \ln \relax (x )}-{\mathrm e}^{x} x -{\mathrm e}^{x^{2}} x +x \ln \relax (x )\) | \(30\) |
risch | \(2 x -\frac {x^{2}}{3 \ln \relax (x )}-{\mathrm e}^{x} x -{\mathrm e}^{x^{2}} x +x \ln \relax (x )\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.38, size = 41, normalized size = 1.32 \begin {gather*} -x e^{\left (x^{2}\right )} - {\left (x - 1\right )} e^{x} + x \log \relax (x) + 2 \, x - \frac {2}{3} \, {\rm Ei}\left (2 \, \log \relax (x)\right ) - e^{x} + \frac {2}{3} \, \Gamma \left (-1, -2 \, \log \relax (x)\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.33, size = 29, normalized size = 0.94 \begin {gather*} 2\,x-x\,{\mathrm {e}}^{x^2}-\frac {x^2}{3\,\ln \relax (x)}-x\,{\mathrm {e}}^x+x\,\ln \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.43, size = 27, normalized size = 0.87 \begin {gather*} - \frac {x^{2}}{3 \log {\relax (x )}} - x e^{x} - x e^{x^{2}} + x \log {\relax (x )} + 2 x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________