Optimal. Leaf size=25 \[ \left (3-x-e^{2 x} x^2+x \left (e+x+x^2\right )\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.49, antiderivative size = 114, normalized size of antiderivative = 4.56, number of steps used = 46, number of rules used = 5, integrand size = 108, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.046, Rules used = {6, 1593, 2196, 2176, 2194} \begin {gather*} x^6-2 e^{2 x} x^5+2 x^5-2 e^{2 x} x^4+e^{4 x} x^4+2 e x^4-x^4+2 e^{2 x} x^3-2 e^{2 x+1} x^3+2 e x^3+4 x^3-6 e^{2 x} x^2+\left (7+e^2\right ) x^2-2 e x^2+6 e x-6 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 1593
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-6+\left (14+2 e^2\right ) x+12 x^2-4 x^3+10 x^4+6 x^5+e \left (6-4 x+6 x^2+8 x^3\right )+e^{4 x} \left (4 x^3+4 x^4\right )+e^{2 x} \left (-12 x-6 x^2-4 x^3-14 x^4-4 x^5+e \left (-6 x^2-4 x^3\right )\right )\right ) \, dx\\ &=-6 x+\left (7+e^2\right ) x^2+4 x^3-x^4+2 x^5+x^6+e \int \left (6-4 x+6 x^2+8 x^3\right ) \, dx+\int e^{4 x} \left (4 x^3+4 x^4\right ) \, dx+\int e^{2 x} \left (-12 x-6 x^2-4 x^3-14 x^4-4 x^5+e \left (-6 x^2-4 x^3\right )\right ) \, dx\\ &=-6 x+6 e x-2 e x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3-x^4+2 e x^4+2 x^5+x^6+\int e^{4 x} x^3 (4+4 x) \, dx+\int \left (-12 e^{2 x} x-6 e^{2 x} x^2-4 e^{2 x} x^3-14 e^{2 x} x^4-4 e^{2 x} x^5-2 e^{1+2 x} x^2 (3+2 x)\right ) \, dx\\ &=-6 x+6 e x-2 e x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3-x^4+2 e x^4+2 x^5+x^6-2 \int e^{1+2 x} x^2 (3+2 x) \, dx-4 \int e^{2 x} x^3 \, dx-4 \int e^{2 x} x^5 \, dx-6 \int e^{2 x} x^2 \, dx-12 \int e^{2 x} x \, dx-14 \int e^{2 x} x^4 \, dx+\int \left (4 e^{4 x} x^3+4 e^{4 x} x^4\right ) \, dx\\ &=-6 x+6 e x-6 e^{2 x} x-2 e x^2-3 e^{2 x} x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3-2 e^{2 x} x^3-x^4+2 e x^4-7 e^{2 x} x^4+2 x^5-2 e^{2 x} x^5+x^6-2 \int \left (3 e^{1+2 x} x^2+2 e^{1+2 x} x^3\right ) \, dx+4 \int e^{4 x} x^3 \, dx+4 \int e^{4 x} x^4 \, dx+6 \int e^{2 x} \, dx+6 \int e^{2 x} x \, dx+6 \int e^{2 x} x^2 \, dx+10 \int e^{2 x} x^4 \, dx+28 \int e^{2 x} x^3 \, dx\\ &=3 e^{2 x}-6 x+6 e x-3 e^{2 x} x-2 e x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3+12 e^{2 x} x^3+e^{4 x} x^3-x^4+2 e x^4-2 e^{2 x} x^4+e^{4 x} x^4+2 x^5-2 e^{2 x} x^5+x^6-3 \int e^{2 x} \, dx-3 \int e^{4 x} x^2 \, dx-4 \int e^{4 x} x^3 \, dx-4 \int e^{1+2 x} x^3 \, dx-6 \int e^{2 x} x \, dx-6 \int e^{1+2 x} x^2 \, dx-20 \int e^{2 x} x^3 \, dx-42 \int e^{2 x} x^2 \, dx\\ &=\frac {3 e^{2 x}}{2}-6 x+6 e x-6 e^{2 x} x-2 e x^2-21 e^{2 x} x^2-\frac {3}{4} e^{4 x} x^2-3 e^{1+2 x} x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3+2 e^{2 x} x^3-2 e^{1+2 x} x^3-x^4+2 e x^4-2 e^{2 x} x^4+e^{4 x} x^4+2 x^5-2 e^{2 x} x^5+x^6+\frac {3}{2} \int e^{4 x} x \, dx+3 \int e^{2 x} \, dx+3 \int e^{4 x} x^2 \, dx+6 \int e^{1+2 x} x \, dx+6 \int e^{1+2 x} x^2 \, dx+30 \int e^{2 x} x^2 \, dx+42 \int e^{2 x} x \, dx\\ &=3 e^{2 x}-6 x+6 e x+15 e^{2 x} x+\frac {3}{8} e^{4 x} x+3 e^{1+2 x} x-2 e x^2-6 e^{2 x} x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3+2 e^{2 x} x^3-2 e^{1+2 x} x^3-x^4+2 e x^4-2 e^{2 x} x^4+e^{4 x} x^4+2 x^5-2 e^{2 x} x^5+x^6-\frac {3}{8} \int e^{4 x} \, dx-\frac {3}{2} \int e^{4 x} x \, dx-3 \int e^{1+2 x} \, dx-6 \int e^{1+2 x} x \, dx-21 \int e^{2 x} \, dx-30 \int e^{2 x} x \, dx\\ &=-\frac {15 e^{2 x}}{2}-\frac {3 e^{4 x}}{32}-\frac {3}{2} e^{1+2 x}-6 x+6 e x-2 e x^2-6 e^{2 x} x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3+2 e^{2 x} x^3-2 e^{1+2 x} x^3-x^4+2 e x^4-2 e^{2 x} x^4+e^{4 x} x^4+2 x^5-2 e^{2 x} x^5+x^6+\frac {3}{8} \int e^{4 x} \, dx+3 \int e^{1+2 x} \, dx+15 \int e^{2 x} \, dx\\ &=-6 x+6 e x-2 e x^2-6 e^{2 x} x^2+\left (7+e^2\right ) x^2+4 x^3+2 e x^3+2 e^{2 x} x^3-2 e^{1+2 x} x^3-x^4+2 e x^4-2 e^{2 x} x^4+e^{4 x} x^4+2 x^5-2 e^{2 x} x^5+x^6\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.11, size = 91, normalized size = 3.64 \begin {gather*} -6 x+6 e x+7 x^2-2 e x^2+e^2 x^2+4 x^3+2 e x^3-x^4+2 e x^4+e^{4 x} x^4+2 x^5+x^6-2 e^{2 x} \left (3 x^2+(-1+e) x^3+x^4+x^5\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.60, size = 89, normalized size = 3.56 \begin {gather*} x^{6} + 2 \, x^{5} + x^{4} e^{\left (4 \, x\right )} - x^{4} + 4 \, x^{3} + x^{2} e^{2} + 7 \, x^{2} + 2 \, {\left (x^{4} + x^{3} - x^{2} + 3 \, x\right )} e - 2 \, {\left (x^{5} + x^{4} + x^{3} e - x^{3} + 3 \, x^{2}\right )} e^{\left (2 \, x\right )} - 6 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.25, size = 94, normalized size = 3.76 \begin {gather*} x^{6} + 2 \, x^{5} + x^{4} e^{\left (4 \, x\right )} - x^{4} - 2 \, x^{3} e^{\left (2 \, x + 1\right )} + 4 \, x^{3} + x^{2} e^{2} + 7 \, x^{2} + 2 \, {\left (x^{4} + x^{3} - x^{2} + 3 \, x\right )} e - 2 \, {\left (x^{5} + x^{4} - x^{3} + 3 \, x^{2}\right )} e^{\left (2 \, x\right )} - 6 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 101, normalized size = 4.04
method | result | size |
norman | \(x^{6}+x^{4} {\mathrm e}^{4 x}+\left (2 \,{\mathrm e}-1\right ) x^{4}+\left (2 \,{\mathrm e}+4\right ) x^{3}+\left (6 \,{\mathrm e}-6\right ) x +\left ({\mathrm e}^{2}-2 \,{\mathrm e}+7\right ) x^{2}+\left (-2 \,{\mathrm e}+2\right ) x^{3} {\mathrm e}^{2 x}+2 x^{5}-2 x^{5} {\mathrm e}^{2 x}-6 \,{\mathrm e}^{2 x} x^{2}-2 \,{\mathrm e}^{2 x} x^{4}\) | \(101\) |
risch | \(x^{4} {\mathrm e}^{4 x}+\left (-2 x^{5}-2 x^{3} {\mathrm e}-2 x^{4}+2 x^{3}-6 x^{2}\right ) {\mathrm e}^{2 x}+x^{2} {\mathrm e}^{2}+2 x^{4} {\mathrm e}+2 x^{3} {\mathrm e}-2 x^{2} {\mathrm e}+6 x \,{\mathrm e}+x^{6}+2 x^{5}-x^{4}+4 x^{3}+7 x^{2}-6 x\) | \(101\) |
default | \(-6 x -2 \,{\mathrm e}^{2 x} x^{4}+2 \,{\mathrm e}^{2 x} x^{3}-6 \,{\mathrm e}^{2 x} x^{2}-2 x^{5} {\mathrm e}^{2 x}-6 \,{\mathrm e} \left (\frac {{\mathrm e}^{2 x} x^{2}}{2}-\frac {x \,{\mathrm e}^{2 x}}{2}+\frac {{\mathrm e}^{2 x}}{4}\right )-4 \,{\mathrm e} \left (\frac {{\mathrm e}^{2 x} x^{3}}{2}-\frac {3 \,{\mathrm e}^{2 x} x^{2}}{4}+\frac {3 x \,{\mathrm e}^{2 x}}{4}-\frac {3 \,{\mathrm e}^{2 x}}{8}\right )+x^{4} {\mathrm e}^{4 x}+{\mathrm e} \left (2 x^{4}+2 x^{3}-2 x^{2}+6 x \right )+7 x^{2}+4 x^{3}-x^{4}+2 x^{5}+x^{6}+x^{2} {\mathrm e}^{2}\) | \(165\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.39, size = 86, normalized size = 3.44 \begin {gather*} x^{6} + 2 \, x^{5} + x^{4} e^{\left (4 \, x\right )} - x^{4} + 4 \, x^{3} + x^{2} e^{2} + 7 \, x^{2} + 2 \, {\left (x^{4} + x^{3} - x^{2} + 3 \, x\right )} e - 2 \, {\left (x^{5} + x^{4} + x^{3} {\left (e - 1\right )} + 3 \, x^{2}\right )} e^{\left (2 \, x\right )} - 6 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.13, size = 99, normalized size = 3.96 \begin {gather*} x^4\,\left (2\,\mathrm {e}-1\right )+x^3\,\left (2\,\mathrm {e}+4\right )-6\,x^2\,{\mathrm {e}}^{2\,x}-2\,x^4\,{\mathrm {e}}^{2\,x}-2\,x^5\,{\mathrm {e}}^{2\,x}+x^4\,{\mathrm {e}}^{4\,x}+x^2\,\left ({\mathrm {e}}^2-2\,\mathrm {e}+7\right )+2\,x^5+x^6+x\,\left (6\,\mathrm {e}-6\right )-x^3\,{\mathrm {e}}^{2\,x}\,\left (2\,\mathrm {e}-2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.18, size = 92, normalized size = 3.68 \begin {gather*} x^{6} + 2 x^{5} + x^{4} e^{4 x} + x^{4} \left (-1 + 2 e\right ) + x^{3} \left (4 + 2 e\right ) + x^{2} \left (- 2 e + 7 + e^{2}\right ) + x \left (-6 + 6 e\right ) + \left (- 2 x^{5} - 2 x^{4} - 2 e x^{3} + 2 x^{3} - 6 x^{2}\right ) e^{2 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________