Optimal. Leaf size=19 \[ (-1-x) \left (4 x+\left (-3-e^x\right ) x\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 21, normalized size of antiderivative = 1.11, number of steps used = 9, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2196, 2194, 2176} \begin {gather*} e^x x^2-x^2+e^x x-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=-x-x^2+\int e^x \left (1+3 x+x^2\right ) \, dx\\ &=-x-x^2+\int \left (e^x+3 e^x x+e^x x^2\right ) \, dx\\ &=-x-x^2+3 \int e^x x \, dx+\int e^x \, dx+\int e^x x^2 \, dx\\ &=e^x-x+3 e^x x-x^2+e^x x^2-2 \int e^x x \, dx-3 \int e^x \, dx\\ &=-2 e^x-x+e^x x-x^2+e^x x^2+2 \int e^x \, dx\\ &=-x+e^x x-x^2+e^x x^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 18, normalized size = 0.95 \begin {gather*} -x-x^2+e^x \left (x+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 17, normalized size = 0.89 \begin {gather*} -x^{2} + {\left (x^{2} + x\right )} e^{x} - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 17, normalized size = 0.89 \begin {gather*} -x^{2} + {\left (x^{2} + x\right )} e^{x} - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 18, normalized size = 0.95
method | result | size |
risch | \(\left (x^{2}+x \right ) {\mathrm e}^{x}-x^{2}-x\) | \(18\) |
default | \(-x +{\mathrm e}^{x} x^{2}+{\mathrm e}^{x} x -x^{2}\) | \(20\) |
norman | \(-x +{\mathrm e}^{x} x^{2}+{\mathrm e}^{x} x -x^{2}\) | \(20\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.37, size = 17, normalized size = 0.89 \begin {gather*} -x^{2} + {\left (x^{2} + x\right )} e^{x} - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.98, size = 9, normalized size = 0.47 \begin {gather*} x\,\left ({\mathrm {e}}^x-1\right )\,\left (x+1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.08, size = 12, normalized size = 0.63 \begin {gather*} - x^{2} - x + \left (x^{2} + x\right ) e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________