Optimal. Leaf size=19 \[ (-1-x) \left (4 x+\left (-3-e^x\right ) x\right ) \]
[Out]
________________________________________________________________________________________
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 = {2227, 2225,
2207} \begin {gather*} e^x x^2-x^2+e^x x-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2207
Rule 2225
Rule 2227
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]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 20, normalized size = 1.05
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.27, 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]
________________________________________________________________________________________
Fricas [A]
time = 0.38, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.03, 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]
________________________________________________________________________________________
Giac [A]
time = 0.41, 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]
________________________________________________________________________________________