Optimal. Leaf size=18 \[ 9 \left (e^x-2 x+\frac {1}{x+x^2}\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 1.32, antiderivative size = 71, normalized size of antiderivative = 3.94, number of steps used = 26, number of rules used = 9, integrand size = 115, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.078, Rules used = {6741, 6742, 2194, 44, 37, 43, 2177, 2178, 2176} \begin {gather*} \frac {54 x^2}{(x+1)^2}+36 x^2+\frac {9}{x^2}-36 e^x x+9 e^{2 x}-\frac {18 e^x}{x+1}+\frac {90}{x+1}-\frac {45}{(x+1)^2}+\frac {18 e^x}{x}-\frac {18}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 43
Rule 44
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-18-36 x+36 x^3+108 x^4+216 x^5+216 x^6+72 x^7+e^{2 x} \left (18 x^3+54 x^4+54 x^5+18 x^6\right )+e^x \left (-18 x-36 x^2-36 x^3-126 x^4-216 x^5-144 x^6-36 x^7\right )}{x^3 (1+x)^3} \, dx\\ &=\int \left (18 e^{2 x}+\frac {36}{(1+x)^3}-\frac {18}{x^3 (1+x)^3}-\frac {36}{x^2 (1+x)^3}+\frac {108 x}{(1+x)^3}+\frac {216 x^2}{(1+x)^3}+\frac {216 x^3}{(1+x)^3}+\frac {72 x^4}{(1+x)^3}-\frac {18 e^x \left (1+x+x^2+6 x^3+6 x^4+2 x^5\right )}{x^2 (1+x)^2}\right ) \, dx\\ &=-\frac {18}{(1+x)^2}+18 \int e^{2 x} \, dx-18 \int \frac {1}{x^3 (1+x)^3} \, dx-18 \int \frac {e^x \left (1+x+x^2+6 x^3+6 x^4+2 x^5\right )}{x^2 (1+x)^2} \, dx-36 \int \frac {1}{x^2 (1+x)^3} \, dx+72 \int \frac {x^4}{(1+x)^3} \, dx+108 \int \frac {x}{(1+x)^3} \, dx+216 \int \frac {x^2}{(1+x)^3} \, dx+216 \int \frac {x^3}{(1+x)^3} \, dx\\ &=9 e^{2 x}-\frac {18}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}-18 \int \left (\frac {1}{x^3}-\frac {3}{x^2}+\frac {6}{x}-\frac {1}{(1+x)^3}-\frac {3}{(1+x)^2}-\frac {6}{1+x}\right ) \, dx-18 \int \left (2 e^x+\frac {e^x}{x^2}-\frac {e^x}{x}+2 e^x x-\frac {e^x}{(1+x)^2}+\frac {e^x}{1+x}\right ) \, dx-36 \int \left (\frac {1}{x^2}-\frac {3}{x}+\frac {1}{(1+x)^3}+\frac {2}{(1+x)^2}+\frac {3}{1+x}\right ) \, dx+72 \int \left (-3+x+\frac {1}{(1+x)^3}-\frac {4}{(1+x)^2}+\frac {6}{1+x}\right ) \, dx+216 \int \left (1-\frac {1}{(1+x)^3}+\frac {3}{(1+x)^2}-\frac {3}{1+x}\right ) \, dx+216 \int \left (\frac {1}{(1+x)^3}-\frac {2}{(1+x)^2}+\frac {1}{1+x}\right ) \, dx\\ &=9 e^{2 x}+\frac {9}{x^2}-\frac {18}{x}+36 x^2-\frac {45}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}+\frac {90}{1+x}-18 \int \frac {e^x}{x^2} \, dx+18 \int \frac {e^x}{x} \, dx+18 \int \frac {e^x}{(1+x)^2} \, dx-18 \int \frac {e^x}{1+x} \, dx-36 \int e^x \, dx-36 \int e^x x \, dx\\ &=-36 e^x+9 e^{2 x}+\frac {9}{x^2}-\frac {18}{x}+\frac {18 e^x}{x}-36 e^x x+36 x^2-\frac {45}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}+\frac {90}{1+x}-\frac {18 e^x}{1+x}+18 \text {Ei}(x)-\frac {18 \text {Ei}(1+x)}{e}-18 \int \frac {e^x}{x} \, dx+18 \int \frac {e^x}{1+x} \, dx+36 \int e^x \, dx\\ &=9 e^{2 x}+\frac {9}{x^2}-\frac {18}{x}+\frac {18 e^x}{x}-36 e^x x+36 x^2-\frac {45}{(1+x)^2}+\frac {54 x^2}{(1+x)^2}+\frac {90}{1+x}-\frac {18 e^x}{1+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 32, normalized size = 1.78 \begin {gather*} \frac {9 \left (1-2 x^2-2 x^3+e^x x (1+x)\right )^2}{x^2 (1+x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.72, size = 88, normalized size = 4.89 \begin {gather*} \frac {9 \, {\left (4 \, x^{6} + 8 \, x^{5} + 4 \, x^{4} - 4 \, x^{3} - 4 \, x^{2} + {\left (x^{4} + 2 \, x^{3} + x^{2}\right )} e^{\left (2 \, x\right )} - 2 \, {\left (2 \, x^{5} + 4 \, x^{4} + 2 \, x^{3} - x^{2} - x\right )} e^{x} + 1\right )}}{x^{4} + 2 \, x^{3} + x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.18, size = 101, normalized size = 5.61 \begin {gather*} \frac {9 \, {\left (4 \, x^{6} - 4 \, x^{5} e^{x} + 8 \, x^{5} + x^{4} e^{\left (2 \, x\right )} - 8 \, x^{4} e^{x} + 4 \, x^{4} + 2 \, x^{3} e^{\left (2 \, x\right )} - 4 \, x^{3} e^{x} - 4 \, x^{3} + x^{2} e^{\left (2 \, x\right )} + 2 \, x^{2} e^{x} - 4 \, x^{2} + 2 \, x e^{x} + 1\right )}}{x^{4} + 2 \, x^{3} + x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 58, normalized size = 3.22
method | result | size |
default | \(\frac {9}{\left (x +1\right )^{2}}-\frac {18}{x +1}+\frac {9}{x^{2}}-\frac {18}{x}+36 x^{2}-\frac {18 \,{\mathrm e}^{x}}{x +1}+9 \,{\mathrm e}^{2 x}-36 \,{\mathrm e}^{x} x +\frac {18 \,{\mathrm e}^{x}}{x}\) | \(58\) |
risch | \(36 x^{2}+\frac {-36 x^{3}-36 x^{2}+9}{x^{2} \left (x^{2}+2 x +1\right )}+9 \,{\mathrm e}^{2 x}-\frac {18 \left (2 x^{3}+2 x^{2}-1\right ) {\mathrm e}^{x}}{\left (x +1\right ) x}\) | \(63\) |
norman | \(\frac {9-108 x^{3}-72 x^{2}+72 x^{5}+36 x^{6}-36 x^{5} {\mathrm e}^{x}+18 \,{\mathrm e}^{x} x +18 \,{\mathrm e}^{x} x^{2}-36 \,{\mathrm e}^{x} x^{3}-72 \,{\mathrm e}^{x} x^{4}+9 \,{\mathrm e}^{2 x} x^{2}+18 \,{\mathrm e}^{2 x} x^{3}+9 \,{\mathrm e}^{2 x} x^{4}}{x^{2} \left (x +1\right )^{2}}\) | \(92\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 177, normalized size = 9.83 \begin {gather*} 36 \, x^{2} - \frac {9 \, {\left (12 \, x^{3} + 18 \, x^{2} + 4 \, x - 1\right )}}{x^{4} + 2 \, x^{3} + x^{2}} + \frac {18 \, {\left (6 \, x^{2} + 9 \, x + 2\right )}}{x^{3} + 2 \, x^{2} + x} + \frac {9 \, {\left ({\left (x^{2} + x\right )} e^{\left (2 \, x\right )} - 2 \, {\left (2 \, x^{3} + 2 \, x^{2} - 1\right )} e^{x}\right )}}{x^{2} + x} + \frac {36 \, {\left (8 \, x + 7\right )}}{x^{2} + 2 \, x + 1} - \frac {108 \, {\left (6 \, x + 5\right )}}{x^{2} + 2 \, x + 1} + \frac {108 \, {\left (4 \, x + 3\right )}}{x^{2} + 2 \, x + 1} - \frac {54 \, {\left (2 \, x + 1\right )}}{x^{2} + 2 \, x + 1} - \frac {18}{x^{2} + 2 \, x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.17, size = 48, normalized size = 2.67 \begin {gather*} 9\,{\mathrm {e}}^{2\,x}-36\,x\,{\mathrm {e}}^x+36\,x^2+\frac {18\,x\,{\mathrm {e}}^x+x^2\,\left (18\,{\mathrm {e}}^x-36\right )-36\,x^3+9}{x^2\,{\left (x+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.22, size = 61, normalized size = 3.39 \begin {gather*} 36 x^{2} + \frac {- 36 x^{3} - 36 x^{2} + 9}{x^{4} + 2 x^{3} + x^{2}} + \frac {\left (9 x^{2} + 9 x\right ) e^{2 x} + \left (- 36 x^{3} - 36 x^{2} + 18\right ) e^{x}}{x^{2} + x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________