Optimal. Leaf size=23 \[ e^3 x-x \left (4-x+\left (-e^x+x\right )^2\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.07, antiderivative size = 50, normalized size of antiderivative = 2.17, number of steps used = 11, number of rules used = 4, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {2176, 2194, 1593, 2196} \begin {gather*} -x^3+2 e^x x^2+x^2-\left (4-e^3\right ) x+\frac {e^{2 x}}{2}-\frac {1}{2} e^{2 x} (2 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} &=-\left (\left (4-e^3\right ) x\right )+x^2-x^3+\int e^{2 x} (-1-2 x) \, dx+\int e^x \left (4 x+2 x^2\right ) \, dx\\ &=-\left (\left (4-e^3\right ) x\right )+x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+\int e^{2 x} \, dx+\int e^x x (4+2 x) \, dx\\ &=\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+\int \left (4 e^x x+2 e^x x^2\right ) \, dx\\ &=\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+2 \int e^x x^2 \, dx+4 \int e^x x \, dx\\ &=\frac {e^{2 x}}{2}+4 e^x x-\left (4-e^3\right ) x+x^2+2 e^x x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)-4 \int e^x \, dx-4 \int e^x x \, dx\\ &=-4 e^x+\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2+2 e^x x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)+4 \int e^x \, dx\\ &=\frac {e^{2 x}}{2}-\left (4-e^3\right ) x+x^2+2 e^x x^2-x^3-\frac {1}{2} e^{2 x} (1+2 x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 33, normalized size = 1.43 \begin {gather*} -4 x+e^3 x-e^{2 x} x+x^2+2 e^x x^2-x^3 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 30, normalized size = 1.30 \begin {gather*} -x^{3} + 2 \, x^{2} e^{x} + x^{2} + x e^{3} - x e^{\left (2 \, x\right )} - 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 30, normalized size = 1.30 \begin {gather*} -x^{3} + 2 \, x^{2} e^{x} + x^{2} + x e^{3} - x e^{\left (2 \, x\right )} - 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 30, normalized size = 1.30
method | result | size |
norman | \(x^{2}+\left ({\mathrm e}^{3}-4\right ) x -x^{3}-x \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x^{2}\) | \(30\) |
default | \(-4 x -x \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x^{2}+x^{2}-x^{3}+x \,{\mathrm e}^{3}\) | \(31\) |
risch | \(-4 x -x \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} x^{2}+x^{2}-x^{3}+x \,{\mathrm e}^{3}\) | \(31\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.38, size = 30, normalized size = 1.30 \begin {gather*} -x^{3} + 2 \, x^{2} e^{x} + x^{2} + x e^{3} - x e^{\left (2 \, x\right )} - 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.05, size = 23, normalized size = 1.00 \begin {gather*} x\,\left (x-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^3+2\,x\,{\mathrm {e}}^x-x^2-4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.10, size = 27, normalized size = 1.17 \begin {gather*} - x^{3} + 2 x^{2} e^{x} + x^{2} - x e^{2 x} + x \left (-4 + e^{3}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________