Optimal. Leaf size=30 \[ 4-x+\frac {1}{2} e^{-x} \left (-2-e^5+\frac {2+3 x}{x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.39, antiderivative size = 29, normalized size of antiderivative = 0.97, number of steps used = 10, number of rules used = 7, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.189, Rules used = {6, 12, 6742, 2199, 2194, 2177, 2178} \begin {gather*} -x+\frac {1}{2} \left (1-e^5\right ) e^{-x}+\frac {e^{-x}}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 12
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (-2-2 x-2 e^x x^2+\left (-1+e^5\right ) x^2\right )}{2 x^2} \, dx\\ &=\frac {1}{2} \int \frac {e^{-x} \left (-2-2 x-2 e^x x^2+\left (-1+e^5\right ) x^2\right )}{x^2} \, dx\\ &=\frac {1}{2} \int \left (-2+\frac {e^{-x} \left (-2-2 x-\left (1-e^5\right ) x^2\right )}{x^2}\right ) \, dx\\ &=-x+\frac {1}{2} \int \frac {e^{-x} \left (-2-2 x-\left (1-e^5\right ) x^2\right )}{x^2} \, dx\\ &=-x+\frac {1}{2} \int \left (e^{-x} \left (-1+e^5\right )-\frac {2 e^{-x}}{x^2}-\frac {2 e^{-x}}{x}\right ) \, dx\\ &=-x+\frac {1}{2} \left (-1+e^5\right ) \int e^{-x} \, dx-\int \frac {e^{-x}}{x^2} \, dx-\int \frac {e^{-x}}{x} \, dx\\ &=\frac {1}{2} e^{-x} \left (1-e^5\right )+\frac {e^{-x}}{x}-x-\text {Ei}(-x)+\int \frac {e^{-x}}{x} \, dx\\ &=\frac {1}{2} e^{-x} \left (1-e^5\right )+\frac {e^{-x}}{x}-x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 31, normalized size = 1.03 \begin {gather*} \frac {1}{2} \left (-2 x-\frac {e^{-x} \left (-2 x+\left (-1+e^5\right ) x^2\right )}{x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 32, normalized size = 1.07 \begin {gather*} -\frac {{\left (x^{2} e^{\left (x + \log \relax (2)\right )} + x e^{5} - x - 2\right )} e^{\left (-x - \log \relax (2)\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 32, normalized size = 1.07 \begin {gather*} -\frac {2 \, x^{2} - x e^{\left (-x\right )} + x e^{\left (-x + 5\right )} - 2 \, e^{\left (-x\right )}}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 23, normalized size = 0.77
method | result | size |
risch | \(-x -\frac {\left (x \,{\mathrm e}^{5}-x -2\right ) {\mathrm e}^{-x}}{2 x}\) | \(23\) |
norman | \(\frac {\left (2+\left (1-{\mathrm e}^{5}\right ) x -x^{2} {\mathrm e}^{\ln \relax (2)+x}\right ) {\mathrm e}^{-x}}{2 x}\) | \(32\) |
derivativedivides | \(-{\mathrm e}^{5} {\mathrm e}^{-x -\ln \relax (2)}-\ln \relax (2)-x +\frac {2 \,{\mathrm e}^{-x -\ln \relax (2)}}{x}+{\mathrm e}^{-x -\ln \relax (2)}\) | \(45\) |
default | \(-{\mathrm e}^{5} {\mathrm e}^{-x -\ln \relax (2)}-\ln \relax (2)-x +\frac {2 \,{\mathrm e}^{-x -\ln \relax (2)}}{x}+{\mathrm e}^{-x -\ln \relax (2)}\) | \(45\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.38, size = 27, normalized size = 0.90 \begin {gather*} -x - {\rm Ei}\left (-x\right ) + \frac {1}{2} \, e^{\left (-x\right )} - \frac {1}{2} \, e^{\left (-x + 5\right )} + \Gamma \left (-1, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.19, size = 24, normalized size = 0.80 \begin {gather*} \frac {{\mathrm {e}}^{-x}}{x}-x-{\mathrm {e}}^{-x}\,\left (\frac {{\mathrm {e}}^5}{2}-\frac {1}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 15, normalized size = 0.50 \begin {gather*} - x + \frac {\left (- x e^{5} + x + 2\right ) e^{- x}}{2 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________