Optimal. Leaf size=22 \[ \left (-x+x^2-e^x x \left (2+e^x x\right )\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.46, antiderivative size = 77, normalized size of antiderivative = 3.50, number of steps used = 51, number of rules used = 5, integrand size = 91, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.055, Rules used = {1594, 2196, 2176, 2194, 1593} \begin {gather*} -2 e^{2 x} x^4+e^{4 x} x^4+x^4-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3-2 x^3+4 e^x x^2+4 e^{2 x} x^2+x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1594
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=x^2-2 x^3+x^4+\int e^x \left (8 x-8 x^2-4 x^3\right ) \, dx+\int e^{3 x} \left (12 x^2+12 x^3\right ) \, dx+\int e^{2 x} \left (8 x+14 x^2-4 x^3-4 x^4\right ) \, dx+\int e^{4 x} \left (4 x^3+4 x^4\right ) \, dx\\ &=x^2-2 x^3+x^4+\int e^{4 x} x^3 (4+4 x) \, dx+\int e^{3 x} x^2 (12+12 x) \, dx+\int e^x x \left (8-8 x-4 x^2\right ) \, dx+\int \left (8 e^{2 x} x+14 e^{2 x} x^2-4 e^{2 x} x^3-4 e^{2 x} x^4\right ) \, dx\\ &=x^2-2 x^3+x^4-4 \int e^{2 x} x^3 \, dx-4 \int e^{2 x} x^4 \, dx+8 \int e^{2 x} x \, dx+14 \int e^{2 x} x^2 \, dx+\int \left (8 e^x x-8 e^x x^2-4 e^x x^3\right ) \, dx+\int \left (12 e^{3 x} x^2+12 e^{3 x} x^3\right ) \, dx+\int \left (4 e^{4 x} x^3+4 e^{4 x} x^4\right ) \, dx\\ &=4 e^{2 x} x+x^2+7 e^{2 x} x^2-2 x^3-2 e^{2 x} x^3+x^4-2 e^{2 x} x^4-4 \int e^{2 x} \, dx-4 \int e^x x^3 \, dx+4 \int e^{4 x} x^3 \, dx+4 \int e^{4 x} x^4 \, dx+6 \int e^{2 x} x^2 \, dx+8 \int e^x x \, dx-8 \int e^x x^2 \, dx+8 \int e^{2 x} x^3 \, dx+12 \int e^{3 x} x^2 \, dx+12 \int e^{3 x} x^3 \, dx-14 \int e^{2 x} x \, dx\\ &=-2 e^{2 x}+8 e^x x-3 e^{2 x} x+x^2-8 e^x x^2+10 e^{2 x} x^2+4 e^{3 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+e^{4 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4-3 \int e^{4 x} x^2 \, dx-4 \int e^{4 x} x^3 \, dx-6 \int e^{2 x} x \, dx+7 \int e^{2 x} \, dx-8 \int e^x \, dx-8 \int e^{3 x} x \, dx+12 \int e^x x^2 \, dx-12 \int e^{2 x} x^2 \, dx-12 \int e^{3 x} x^2 \, dx+16 \int e^x x \, dx\\ &=-8 e^x+\frac {3 e^{2 x}}{2}+24 e^x x-6 e^{2 x} x-\frac {8}{3} e^{3 x} x+x^2+4 e^x x^2+4 e^{2 x} x^2-\frac {3}{4} e^{4 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4+\frac {3}{2} \int e^{4 x} x \, dx+\frac {8}{3} \int e^{3 x} \, dx+3 \int e^{2 x} \, dx+3 \int e^{4 x} x^2 \, dx+8 \int e^{3 x} x \, dx+12 \int e^{2 x} x \, dx-16 \int e^x \, dx-24 \int e^x x \, dx\\ &=-24 e^x+3 e^{2 x}+\frac {8 e^{3 x}}{9}+\frac {3}{8} e^{4 x} x+x^2+4 e^x x^2+4 e^{2 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4-\frac {3}{8} \int e^{4 x} \, dx-\frac {3}{2} \int e^{4 x} x \, dx-\frac {8}{3} \int e^{3 x} \, dx-6 \int e^{2 x} \, dx+24 \int e^x \, dx\\ &=-\frac {3 e^{4 x}}{32}+x^2+4 e^x x^2+4 e^{2 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4+\frac {3}{8} \int e^{4 x} \, dx\\ &=x^2+4 e^x x^2+4 e^{2 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 23, normalized size = 1.05 \begin {gather*} x^2 \left (1+2 e^x-x+e^{2 x} x\right )^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.57, size = 62, normalized size = 2.82 \begin {gather*} x^{4} e^{\left (4 \, x\right )} + x^{4} + 4 \, x^{3} e^{\left (3 \, x\right )} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{4} - x^{3} - 2 \, x^{2}\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x^{3} - x^{2}\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 62, normalized size = 2.82 \begin {gather*} x^{4} e^{\left (4 \, x\right )} + x^{4} + 4 \, x^{3} e^{\left (3 \, x\right )} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{4} - x^{3} - 2 \, x^{2}\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x^{3} - x^{2}\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.05, size = 65, normalized size = 2.95
method | result | size |
risch | \(4 x^{3} {\mathrm e}^{3 x}+x^{4} {\mathrm e}^{4 x}+\left (-2 x^{4}+2 x^{3}+4 x^{2}\right ) {\mathrm e}^{2 x}+\left (-4 x^{3}+4 x^{2}\right ) {\mathrm e}^{x}+x^{4}-2 x^{3}+x^{2}\) | \(65\) |
default | \(4 x^{3} {\mathrm e}^{3 x}+x^{4} {\mathrm e}^{4 x}+4 \,{\mathrm e}^{x} x^{2}-4 \,{\mathrm e}^{x} x^{3}+4 \,{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}^{2 x} x^{3}-2 \,{\mathrm e}^{2 x} x^{4}+x^{2}-2 x^{3}+x^{4}\) | \(71\) |
norman | \(4 x^{3} {\mathrm e}^{3 x}+x^{4} {\mathrm e}^{4 x}+4 \,{\mathrm e}^{x} x^{2}-4 \,{\mathrm e}^{x} x^{3}+4 \,{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}^{2 x} x^{3}-2 \,{\mathrm e}^{2 x} x^{4}+x^{2}-2 x^{3}+x^{4}\) | \(71\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.40, size = 62, normalized size = 2.82 \begin {gather*} x^{4} e^{\left (4 \, x\right )} + x^{4} + 4 \, x^{3} e^{\left (3 \, x\right )} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{4} - x^{3} - 2 \, x^{2}\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x^{3} - x^{2}\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.06, size = 21, normalized size = 0.95 \begin {gather*} x^2\,{\left (2\,{\mathrm {e}}^x-x+x\,{\mathrm {e}}^{2\,x}+1\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.19, size = 63, normalized size = 2.86 \begin {gather*} x^{4} e^{4 x} + x^{4} + 4 x^{3} e^{3 x} - 2 x^{3} + x^{2} + \left (- 4 x^{3} + 4 x^{2}\right ) e^{x} + \left (- 2 x^{4} + 2 x^{3} + 4 x^{2}\right ) e^{2 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________