Optimal. Leaf size=33 \[ \left (e^4 \left (3+\frac {4}{x}\right )-x-\left (-e^x+x^2\right ) \left (x+x^2\right )\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.61, antiderivative size = 221, normalized size of antiderivative = 6.70, number of steps used = 50, number of rules used = 4, integrand size = 151, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.026, Rules used = {14, 2196, 2176, 2194} \begin {gather*} x^8+2 x^7-2 e^x x^6+x^6-4 e^x x^5+2 x^5-2 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4-2 e^x x^3+2 e^{2 x} x^3-14 e^4 x^3+6 e^x x^2+e^{2 x} x^2-2 \left (4-3 e^4\right ) e^x x^2+\left (1-8 e^4\right ) x^2+\frac {16 e^8}{x^2}-12 e^x x+4 \left (4-3 e^4\right ) e^x x-2 \left (2-13 e^4\right ) e^x x-6 e^4 x+12 e^x+22 e^{x+4}-4 \left (4-3 e^4\right ) e^x+2 \left (2-13 e^4\right ) e^x+\frac {24 e^8}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (2 e^{2 x} x (1+x) \left (1+3 x+x^2\right )+2 e^x \left (11 e^4-2 \left (1-\frac {13 e^4}{2}\right ) x-4 \left (1-\frac {3 e^4}{4}\right ) x^2-5 x^3-11 x^4-8 x^5-x^6\right )+\frac {2 \left (-16 e^8-12 e^8 x-3 e^4 x^3+\left (1-8 e^4\right ) x^4-21 e^4 x^5+4 \left (1-3 e^4\right ) x^6+5 x^7+3 x^8+7 x^9+4 x^{10}\right )}{x^3}\right ) \, dx\\ &=2 \int e^{2 x} x (1+x) \left (1+3 x+x^2\right ) \, dx+2 \int e^x \left (11 e^4-2 \left (1-\frac {13 e^4}{2}\right ) x-4 \left (1-\frac {3 e^4}{4}\right ) x^2-5 x^3-11 x^4-8 x^5-x^6\right ) \, dx+2 \int \frac {-16 e^8-12 e^8 x-3 e^4 x^3+\left (1-8 e^4\right ) x^4-21 e^4 x^5+4 \left (1-3 e^4\right ) x^6+5 x^7+3 x^8+7 x^9+4 x^{10}}{x^3} \, dx\\ &=2 \int \left (e^{2 x} x+4 e^{2 x} x^2+4 e^{2 x} x^3+e^{2 x} x^4\right ) \, dx+2 \int \left (11 e^{4+x}+e^x \left (-2+13 e^4\right ) x+e^x \left (-4+3 e^4\right ) x^2-5 e^x x^3-11 e^x x^4-8 e^x x^5-e^x x^6\right ) \, dx+2 \int \left (-3 e^4-\frac {16 e^8}{x^3}-\frac {12 e^8}{x^2}+\left (1-8 e^4\right ) x-21 e^4 x^2-4 \left (-1+3 e^4\right ) x^3+5 x^4+3 x^5+7 x^6+4 x^7\right ) \, dx\\ &=\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x+\left (1-8 e^4\right ) x^2-14 e^4 x^3+2 \left (1-3 e^4\right ) x^4+2 x^5+x^6+2 x^7+x^8+2 \int e^{2 x} x \, dx+2 \int e^{2 x} x^4 \, dx-2 \int e^x x^6 \, dx+8 \int e^{2 x} x^2 \, dx+8 \int e^{2 x} x^3 \, dx-10 \int e^x x^3 \, dx-16 \int e^x x^5 \, dx+22 \int e^{4+x} \, dx-22 \int e^x x^4 \, dx-\left (2 \left (2-13 e^4\right )\right ) \int e^x x \, dx-\left (2 \left (4-3 e^4\right )\right ) \int e^x x^2 \, dx\\ &=22 e^{4+x}+\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x+e^{2 x} x-2 e^x \left (2-13 e^4\right ) x+4 e^{2 x} x^2+\left (1-8 e^4\right ) x^2-2 e^x \left (4-3 e^4\right ) x^2-14 e^4 x^3-10 e^x x^3+4 e^{2 x} x^3-22 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4+2 x^5-16 e^x x^5+x^6-2 e^x x^6+2 x^7+x^8-4 \int e^{2 x} x^3 \, dx-8 \int e^{2 x} x \, dx-12 \int e^{2 x} x^2 \, dx+12 \int e^x x^5 \, dx+30 \int e^x x^2 \, dx+80 \int e^x x^4 \, dx+88 \int e^x x^3 \, dx+\left (2 \left (2-13 e^4\right )\right ) \int e^x \, dx+\left (4 \left (4-3 e^4\right )\right ) \int e^x x \, dx-\int e^{2 x} \, dx\\ &=-\frac {e^{2 x}}{2}+22 e^{4+x}+2 e^x \left (2-13 e^4\right )+\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x-3 e^{2 x} x-2 e^x \left (2-13 e^4\right ) x+4 e^x \left (4-3 e^4\right ) x+30 e^x x^2-2 e^{2 x} x^2+\left (1-8 e^4\right ) x^2-2 e^x \left (4-3 e^4\right ) x^2-14 e^4 x^3+78 e^x x^3+2 e^{2 x} x^3+58 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4+2 x^5-4 e^x x^5+x^6-2 e^x x^6+2 x^7+x^8+4 \int e^{2 x} \, dx+6 \int e^{2 x} x^2 \, dx+12 \int e^{2 x} x \, dx-60 \int e^x x \, dx-60 \int e^x x^4 \, dx-264 \int e^x x^2 \, dx-320 \int e^x x^3 \, dx-\left (4 \left (4-3 e^4\right )\right ) \int e^x \, dx\\ &=\frac {3 e^{2 x}}{2}+22 e^{4+x}+2 e^x \left (2-13 e^4\right )-4 e^x \left (4-3 e^4\right )+\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x-60 e^x x+3 e^{2 x} x-2 e^x \left (2-13 e^4\right ) x+4 e^x \left (4-3 e^4\right ) x-234 e^x x^2+e^{2 x} x^2+\left (1-8 e^4\right ) x^2-2 e^x \left (4-3 e^4\right ) x^2-14 e^4 x^3-242 e^x x^3+2 e^{2 x} x^3-2 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4+2 x^5-4 e^x x^5+x^6-2 e^x x^6+2 x^7+x^8-6 \int e^{2 x} \, dx-6 \int e^{2 x} x \, dx+60 \int e^x \, dx+240 \int e^x x^3 \, dx+528 \int e^x x \, dx+960 \int e^x x^2 \, dx\\ &=60 e^x-\frac {3 e^{2 x}}{2}+22 e^{4+x}+2 e^x \left (2-13 e^4\right )-4 e^x \left (4-3 e^4\right )+\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x+468 e^x x-2 e^x \left (2-13 e^4\right ) x+4 e^x \left (4-3 e^4\right ) x+726 e^x x^2+e^{2 x} x^2+\left (1-8 e^4\right ) x^2-2 e^x \left (4-3 e^4\right ) x^2-14 e^4 x^3-2 e^x x^3+2 e^{2 x} x^3-2 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4+2 x^5-4 e^x x^5+x^6-2 e^x x^6+2 x^7+x^8+3 \int e^{2 x} \, dx-528 \int e^x \, dx-720 \int e^x x^2 \, dx-1920 \int e^x x \, dx\\ &=-468 e^x+22 e^{4+x}+2 e^x \left (2-13 e^4\right )-4 e^x \left (4-3 e^4\right )+\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x-1452 e^x x-2 e^x \left (2-13 e^4\right ) x+4 e^x \left (4-3 e^4\right ) x+6 e^x x^2+e^{2 x} x^2+\left (1-8 e^4\right ) x^2-2 e^x \left (4-3 e^4\right ) x^2-14 e^4 x^3-2 e^x x^3+2 e^{2 x} x^3-2 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4+2 x^5-4 e^x x^5+x^6-2 e^x x^6+2 x^7+x^8+1440 \int e^x x \, dx+1920 \int e^x \, dx\\ &=1452 e^x+22 e^{4+x}+2 e^x \left (2-13 e^4\right )-4 e^x \left (4-3 e^4\right )+\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x-12 e^x x-2 e^x \left (2-13 e^4\right ) x+4 e^x \left (4-3 e^4\right ) x+6 e^x x^2+e^{2 x} x^2+\left (1-8 e^4\right ) x^2-2 e^x \left (4-3 e^4\right ) x^2-14 e^4 x^3-2 e^x x^3+2 e^{2 x} x^3-2 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4+2 x^5-4 e^x x^5+x^6-2 e^x x^6+2 x^7+x^8-1440 \int e^x \, dx\\ &=12 e^x+22 e^{4+x}+2 e^x \left (2-13 e^4\right )-4 e^x \left (4-3 e^4\right )+\frac {16 e^8}{x^2}+\frac {24 e^8}{x}-6 e^4 x-12 e^x x-2 e^x \left (2-13 e^4\right ) x+4 e^x \left (4-3 e^4\right ) x+6 e^x x^2+e^{2 x} x^2+\left (1-8 e^4\right ) x^2-2 e^x \left (4-3 e^4\right ) x^2-14 e^4 x^3-2 e^x x^3+2 e^{2 x} x^3-2 e^x x^4+e^{2 x} x^4+2 \left (1-3 e^4\right ) x^4+2 x^5-4 e^x x^5+x^6-2 e^x x^6+2 x^7+x^8\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.19, size = 98, normalized size = 2.97 \begin {gather*} e^{2 x} x^2 (1+x)^2+\frac {8 e^8 (2+3 x)}{x^2}+2 e^{4+x} \left (4+7 x+3 x^2\right )-2 e^4 x \left (3+4 x+7 x^2+3 x^3\right )+\left (x+x^3+x^4\right )^2-2 e^x x^2 \left (1+x+x^2+2 x^3+x^4\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.70, size = 122, normalized size = 3.70 \begin {gather*} \frac {x^{10} + 2 \, x^{9} + x^{8} + 2 \, x^{7} + 2 \, x^{6} + x^{4} + 8 \, {\left (3 \, x + 2\right )} e^{8} - 2 \, {\left (3 \, x^{6} + 7 \, x^{5} + 4 \, x^{4} + 3 \, x^{3}\right )} e^{4} + {\left (x^{6} + 2 \, x^{5} + x^{4}\right )} e^{\left (2 \, x\right )} - 2 \, {\left (x^{8} + 2 \, x^{7} + x^{6} + x^{5} + x^{4} - {\left (3 \, x^{4} + 7 \, x^{3} + 4 \, x^{2}\right )} e^{4}\right )} e^{x}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 153, normalized size = 4.64 \begin {gather*} \frac {x^{10} + 2 \, x^{9} - 2 \, x^{8} e^{x} + x^{8} - 4 \, x^{7} e^{x} + 2 \, x^{7} - 6 \, x^{6} e^{4} + x^{6} e^{\left (2 \, x\right )} - 2 \, x^{6} e^{x} + 2 \, x^{6} - 14 \, x^{5} e^{4} + 2 \, x^{5} e^{\left (2 \, x\right )} - 2 \, x^{5} e^{x} - 8 \, x^{4} e^{4} + x^{4} e^{\left (2 \, x\right )} + 6 \, x^{4} e^{\left (x + 4\right )} - 2 \, x^{4} e^{x} + x^{4} - 6 \, x^{3} e^{4} + 14 \, x^{3} e^{\left (x + 4\right )} + 8 \, x^{2} e^{\left (x + 4\right )} + 24 \, x e^{8} + 16 \, e^{8}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.08, size = 128, normalized size = 3.88
method | result | size |
risch | \(x^{8}+2 x^{7}+x^{6}-6 x^{4} {\mathrm e}^{4}+2 x^{5}-14 x^{3} {\mathrm e}^{4}+2 x^{4}-8 x^{2} {\mathrm e}^{4}-6 x \,{\mathrm e}^{4}+x^{2}+\frac {24 x \,{\mathrm e}^{8}+16 \,{\mathrm e}^{8}}{x^{2}}+\left (x^{4}+2 x^{3}+x^{2}\right ) {\mathrm e}^{2 x}+\left (-2 x^{6}-4 x^{5}-2 x^{4}+6 x^{2} {\mathrm e}^{4}-2 x^{3}+14 x \,{\mathrm e}^{4}-2 x^{2}+8 \,{\mathrm e}^{4}\right ) {\mathrm e}^{x}\) | \(128\) |
norman | \(\frac {x^{8}+x^{10}+x^{6} {\mathrm e}^{2 x}+\left (2-6 \,{\mathrm e}^{4}\right ) x^{6}+\left (-8 \,{\mathrm e}^{4}+1\right ) x^{4}+{\mathrm e}^{2 x} x^{4}+\left (-2+6 \,{\mathrm e}^{4}\right ) x^{4} {\mathrm e}^{x}+2 x^{7}+2 x^{9}+16 \,{\mathrm e}^{8}+24 x \,{\mathrm e}^{8}-6 x^{3} {\mathrm e}^{4}-14 x^{5} {\mathrm e}^{4}-2 x^{5} {\mathrm e}^{x}+2 x^{5} {\mathrm e}^{2 x}-2 x^{6} {\mathrm e}^{x}-4 x^{7} {\mathrm e}^{x}-2 x^{8} {\mathrm e}^{x}+8 x^{2} {\mathrm e}^{4} {\mathrm e}^{x}+14 \,{\mathrm e}^{4} {\mathrm e}^{x} x^{3}}{x^{2}}\) | \(152\) |
default | \(-4 x^{5} {\mathrm e}^{x}+2 \,{\mathrm e}^{2 x} x^{3}+2 x^{7}+x^{8}+x^{6}+2 x^{5}+2 x^{4}+x^{2}+\frac {16 \,{\mathrm e}^{8}}{x^{2}}-14 x^{3} {\mathrm e}^{4}-2 x^{6} {\mathrm e}^{x}-8 x^{2} {\mathrm e}^{4}+{\mathrm e}^{2 x} x^{4}-2 \,{\mathrm e}^{x} x^{4}+{\mathrm e}^{2 x} x^{2}-2 \,{\mathrm e}^{x} x^{2}-2 \,{\mathrm e}^{x} x^{3}+22 \,{\mathrm e}^{4} {\mathrm e}^{x}-6 x^{4} {\mathrm e}^{4}+\frac {24 \,{\mathrm e}^{8}}{x}+26 \,{\mathrm e}^{4} \left ({\mathrm e}^{x} x -{\mathrm e}^{x}\right )+6 \,{\mathrm e}^{4} \left ({\mathrm e}^{x} x^{2}-2 \,{\mathrm e}^{x} x +2 \,{\mathrm e}^{x}\right )-6 x \,{\mathrm e}^{4}\) | \(169\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.38, size = 294, normalized size = 8.91 \begin {gather*} x^{8} + 2 \, x^{7} + x^{6} + 2 \, x^{5} - 6 \, x^{4} e^{4} + 2 \, x^{4} - 14 \, x^{3} e^{4} - 8 \, x^{2} e^{4} + x^{2} - 6 \, x e^{4} + \frac {1}{2} \, {\left (2 \, x^{4} - 4 \, x^{3} + 6 \, x^{2} - 6 \, x + 3\right )} e^{\left (2 \, x\right )} + {\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} e^{\left (2 \, x\right )} + 2 \, {\left (2 \, x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} + \frac {1}{2} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} - 2 \, {\left (x^{6} - 6 \, x^{5} + 30 \, x^{4} - 120 \, x^{3} + 360 \, x^{2} - 720 \, x + 720\right )} e^{x} - 16 \, {\left (x^{5} - 5 \, x^{4} + 20 \, x^{3} - 60 \, x^{2} + 120 \, x - 120\right )} e^{x} - 22 \, {\left (x^{4} - 4 \, x^{3} + 12 \, x^{2} - 24 \, x + 24\right )} e^{x} - 10 \, {\left (x^{3} - 3 \, x^{2} + 6 \, x - 6\right )} e^{x} + 6 \, {\left (x^{2} e^{4} - 2 \, x e^{4} + 2 \, e^{4}\right )} e^{x} - 8 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 26 \, {\left (x e^{4} - e^{4}\right )} e^{x} - 4 \, {\left (x - 1\right )} e^{x} + \frac {24 \, e^{8}}{x} + \frac {16 \, e^{8}}{x^{2}} + 22 \, e^{\left (x + 4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.07, size = 143, normalized size = 4.33 \begin {gather*} 8\,{\mathrm {e}}^{x+4}+14\,x\,{\mathrm {e}}^{x+4}-2\,x^3\,{\mathrm {e}}^x-2\,x^4\,{\mathrm {e}}^x-4\,x^5\,{\mathrm {e}}^x-2\,x^6\,{\mathrm {e}}^x-6\,x\,{\mathrm {e}}^4-x^2\,\left (8\,{\mathrm {e}}^4-1\right )-x^4\,\left (6\,{\mathrm {e}}^4-2\right )+x^2\,{\mathrm {e}}^{2\,x}+2\,x^3\,{\mathrm {e}}^{2\,x}+x^4\,{\mathrm {e}}^{2\,x}-14\,x^3\,{\mathrm {e}}^4+\frac {24\,{\mathrm {e}}^8}{x}+\frac {16\,{\mathrm {e}}^8}{x^2}+2\,x^5+x^6+2\,x^7+x^8+x^2\,{\mathrm {e}}^x\,\left (6\,{\mathrm {e}}^4-2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.38, size = 133, normalized size = 4.03 \begin {gather*} x^{8} + 2 x^{7} + x^{6} + 2 x^{5} + x^{4} \left (2 - 6 e^{4}\right ) - 14 x^{3} e^{4} + x^{2} \left (1 - 8 e^{4}\right ) - 6 x e^{4} + \left (x^{4} + 2 x^{3} + x^{2}\right ) e^{2 x} + \left (- 2 x^{6} - 4 x^{5} - 2 x^{4} - 2 x^{3} - 2 x^{2} + 6 x^{2} e^{4} + 14 x e^{4} + 8 e^{4}\right ) e^{x} + \frac {24 x e^{8} + 16 e^{8}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________