Optimal. Leaf size=31 \[ x \left (-25-e^2-x+\frac {6 e^{-x}}{x^2 (x+x (1+x))}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.92, antiderivative size = 50, normalized size of antiderivative = 1.61, number of steps used = 15, number of rules used = 5, integrand size = 77, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {1594, 27, 6742, 2177, 2178} \begin {gather*} -x^2+\frac {3 e^{-x}}{x^2}-\left (25+e^2\right ) x+\frac {3 e^{-x}}{2 (x+2)}-\frac {3 e^{-x}}{2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 1594
Rule 2177
Rule 2178
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (-24-30 x-6 x^2+e^x \left (-100 x^3-108 x^4-33 x^5-2 x^6+e^2 \left (-4 x^3-4 x^4-x^5\right )\right )\right )}{x^3 \left (4+4 x+x^2\right )} \, dx\\ &=\int \frac {e^{-x} \left (-24-30 x-6 x^2+e^x \left (-100 x^3-108 x^4-33 x^5-2 x^6+e^2 \left (-4 x^3-4 x^4-x^5\right )\right )\right )}{x^3 (2+x)^2} \, dx\\ &=\int \left (-25-e^2-2 x-\frac {6 e^{-x} \left (4+5 x+x^2\right )}{x^3 (2+x)^2}\right ) \, dx\\ &=-\left (\left (25+e^2\right ) x\right )-x^2-6 \int \frac {e^{-x} \left (4+5 x+x^2\right )}{x^3 (2+x)^2} \, dx\\ &=-\left (\left (25+e^2\right ) x\right )-x^2-6 \int \left (\frac {e^{-x}}{x^3}+\frac {e^{-x}}{4 x^2}-\frac {e^{-x}}{4 x}+\frac {e^{-x}}{4 (2+x)^2}+\frac {e^{-x}}{4 (2+x)}\right ) \, dx\\ &=-\left (\left (25+e^2\right ) x\right )-x^2-\frac {3}{2} \int \frac {e^{-x}}{x^2} \, dx+\frac {3}{2} \int \frac {e^{-x}}{x} \, dx-\frac {3}{2} \int \frac {e^{-x}}{(2+x)^2} \, dx-\frac {3}{2} \int \frac {e^{-x}}{2+x} \, dx-6 \int \frac {e^{-x}}{x^3} \, dx\\ &=\frac {3 e^{-x}}{x^2}+\frac {3 e^{-x}}{2 x}-\left (25+e^2\right ) x-x^2+\frac {3 e^{-x}}{2 (2+x)}-\frac {3}{2} e^2 \text {Ei}(-2-x)+\frac {3 \text {Ei}(-x)}{2}+\frac {3}{2} \int \frac {e^{-x}}{x} \, dx+\frac {3}{2} \int \frac {e^{-x}}{2+x} \, dx+3 \int \frac {e^{-x}}{x^2} \, dx\\ &=\frac {3 e^{-x}}{x^2}-\frac {3 e^{-x}}{2 x}-\left (25+e^2\right ) x-x^2+\frac {3 e^{-x}}{2 (2+x)}+3 \text {Ei}(-x)-3 \int \frac {e^{-x}}{x} \, dx\\ &=\frac {3 e^{-x}}{x^2}-\frac {3 e^{-x}}{2 x}-\left (25+e^2\right ) x-x^2+\frac {3 e^{-x}}{2 (2+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 1.35, size = 28, normalized size = 0.90 \begin {gather*} -e^2 x+\frac {6 e^{-x}}{x^2 (2+x)}-x (25+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.38, size = 48, normalized size = 1.55 \begin {gather*} -\frac {{\left ({\left (x^{5} + 27 \, x^{4} + 50 \, x^{3} + {\left (x^{4} + 2 \, x^{3}\right )} e^{2}\right )} e^{x} - 6\right )} e^{\left (-x\right )}}{x^{3} + 2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 46, normalized size = 1.48 \begin {gather*} -\frac {x^{5} + x^{4} e^{2} + 27 \, x^{4} + 2 \, x^{3} e^{2} + 50 \, x^{3} - 6 \, e^{\left (-x\right )}}{x^{3} + 2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 29, normalized size = 0.94
method | result | size |
risch | \(-{\mathrm e}^{2} x -x^{2}-25 x +\frac {6 \,{\mathrm e}^{-x}}{x^{2} \left (2+x \right )}\) | \(29\) |
norman | \(\frac {\left (6+\left (-27-{\mathrm e}^{2}\right ) x^{4} {\mathrm e}^{x}+\left (100+4 \,{\mathrm e}^{2}\right ) x^{2} {\mathrm e}^{x}-x^{5} {\mathrm e}^{x}\right ) {\mathrm e}^{-x}}{x^{2} \left (2+x \right )}\) | \(47\) |
default | \(-x^{2}-25 x -\frac {3 \,{\mathrm e}^{-x} \left (4 x^{2}+5 x -2\right )}{x^{2} \left (2+x \right )}-{\mathrm e}^{2} x +\frac {15 \,{\mathrm e}^{-x} \left (x +1\right )}{\left (2+x \right ) x}-\frac {3 \,{\mathrm e}^{-x}}{2+x}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.39, size = 40, normalized size = 1.29 \begin {gather*} -\frac {x^{5} + x^{4} {\left (e^{2} + 27\right )} + 2 \, x^{3} {\left (e^{2} + 25\right )} - 6 \, e^{\left (-x\right )}}{x^{3} + 2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.25, size = 54, normalized size = 1.74 \begin {gather*} \frac {6}{2\,x^2\,{\mathrm {e}}^x+x^3\,{\mathrm {e}}^x}-\frac {x^5+\left ({\mathrm {e}}^2+27\right )\,x^4+\left (2\,{\mathrm {e}}^2+50\right )\,x^3}{x^3+2\,x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 24, normalized size = 0.77 \begin {gather*} - x^{2} + x \left (-25 - e^{2}\right ) + \frac {6 e^{- x}}{x^{3} + 2 x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________