Optimal. Leaf size=26 \[ x^3 \left (-23-x-\frac {e^{-x} x^2}{2+x}\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 1.87, antiderivative size = 159, normalized size of antiderivative = 6.12, number of steps used = 60, number of rules used = 7, integrand size = 94, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {6688, 14, 2199, 2194, 2176, 2177, 2178} \begin {gather*} e^{-2 x} x^5+2 e^{-x} x^5+x^5-4 e^{-2 x} x^4+42 e^{-x} x^4+46 x^4+12 e^{-2 x} x^3-84 e^{-x} x^3+529 x^3-32 e^{-2 x} x^2+168 e^{-x} x^2+80 e^{-2 x} x-336 e^{-x} x-192 e^{-2 x}+672 e^{-x}+\frac {448 e^{-2 x}}{x+2}-\frac {1344 e^{-x}}{x+2}-\frac {128 e^{-2 x}}{(x+2)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int x^2 \left (1587+184 x+5 x^2+\frac {e^{-2 x} x^4 \left (14+x-2 x^2\right )}{(2+x)^3}-\frac {2 e^{-x} x^2 \left (-230-58 x+20 x^2+x^3\right )}{(2+x)^2}\right ) \, dx\\ &=\int \left (-\frac {e^{-2 x} x^6 \left (-14-x+2 x^2\right )}{(2+x)^3}+x^2 \left (1587+184 x+5 x^2\right )-\frac {2 e^{-x} x^4 \left (-230-58 x+20 x^2+x^3\right )}{(2+x)^2}\right ) \, dx\\ &=-\left (2 \int \frac {e^{-x} x^4 \left (-230-58 x+20 x^2+x^3\right )}{(2+x)^2} \, dx\right )-\int \frac {e^{-2 x} x^6 \left (-14-x+2 x^2\right )}{(2+x)^3} \, dx+\int x^2 \left (1587+184 x+5 x^2\right ) \, dx\\ &=-\left (2 \int \left (504 e^{-x}-336 e^{-x} x+210 e^{-x} x^2-126 e^{-x} x^3+16 e^{-x} x^4+e^{-x} x^5-\frac {672 e^{-x}}{(2+x)^2}-\frac {672 e^{-x}}{2+x}\right ) \, dx\right )+\int \left (1587 x^2+184 x^3+5 x^4\right ) \, dx-\int \left (-464 e^{-2 x}+224 e^{-2 x} x-100 e^{-2 x} x^2+40 e^{-2 x} x^3-13 e^{-2 x} x^4+2 e^{-2 x} x^5-\frac {256 e^{-2 x}}{(2+x)^3}+\frac {192 e^{-2 x}}{(2+x)^2}+\frac {896 e^{-2 x}}{2+x}\right ) \, dx\\ &=529 x^3+46 x^4+x^5-2 \int e^{-2 x} x^5 \, dx-2 \int e^{-x} x^5 \, dx+13 \int e^{-2 x} x^4 \, dx-32 \int e^{-x} x^4 \, dx-40 \int e^{-2 x} x^3 \, dx+100 \int e^{-2 x} x^2 \, dx-192 \int \frac {e^{-2 x}}{(2+x)^2} \, dx-224 \int e^{-2 x} x \, dx+252 \int e^{-x} x^3 \, dx+256 \int \frac {e^{-2 x}}{(2+x)^3} \, dx-420 \int e^{-x} x^2 \, dx+464 \int e^{-2 x} \, dx+672 \int e^{-x} x \, dx-896 \int \frac {e^{-2 x}}{2+x} \, dx-1008 \int e^{-x} \, dx+1344 \int \frac {e^{-x}}{(2+x)^2} \, dx+1344 \int \frac {e^{-x}}{2+x} \, dx\\ &=-232 e^{-2 x}+1008 e^{-x}+112 e^{-2 x} x-672 e^{-x} x-50 e^{-2 x} x^2+420 e^{-x} x^2+529 x^3+20 e^{-2 x} x^3-252 e^{-x} x^3+46 x^4-\frac {13}{2} e^{-2 x} x^4+32 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {192 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}+1344 e^2 \text {Ei}(-2-x)-896 e^4 \text {Ei}(-2 (2+x))-5 \int e^{-2 x} x^4 \, dx-10 \int e^{-x} x^4 \, dx+26 \int e^{-2 x} x^3 \, dx-60 \int e^{-2 x} x^2 \, dx+100 \int e^{-2 x} x \, dx-112 \int e^{-2 x} \, dx-128 \int e^{-x} x^3 \, dx-256 \int \frac {e^{-2 x}}{(2+x)^2} \, dx+384 \int \frac {e^{-2 x}}{2+x} \, dx+672 \int e^{-x} \, dx+756 \int e^{-x} x^2 \, dx-840 \int e^{-x} x \, dx-1344 \int \frac {e^{-x}}{2+x} \, dx\\ &=-176 e^{-2 x}+336 e^{-x}+62 e^{-2 x} x+168 e^{-x} x-20 e^{-2 x} x^2-336 e^{-x} x^2+529 x^3+7 e^{-2 x} x^3-124 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-512 e^4 \text {Ei}(-2 (2+x))-10 \int e^{-2 x} x^3 \, dx+39 \int e^{-2 x} x^2 \, dx-40 \int e^{-x} x^3 \, dx+50 \int e^{-2 x} \, dx-60 \int e^{-2 x} x \, dx-384 \int e^{-x} x^2 \, dx+512 \int \frac {e^{-2 x}}{2+x} \, dx-840 \int e^{-x} \, dx+1512 \int e^{-x} x \, dx\\ &=-201 e^{-2 x}+1176 e^{-x}+92 e^{-2 x} x-1344 e^{-x} x-\frac {79}{2} e^{-2 x} x^2+48 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-15 \int e^{-2 x} x^2 \, dx-30 \int e^{-2 x} \, dx+39 \int e^{-2 x} x \, dx-120 \int e^{-x} x^2 \, dx-768 \int e^{-x} x \, dx+1512 \int e^{-x} \, dx\\ &=-186 e^{-2 x}-336 e^{-x}+\frac {145}{2} e^{-2 x} x-576 e^{-x} x-32 e^{-2 x} x^2+168 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-15 \int e^{-2 x} x \, dx+\frac {39}{2} \int e^{-2 x} \, dx-240 \int e^{-x} x \, dx-768 \int e^{-x} \, dx\\ &=-\frac {783}{4} e^{-2 x}+432 e^{-x}+80 e^{-2 x} x-336 e^{-x} x-32 e^{-2 x} x^2+168 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}-\frac {15}{2} \int e^{-2 x} \, dx-240 \int e^{-x} \, dx\\ &=-192 e^{-2 x}+672 e^{-x}+80 e^{-2 x} x-336 e^{-x} x-32 e^{-2 x} x^2+168 e^{-x} x^2+529 x^3+12 e^{-2 x} x^3-84 e^{-x} x^3+46 x^4-4 e^{-2 x} x^4+42 e^{-x} x^4+x^5+e^{-2 x} x^5+2 e^{-x} x^5-\frac {128 e^{-2 x}}{(2+x)^2}+\frac {448 e^{-2 x}}{2+x}-\frac {1344 e^{-x}}{2+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.34, size = 60, normalized size = 2.31 \begin {gather*} \frac {e^{-2 x} \left (x^7+2 e^x x^5 \left (46+25 x+x^2\right )+e^{2 x} (2+x)^3 \left (1764-882 x+441 x^2+44 x^3+x^4\right )\right )}{(2+x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.77, size = 72, normalized size = 2.77 \begin {gather*} {\left (x^{5} + {\left (x^{5} + 46 \, x^{4} + 529 \, x^{3}\right )} e^{\left (2 \, x + 2 \, \log \left (\frac {x + 2}{x}\right )\right )} + 2 \, {\left (x^{5} + 23 \, x^{4}\right )} e^{\left (x + \log \left (\frac {x + 2}{x}\right )\right )}\right )} e^{\left (-2 \, x - 2 \, \log \left (\frac {x + 2}{x}\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.28, size = 70, normalized size = 2.69 \begin {gather*} \frac {2 \, x^{7} e^{\left (-x\right )} + x^{7} e^{\left (-2 \, x\right )} + x^{7} + 50 \, x^{6} e^{\left (-x\right )} + 50 \, x^{6} + 92 \, x^{5} e^{\left (-x\right )} + 717 \, x^{5} + 2300 \, x^{4} + 2116 \, x^{3}}{x^{2} + 4 \, x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.36, size = 50, normalized size = 1.92
method | result | size |
risch | \(x^{5}+46 x^{4}+529 x^{3}+\frac {\left (2 x^{5}+46 x^{4}\right ) x \,{\mathrm e}^{-x}}{2+x}+\frac {x^{7} {\mathrm e}^{-2 x}}{\left (2+x \right )^{2}}\) | \(50\) |
default | \(x^{5}+46 x^{4}+529 x^{3}+168 x^{2} {\mathrm e}^{-x}-336 x \,{\mathrm e}^{-x}+672 \,{\mathrm e}^{-x}+\frac {1344 \,{\mathrm e}^{-x}}{-x -2}-84 \,{\mathrm e}^{-x} x^{3}+42 \,{\mathrm e}^{-x} x^{4}+2 \,{\mathrm e}^{-x} x^{5}-4 \,{\mathrm e}^{-2 x} x^{4}+12 \,{\mathrm e}^{-2 x} x^{3}-32 x^{2} {\mathrm e}^{-2 x}+80 \,{\mathrm e}^{-2 x} x -192 \,{\mathrm e}^{-2 x}-\frac {896 \,{\mathrm e}^{-2 x}}{-2 x -4}-\frac {512 \,{\mathrm e}^{-2 x}}{\left (-2 x -4\right )^{2}}+{\mathrm e}^{-2 x} x^{5}\) | \(151\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.47, size = 63, normalized size = 2.42 \begin {gather*} \frac {x^{7} e^{\left (-2 \, x\right )} + x^{7} + 50 \, x^{6} + 717 \, x^{5} + 2300 \, x^{4} + 2116 \, x^{3} + 2 \, {\left (x^{7} + 25 \, x^{6} + 46 \, x^{5}\right )} e^{\left (-x\right )}}{x^{2} + 4 \, x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.30, size = 60, normalized size = 2.31 \begin {gather*} 529\,x^3+46\,x^4+x^5+\frac {46\,x^5\,{\mathrm {e}}^{-x}}{x+2}+\frac {2\,x^6\,{\mathrm {e}}^{-x}}{x+2}+\frac {x^7\,{\mathrm {e}}^{-2\,x}}{x^2+4\,x+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.23, size = 63, normalized size = 2.42 \begin {gather*} x^{5} + 46 x^{4} + 529 x^{3} + \frac {\left (x^{8} + 2 x^{7}\right ) e^{- 2 x} + \left (2 x^{8} + 54 x^{7} + 192 x^{6} + 184 x^{5}\right ) e^{- x}}{x^{3} + 6 x^{2} + 12 x + 8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________