Optimal. Leaf size=23 \[ \frac {1}{5} \left (x+\frac {e^{-x} (-4+2 x)}{9 x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 27, normalized size of antiderivative = 1.17, number of steps used = 9, number of rules used = 6, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {12, 6742, 2199, 2194, 2177, 2178} \begin {gather*} \frac {x}{5}+\frac {2 e^{-x}}{45}-\frac {4 e^{-x}}{45 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{45} \int \frac {e^{-x} \left (4+4 x-2 x^2+9 e^x x^2\right )}{x^2} \, dx\\ &=\frac {1}{45} \int \left (9-\frac {2 e^{-x} \left (-2-2 x+x^2\right )}{x^2}\right ) \, dx\\ &=\frac {x}{5}-\frac {2}{45} \int \frac {e^{-x} \left (-2-2 x+x^2\right )}{x^2} \, dx\\ &=\frac {x}{5}-\frac {2}{45} \int \left (e^{-x}-\frac {2 e^{-x}}{x^2}-\frac {2 e^{-x}}{x}\right ) \, dx\\ &=\frac {x}{5}-\frac {2}{45} \int e^{-x} \, dx+\frac {4}{45} \int \frac {e^{-x}}{x^2} \, dx+\frac {4}{45} \int \frac {e^{-x}}{x} \, dx\\ &=\frac {2 e^{-x}}{45}-\frac {4 e^{-x}}{45 x}+\frac {x}{5}+\frac {4 \text {Ei}(-x)}{45}-\frac {4}{45} \int \frac {e^{-x}}{x} \, dx\\ &=\frac {2 e^{-x}}{45}-\frac {4 e^{-x}}{45 x}+\frac {x}{5}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 25, normalized size = 1.09 \begin {gather*} \frac {1}{45} \left (2 e^{-x}-\frac {4 e^{-x}}{x}+9 x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.58, size = 21, normalized size = 0.91 \begin {gather*} \frac {{\left (9 \, x^{2} e^{x} + 2 \, x - 4\right )} e^{\left (-x\right )}}{45 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 24, normalized size = 1.04 \begin {gather*} \frac {9 \, x^{2} + 2 \, x e^{\left (-x\right )} - 4 \, e^{\left (-x\right )}}{45 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 17, normalized size = 0.74
method | result | size |
risch | \(\frac {x}{5}+\frac {2 \left (x -2\right ) {\mathrm e}^{-x}}{45 x}\) | \(17\) |
default | \(\frac {x}{5}+\frac {2 \,{\mathrm e}^{-x}}{45}-\frac {4 \,{\mathrm e}^{-x}}{45 x}\) | \(20\) |
norman | \(\frac {\left (-\frac {4}{45}+\frac {2 x}{45}+\frac {{\mathrm e}^{x} x^{2}}{5}\right ) {\mathrm e}^{-x}}{x}\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.39, size = 21, normalized size = 0.91 \begin {gather*} \frac {1}{5} \, x + \frac {4}{45} \, {\rm Ei}\left (-x\right ) + \frac {2}{45} \, e^{\left (-x\right )} - \frac {4}{45} \, \Gamma \left (-1, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.13, size = 19, normalized size = 0.83 \begin {gather*} \frac {x}{5}+\frac {2\,{\mathrm {e}}^{-x}}{45}-\frac {4\,{\mathrm {e}}^{-x}}{45\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 14, normalized size = 0.61 \begin {gather*} \frac {x}{5} + \frac {\left (2 x - 4\right ) e^{- x}}{45 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________