Optimal. Leaf size=24 \[ e^{-x} x^2+\log (5)-\log \left (\frac {e^{2+x}}{x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 15, normalized size of antiderivative = 0.62, number of steps used = 11, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {6742, 43, 2196, 2176, 2194} \begin {gather*} e^{-x} x^2-x+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2176
Rule 2194
Rule 2196
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {-1+x}{x}-e^{-x} (-2+x) x\right ) \, dx\\ &=-\int \frac {-1+x}{x} \, dx-\int e^{-x} (-2+x) x \, dx\\ &=-\int \left (1-\frac {1}{x}\right ) \, dx-\int \left (-2 e^{-x} x+e^{-x} x^2\right ) \, dx\\ &=-x+\log (x)+2 \int e^{-x} x \, dx-\int e^{-x} x^2 \, dx\\ &=-x-2 e^{-x} x+e^{-x} x^2+\log (x)+2 \int e^{-x} \, dx-2 \int e^{-x} x \, dx\\ &=-2 e^{-x}-x+e^{-x} x^2+\log (x)-2 \int e^{-x} \, dx\\ &=-x+e^{-x} x^2+\log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 14, normalized size = 0.58 \begin {gather*} x \left (-1+e^{-x} x\right )+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 19, normalized size = 0.79 \begin {gather*} {\left (x^{2} - x e^{x} + e^{x} \log \relax (x)\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 14, normalized size = 0.58 \begin {gather*} x^{2} e^{\left (-x\right )} - x + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 15, normalized size = 0.62
method | result | size |
default | \(\ln \relax (x )-x +x^{2} {\mathrm e}^{-x}\) | \(15\) |
risch | \(\ln \relax (x )-x +x^{2} {\mathrm e}^{-x}\) | \(15\) |
norman | \(\left (x^{2}-{\mathrm e}^{x} x \right ) {\mathrm e}^{-x}+\ln \relax (x )\) | \(18\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 28, normalized size = 1.17 \begin {gather*} {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - 2 \, {\left (x + 1\right )} e^{\left (-x\right )} - x + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 14, normalized size = 0.58 \begin {gather*} \ln \relax (x)-x+x^2\,{\mathrm {e}}^{-x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 10, normalized size = 0.42 \begin {gather*} x^{2} e^{- x} - x + \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________