Optimal. Leaf size=19 \[ x+x \left (e^x-3 x-e^{1+x} x\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 29, normalized size of antiderivative = 1.53, number of steps used = 11, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2176, 2194, 1593, 2196} \begin {gather*} -e^{x+1} x^2-3 x^2+x-e^x+e^x (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=x-3 x^2+\int e^x (1+x) \, dx+\int e^{1+x} \left (-2 x-x^2\right ) \, dx\\ &=x-3 x^2+e^x (1+x)-\int e^x \, dx+\int e^{1+x} (-2-x) x \, dx\\ &=-e^x+x-3 x^2+e^x (1+x)+\int \left (-2 e^{1+x} x-e^{1+x} x^2\right ) \, dx\\ &=-e^x+x-3 x^2+e^x (1+x)-2 \int e^{1+x} x \, dx-\int e^{1+x} x^2 \, dx\\ &=-e^x+x-2 e^{1+x} x-3 x^2-e^{1+x} x^2+e^x (1+x)+2 \int e^{1+x} \, dx+2 \int e^{1+x} x \, dx\\ &=-e^x+2 e^{1+x}+x-3 x^2-e^{1+x} x^2+e^x (1+x)-2 \int e^{1+x} \, dx\\ &=-e^x+x-3 x^2-e^{1+x} x^2+e^x (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 22, normalized size = 1.16 \begin {gather*} x+e^x x-3 x^2-e^{1+x} x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.17, size = 32, normalized size = 1.68 \begin {gather*} -{\left ({\left (3 \, x^{2} - x\right )} e + {\left (x^{2} e - x\right )} e^{\left (x + 1\right )}\right )} e^{\left (-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 20, normalized size = 1.05 \begin {gather*} -x^{2} e^{\left (x + 1\right )} - 3 \, x^{2} + x e^{x} + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 21, normalized size = 1.11
method | result | size |
norman | \(x +{\mathrm e}^{x} x -3 x^{2}-x^{2} {\mathrm e} \,{\mathrm e}^{x}\) | \(21\) |
risch | \(-x^{2} {\mathrm e}^{x +1}+{\mathrm e}^{x} x +x -3 x^{2}\) | \(21\) |
default | \({\mathrm e}^{x} x +x -{\mathrm e}^{x +1} \left (x +1\right )^{2}+2 \,{\mathrm e}^{x +1} \left (x +1\right )-{\mathrm e}^{x +1}-3 x^{2}\) | \(38\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 20, normalized size = 1.05 \begin {gather*} -x^{2} e^{\left (x + 1\right )} - 3 \, x^{2} + x e^{x} + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 20, normalized size = 1.05 \begin {gather*} x+x\,{\mathrm {e}}^x-3\,x^2-x^2\,\mathrm {e}\,{\mathrm {e}}^x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.10, size = 17, normalized size = 0.89 \begin {gather*} - 3 x^{2} + x + \left (- e x^{2} + x\right ) e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________