Optimal. Leaf size=24 \[ -4+\left (-2+e^{x+x^2}\right )^2+x+2 e^{4+x} x+\log (x) \]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 41, normalized size of antiderivative = 1.71, number of steps used = 11, number of rules used = 7, integrand size = 60, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.117, Rules used = {14, 2244, 2236, 6742, 2176, 2194, 43} \begin {gather*} -4 e^{x^2+x}+e^{2 x^2+2 x}+x-2 e^{x+4}+2 e^{x+4} (x+1)+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 43
Rule 2176
Rule 2194
Rule 2236
Rule 2244
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (2 e^{2 x (1+x)} (1+2 x)-4 e^{x+x^2} (1+2 x)+\frac {(1+x) \left (1+2 e^{4+x} x\right )}{x}\right ) \, dx\\ &=2 \int e^{2 x (1+x)} (1+2 x) \, dx-4 \int e^{x+x^2} (1+2 x) \, dx+\int \frac {(1+x) \left (1+2 e^{4+x} x\right )}{x} \, dx\\ &=-4 e^{x+x^2}+2 \int e^{2 x+2 x^2} (1+2 x) \, dx+\int \left (2 e^{4+x} (1+x)+\frac {1+x}{x}\right ) \, dx\\ &=-4 e^{x+x^2}+e^{2 x+2 x^2}+2 \int e^{4+x} (1+x) \, dx+\int \frac {1+x}{x} \, dx\\ &=-4 e^{x+x^2}+e^{2 x+2 x^2}+2 e^{4+x} (1+x)-2 \int e^{4+x} \, dx+\int \left (1+\frac {1}{x}\right ) \, dx\\ &=-2 e^{4+x}-4 e^{x+x^2}+e^{2 x+2 x^2}+x+2 e^{4+x} (1+x)+\log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 32, normalized size = 1.33 \begin {gather*} -4 e^{x+x^2}+e^{2 x+2 x^2}+x+2 e^{4+x} x+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 29, normalized size = 1.21 \begin {gather*} 2 \, x e^{\left (x + 4\right )} + x + e^{\left (2 \, x^{2} + 2 \, x\right )} - 4 \, e^{\left (x^{2} + x\right )} + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 29, normalized size = 1.21 \begin {gather*} 2 \, x e^{\left (x + 4\right )} + x + e^{\left (2 \, x^{2} + 2 \, x\right )} - 4 \, e^{\left (x^{2} + x\right )} + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 27, normalized size = 1.12
method | result | size |
risch | \(x +{\mathrm e}^{2 \left (x +1\right ) x}+2 x \,{\mathrm e}^{4+x}-4 \,{\mathrm e}^{\left (x +1\right ) x}+\ln \relax (x )\) | \(27\) |
norman | \(x +{\mathrm e}^{2 x^{2}+2 x}+2 x \,{\mathrm e}^{4+x}-4 \,{\mathrm e}^{x^{2}+x}+\ln \relax (x )\) | \(28\) |
default | \(x +\ln \relax (x )+2 \,{\mathrm e}^{4} {\mathrm e}^{x}+2 \,{\mathrm e}^{4} \left ({\mathrm e}^{x} x -{\mathrm e}^{x}\right )-4 \,{\mathrm e}^{x^{2}+x}+{\mathrm e}^{2 x^{2}+2 x}\) | \(42\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.51, size = 173, normalized size = 7.21 \begin {gather*} -\frac {1}{2} 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 )} + 2 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} - \frac {1}{2} \, \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 )} + 2 \, {\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 )} + 2 \, {\left (x e^{4} - e^{4}\right )} e^{x} + x + 2 \, e^{\left (x + 4\right )} + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.16, size = 29, normalized size = 1.21 \begin {gather*} x-4\,{\mathrm {e}}^{x^2+x}+{\mathrm {e}}^{2\,x^2+2\,x}+\ln \relax (x)+2\,x\,{\mathrm {e}}^{x+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.23, size = 31, normalized size = 1.29 \begin {gather*} 2 x e^{x + 4} + x - 4 e^{x^{2} + x} + e^{2 x^{2} + 2 x} + \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________