Optimal. Leaf size=34 \[ \frac {3 \left (-\frac {e^{12+x}}{x^2}+x \left (-x^2+\frac {3}{x (1+x)}\right )\right )}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.50, antiderivative size = 28, normalized size of antiderivative = 0.82, number of steps used = 15, number of rules used = 6, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {1594, 27, 6742, 2197, 44, 43} \begin {gather*} -\frac {3 e^{x+12}}{x^3}-3 x^2-\frac {9}{x+1}+\frac {9}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 43
Rule 44
Rule 1594
Rule 2197
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4 \left (1+2 x+x^2\right )} \, dx\\ &=\int \frac {-9 x^2-18 x^3-6 x^5-12 x^6-6 x^7+e^{12+x} \left (9+15 x+3 x^2-3 x^3\right )}{x^4 (1+x)^2} \, dx\\ &=\int \left (-\frac {3 e^{12+x} (-3+x)}{x^4}-\frac {9}{x^2 (1+x)^2}-\frac {18}{x (1+x)^2}-\frac {6 x}{(1+x)^2}-\frac {12 x^2}{(1+x)^2}-\frac {6 x^3}{(1+x)^2}\right ) \, dx\\ &=-\left (3 \int \frac {e^{12+x} (-3+x)}{x^4} \, dx\right )-6 \int \frac {x}{(1+x)^2} \, dx-6 \int \frac {x^3}{(1+x)^2} \, dx-9 \int \frac {1}{x^2 (1+x)^2} \, dx-12 \int \frac {x^2}{(1+x)^2} \, dx-18 \int \frac {1}{x (1+x)^2} \, dx\\ &=-\frac {3 e^{12+x}}{x^3}-6 \int \left (-\frac {1}{(1+x)^2}+\frac {1}{1+x}\right ) \, dx-6 \int \left (-2+x-\frac {1}{(1+x)^2}+\frac {3}{1+x}\right ) \, dx-9 \int \left (\frac {1}{x^2}-\frac {2}{x}+\frac {1}{(1+x)^2}+\frac {2}{1+x}\right ) \, dx-12 \int \left (1+\frac {1}{(1+x)^2}-\frac {2}{1+x}\right ) \, dx-18 \int \left (\frac {1}{-1-x}+\frac {1}{x}-\frac {1}{(1+x)^2}\right ) \, dx\\ &=-\frac {3 e^{12+x}}{x^3}+\frac {9}{x}-3 x^2-\frac {9}{1+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 28, normalized size = 0.82 \begin {gather*} -\frac {3 e^{12+x}}{x^3}+\frac {9}{x}-3 x^2-\frac {9}{1+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 31, normalized size = 0.91 \begin {gather*} -\frac {3 \, {\left (x^{6} + x^{5} - 3 \, x^{2} + {\left (x + 1\right )} e^{\left (x + 12\right )}\right )}}{x^{4} + x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 33, normalized size = 0.97 \begin {gather*} -\frac {3 \, {\left (x^{6} + x^{5} - 3 \, x^{2} + x e^{\left (x + 12\right )} + e^{\left (x + 12\right )}\right )}}{x^{4} + x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 26, normalized size = 0.76
method | result | size |
risch | \(-3 x^{2}+\frac {9}{x \left (x +1\right )}-\frac {3 \,{\mathrm e}^{x +12}}{x^{3}}\) | \(26\) |
norman | \(\frac {9 x^{2}-3 x^{5}-3 x^{6}-3 \,{\mathrm e}^{12} {\mathrm e}^{x}-3 x \,{\mathrm e}^{12} {\mathrm e}^{x}}{x^{3} \left (x +1\right )}\) | \(39\) |
default | \(\frac {9}{x}-\frac {9}{x +1}-3 x^{2}+9 \,{\mathrm e}^{12} \left (\frac {11 \expIntegralEi \left (1, -x \right )}{6}-\frac {{\mathrm e}^{x}}{3 x^{3}}+\frac {5 \,{\mathrm e}^{x}}{6 x^{2}}-\frac {13 \,{\mathrm e}^{x}}{6 x}-\frac {{\mathrm e}^{x}}{x +1}-5 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )+15 \,{\mathrm e}^{12} \left (-\frac {3 \expIntegralEi \left (1, -x \right )}{2}+\frac {3 \,{\mathrm e}^{x}}{2 x}+\frac {{\mathrm e}^{x}}{x +1}+4 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )-\frac {{\mathrm e}^{x}}{2 x^{2}}\right )+3 \,{\mathrm e}^{12} \left (\expIntegralEi \left (1, -x \right )-\frac {{\mathrm e}^{x}}{x}-\frac {{\mathrm e}^{x}}{x +1}-3 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )-3 \,{\mathrm e}^{12} \left (-\expIntegralEi \left (1, -x \right )+\frac {{\mathrm e}^{x}}{x +1}+2 \,{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )\) | \(185\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 36, normalized size = 1.06 \begin {gather*} -3 \, x^{2} + \frac {9 \, {\left (2 \, x + 1\right )}}{x^{2} + x} - \frac {18}{x + 1} - \frac {3 \, e^{\left (x + 12\right )}}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.21, size = 35, normalized size = 1.03 \begin {gather*} -3\,x^2-\frac {3\,{\mathrm {e}}^{x+12}+3\,x\,{\mathrm {e}}^{x+12}-9\,x^2}{x^3\,\left (x+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.17, size = 22, normalized size = 0.65 \begin {gather*} - 3 x^{2} + \frac {9}{x^{2} + x} - \frac {3 e^{12} e^{x}}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________