Optimal. Leaf size=15 \[ 4-2 x-2 e^{(1+x)^2} x \]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 25, normalized size of antiderivative = 1.67, number of steps used = 8, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2227, 2226, 2204, 2209, 2212} \begin {gather*} -2 x+2 e^{(x+1)^2}-2 e^{(x+1)^2} (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2204
Rule 2209
Rule 2212
Rule 2226
Rule 2227
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=-2 x+\int e^{1+2 x+x^2} \left (-2-4 x-4 x^2\right ) \, dx\\ &=-2 x+\int e^{(1+x)^2} \left (-2-4 x-4 x^2\right ) \, dx\\ &=-2 x+\int \left (-2 e^{(1+x)^2}+4 e^{(1+x)^2} (1+x)-4 e^{(1+x)^2} (1+x)^2\right ) \, dx\\ &=-2 x-2 \int e^{(1+x)^2} \, dx+4 \int e^{(1+x)^2} (1+x) \, dx-4 \int e^{(1+x)^2} (1+x)^2 \, dx\\ &=2 e^{(1+x)^2}-2 x-2 e^{(1+x)^2} (1+x)-\sqrt {\pi } \text {erfi}(1+x)+2 \int e^{(1+x)^2} \, dx\\ &=2 e^{(1+x)^2}-2 x-2 e^{(1+x)^2} (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 14, normalized size = 0.93 \begin {gather*} -2 x-2 e^{(1+x)^2} x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 16, normalized size = 1.07 \begin {gather*} -2 \, x e^{\left (x^{2} + 2 \, x + 1\right )} - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 16, normalized size = 1.07 \begin {gather*} -2 \, x e^{\left (x^{2} + 2 \, x + 1\right )} - 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 14, normalized size = 0.93
method | result | size |
risch | \(-2 x -2 \,{\mathrm e}^{\left (x +1\right )^{2}} x\) | \(14\) |
default | \(-2 x -2 \,{\mathrm e}^{x^{2}+2 x +1} x\) | \(17\) |
norman | \(-2 x -2 \,{\mathrm e}^{x^{2}+2 x +1} x\) | \(17\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.42, size = 48, normalized size = 3.20 \begin {gather*} \frac {2 \, {\left (x + 1\right )}^{3} \Gamma \left (\frac {3}{2}, -{\left (x + 1\right )}^{2}\right )}{\left (-{\left (x + 1\right )}^{2}\right )^{\frac {3}{2}}} + i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + i\right ) - 2 \, x + 2 \, e^{\left ({\left (x + 1\right )}^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 16, normalized size = 1.07 \begin {gather*} -2\,x\,\left ({\mathrm {e}}^{2\,x}\,{\mathrm {e}}^{x^2}\,\mathrm {e}+1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.09, size = 17, normalized size = 1.13 \begin {gather*} - 2 x e^{x^{2} + 2 x + 1} - 2 x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________