Optimal. Leaf size=34 \[ -x+\left (2+\frac {2 \left (-4-\frac {3+e^{5+2 x}}{x}-x\right )}{2+x}\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 1.82, antiderivative size = 139, normalized size of antiderivative = 4.09, number of steps used = 42, number of rules used = 7, integrand size = 93, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {6741, 6742, 44, 37, 43, 2177, 2178} \begin {gather*} -\frac {3 x^2}{(x+2)^2}+\frac {6 e^{2 x+5}}{x^2}+\frac {e^{4 x+10}}{x^2}+\frac {9}{x^2}-x+\frac {2 e^{2 x+5}}{x+2}+\frac {e^{4 x+10}}{x+2}-\frac {15}{x+2}-\frac {2 e^{2 x+5}}{(x+2)^2}+\frac {e^{4 x+10}}{(x+2)^2}+\frac {13}{(x+2)^2}-\frac {2 e^{2 x+5}}{x}-\frac {e^{4 x+10}}{x}+\frac {3}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 43
Rule 44
Rule 2177
Rule 2178
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-144-240 x-144 x^2-40 x^3-12 x^4-6 x^5-x^6+e^{10+4 x} \left (-16+16 x+16 x^2\right )+e^{5+2 x} \left (-96-32 x+64 x^2+32 x^3\right )}{x^3 (2+x)^3} \, dx\\ &=\int \left (-\frac {40}{(2+x)^3}-\frac {144}{x^3 (2+x)^3}-\frac {240}{x^2 (2+x)^3}-\frac {144}{x (2+x)^3}-\frac {12 x}{(2+x)^3}-\frac {6 x^2}{(2+x)^3}-\frac {x^3}{(2+x)^3}+\frac {16 e^{10+4 x} \left (-1+x+x^2\right )}{x^3 (2+x)^3}+\frac {32 e^{5+2 x} \left (-3-x+2 x^2+x^3\right )}{x^3 (2+x)^3}\right ) \, dx\\ &=\frac {20}{(2+x)^2}-6 \int \frac {x^2}{(2+x)^3} \, dx-12 \int \frac {x}{(2+x)^3} \, dx+16 \int \frac {e^{10+4 x} \left (-1+x+x^2\right )}{x^3 (2+x)^3} \, dx+32 \int \frac {e^{5+2 x} \left (-3-x+2 x^2+x^3\right )}{x^3 (2+x)^3} \, dx-144 \int \frac {1}{x^3 (2+x)^3} \, dx-144 \int \frac {1}{x (2+x)^3} \, dx-240 \int \frac {1}{x^2 (2+x)^3} \, dx-\int \frac {x^3}{(2+x)^3} \, dx\\ &=\frac {20}{(2+x)^2}-\frac {3 x^2}{(2+x)^2}-6 \int \left (\frac {4}{(2+x)^3}-\frac {4}{(2+x)^2}+\frac {1}{2+x}\right ) \, dx+16 \int \left (-\frac {e^{10+4 x}}{8 x^3}+\frac {5 e^{10+4 x}}{16 x^2}-\frac {e^{10+4 x}}{4 x}-\frac {e^{10+4 x}}{8 (2+x)^3}+\frac {3 e^{10+4 x}}{16 (2+x)^2}+\frac {e^{10+4 x}}{4 (2+x)}\right ) \, dx+32 \int \left (-\frac {3 e^{5+2 x}}{8 x^3}+\frac {7 e^{5+2 x}}{16 x^2}-\frac {e^{5+2 x}}{8 x}+\frac {e^{5+2 x}}{8 (2+x)^3}-\frac {3 e^{5+2 x}}{16 (2+x)^2}+\frac {e^{5+2 x}}{8 (2+x)}\right ) \, dx-144 \int \left (\frac {1}{8 x^3}-\frac {3}{16 x^2}+\frac {3}{16 x}-\frac {1}{8 (2+x)^3}-\frac {3}{16 (2+x)^2}-\frac {3}{16 (2+x)}\right ) \, dx-144 \int \left (\frac {1}{8 x}-\frac {1}{2 (2+x)^3}-\frac {1}{4 (2+x)^2}-\frac {1}{8 (2+x)}\right ) \, dx-240 \int \left (\frac {1}{8 x^2}-\frac {3}{16 x}+\frac {1}{4 (2+x)^3}+\frac {1}{4 (2+x)^2}+\frac {3}{16 (2+x)}\right ) \, dx-\int \left (1-\frac {8}{(2+x)^3}+\frac {12}{(2+x)^2}-\frac {6}{2+x}\right ) \, dx\\ &=\frac {9}{x^2}+\frac {3}{x}-x+\frac {13}{(2+x)^2}-\frac {3 x^2}{(2+x)^2}-\frac {15}{2+x}-2 \int \frac {e^{10+4 x}}{x^3} \, dx-2 \int \frac {e^{10+4 x}}{(2+x)^3} \, dx+3 \int \frac {e^{10+4 x}}{(2+x)^2} \, dx-4 \int \frac {e^{5+2 x}}{x} \, dx-4 \int \frac {e^{10+4 x}}{x} \, dx+4 \int \frac {e^{5+2 x}}{(2+x)^3} \, dx+4 \int \frac {e^{5+2 x}}{2+x} \, dx+4 \int \frac {e^{10+4 x}}{2+x} \, dx+5 \int \frac {e^{10+4 x}}{x^2} \, dx-6 \int \frac {e^{5+2 x}}{(2+x)^2} \, dx-12 \int \frac {e^{5+2 x}}{x^3} \, dx+14 \int \frac {e^{5+2 x}}{x^2} \, dx\\ &=\frac {9}{x^2}+\frac {6 e^{5+2 x}}{x^2}+\frac {e^{10+4 x}}{x^2}+\frac {3}{x}-\frac {14 e^{5+2 x}}{x}-\frac {5 e^{10+4 x}}{x}-x+\frac {13}{(2+x)^2}-\frac {2 e^{5+2 x}}{(2+x)^2}+\frac {e^{10+4 x}}{(2+x)^2}-\frac {3 x^2}{(2+x)^2}-\frac {15}{2+x}+\frac {6 e^{5+2 x}}{2+x}-\frac {3 e^{10+4 x}}{2+x}-4 e^5 \text {Ei}(2 x)-4 e^{10} \text {Ei}(4 x)+4 e \text {Ei}(2 (2+x))+4 e^2 \text {Ei}(4 (2+x))-4 \int \frac {e^{10+4 x}}{x^2} \, dx+4 \int \frac {e^{5+2 x}}{(2+x)^2} \, dx-4 \int \frac {e^{10+4 x}}{(2+x)^2} \, dx-12 \int \frac {e^{5+2 x}}{x^2} \, dx-12 \int \frac {e^{5+2 x}}{2+x} \, dx+12 \int \frac {e^{10+4 x}}{2+x} \, dx+20 \int \frac {e^{10+4 x}}{x} \, dx+28 \int \frac {e^{5+2 x}}{x} \, dx\\ &=\frac {9}{x^2}+\frac {6 e^{5+2 x}}{x^2}+\frac {e^{10+4 x}}{x^2}+\frac {3}{x}-\frac {2 e^{5+2 x}}{x}-\frac {e^{10+4 x}}{x}-x+\frac {13}{(2+x)^2}-\frac {2 e^{5+2 x}}{(2+x)^2}+\frac {e^{10+4 x}}{(2+x)^2}-\frac {3 x^2}{(2+x)^2}-\frac {15}{2+x}+\frac {2 e^{5+2 x}}{2+x}+\frac {e^{10+4 x}}{2+x}+24 e^5 \text {Ei}(2 x)+16 e^{10} \text {Ei}(4 x)-8 e \text {Ei}(2 (2+x))+16 e^2 \text {Ei}(4 (2+x))+8 \int \frac {e^{5+2 x}}{2+x} \, dx-16 \int \frac {e^{10+4 x}}{x} \, dx-16 \int \frac {e^{10+4 x}}{2+x} \, dx-24 \int \frac {e^{5+2 x}}{x} \, dx\\ &=\frac {9}{x^2}+\frac {6 e^{5+2 x}}{x^2}+\frac {e^{10+4 x}}{x^2}+\frac {3}{x}-\frac {2 e^{5+2 x}}{x}-\frac {e^{10+4 x}}{x}-x+\frac {13}{(2+x)^2}-\frac {2 e^{5+2 x}}{(2+x)^2}+\frac {e^{10+4 x}}{(2+x)^2}-\frac {3 x^2}{(2+x)^2}-\frac {15}{2+x}+\frac {2 e^{5+2 x}}{2+x}+\frac {e^{10+4 x}}{2+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.43, size = 56, normalized size = 1.65 \begin {gather*} -\frac {-36-4 e^{10+4 x}-48 x-4 x^2+16 x^3+7 x^4+x^5-8 e^{5+2 x} (3+2 x)}{x^2 (2+x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.96, size = 62, normalized size = 1.82 \begin {gather*} -\frac {x^{5} + 4 \, x^{4} + 4 \, x^{3} - 16 \, x^{2} - 8 \, {\left (2 \, x + 3\right )} e^{\left (2 \, x + 5\right )} - 48 \, x - 4 \, e^{\left (4 \, x + 10\right )} - 36}{x^{4} + 4 \, x^{3} + 4 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.13, size = 66, normalized size = 1.94 \begin {gather*} -\frac {x^{5} + 4 \, x^{4} + 4 \, x^{3} - 16 \, x^{2} - 16 \, x e^{\left (2 \, x + 5\right )} - 48 \, x - 4 \, e^{\left (4 \, x + 10\right )} - 24 \, e^{\left (2 \, x + 5\right )} - 36}{x^{4} + 4 \, x^{3} + 4 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 66, normalized size = 1.94
method | result | size |
risch | \(-x +\frac {16 x^{2}+48 x +36}{x^{2} \left (x^{2}+4 x +4\right )}+\frac {4 \,{\mathrm e}^{4 x +10}}{x^{2} \left (2+x \right )^{2}}+\frac {8 \left (2 x +3\right ) {\mathrm e}^{5+2 x}}{x^{2} \left (2+x \right )^{2}}\) | \(66\) |
derivativedivides | \(\frac {4}{\left (2 x +4\right )^{2}}-\frac {6}{2 x +4}+\frac {9}{x^{2}}+\frac {3}{x}-\frac {5}{2}-x +\frac {4 \,{\mathrm e}^{5+2 x}}{2 x +4}-\frac {2 \,{\mathrm e}^{5+2 x}}{x}+\frac {6 \,{\mathrm e}^{5+2 x}}{x^{2}}-\frac {8 \,{\mathrm e}^{5+2 x}}{\left (2 x +4\right )^{2}}+\frac {2 \,{\mathrm e}^{4 x +10}}{2 x +4}-\frac {{\mathrm e}^{4 x +10}}{x}+\frac {{\mathrm e}^{4 x +10}}{x^{2}}+\frac {4 \,{\mathrm e}^{4 x +10}}{\left (2 x +4\right )^{2}}\) | \(145\) |
default | \(\frac {4}{\left (2 x +4\right )^{2}}-\frac {6}{2 x +4}+\frac {9}{x^{2}}+\frac {3}{x}-\frac {5}{2}-x +\frac {4 \,{\mathrm e}^{5+2 x}}{2 x +4}-\frac {2 \,{\mathrm e}^{5+2 x}}{x}+\frac {6 \,{\mathrm e}^{5+2 x}}{x^{2}}-\frac {8 \,{\mathrm e}^{5+2 x}}{\left (2 x +4\right )^{2}}+\frac {2 \,{\mathrm e}^{4 x +10}}{2 x +4}-\frac {{\mathrm e}^{4 x +10}}{x}+\frac {{\mathrm e}^{4 x +10}}{x^{2}}+\frac {4 \,{\mathrm e}^{4 x +10}}{\left (2 x +4\right )^{2}}\) | \(145\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.59, size = 180, normalized size = 5.29 \begin {gather*} -x - \frac {18 \, {\left (3 \, x^{3} + 9 \, x^{2} + 4 \, x - 2\right )}}{x^{4} + 4 \, x^{3} + 4 \, x^{2}} + \frac {30 \, {\left (3 \, x^{2} + 9 \, x + 4\right )}}{x^{3} + 4 \, x^{2} + 4 \, x} + \frac {4 \, {\left (2 \, {\left (2 \, x e^{5} + 3 \, e^{5}\right )} e^{\left (2 \, x\right )} + e^{\left (4 \, x + 10\right )}\right )}}{x^{4} + 4 \, x^{3} + 4 \, x^{2}} + \frac {4 \, {\left (3 \, x + 5\right )}}{x^{2} + 4 \, x + 4} - \frac {12 \, {\left (2 \, x + 3\right )}}{x^{2} + 4 \, x + 4} - \frac {36 \, {\left (x + 3\right )}}{x^{2} + 4 \, x + 4} + \frac {12 \, {\left (x + 1\right )}}{x^{2} + 4 \, x + 4} + \frac {20}{x^{2} + 4 \, x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.57, size = 48, normalized size = 1.41 \begin {gather*} \frac {24\,{\mathrm {e}}^{2\,x+5}+4\,{\mathrm {e}}^{4\,x+10}+x\,\left (16\,{\mathrm {e}}^{2\,x+5}+48\right )+16\,x^2+36}{x^2\,{\left (x+2\right )}^2}-x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.21, size = 99, normalized size = 2.91 \begin {gather*} - x + \frac {\left (4 x^{4} + 16 x^{3} + 16 x^{2}\right ) e^{4 x + 10} + \left (16 x^{5} + 88 x^{4} + 160 x^{3} + 96 x^{2}\right ) e^{2 x + 5}}{x^{8} + 8 x^{7} + 24 x^{6} + 32 x^{5} + 16 x^{4}} - \frac {- 16 x^{2} - 48 x - 36}{x^{4} + 4 x^{3} + 4 x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________