Optimal. Leaf size=20 \[ 2-e^x+\frac {1}{2} \left (2+e^x x\right )+\log (x) \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 22, normalized size of antiderivative = 1.10, number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {12, 14, 2176, 2194} \begin {gather*} -\frac {1}{2} e^x (1-x)-\frac {e^x}{2}+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2176
Rule 2194
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \frac {2-2 e^x x+e^x x (1+x)}{x} \, dx\\ &=\frac {1}{2} \int \left (e^x (-1+x)+\frac {2}{x}\right ) \, dx\\ &=\log (x)+\frac {1}{2} \int e^x (-1+x) \, dx\\ &=-\frac {1}{2} e^x (1-x)+\log (x)-\frac {\int e^x \, dx}{2}\\ &=-\frac {e^x}{2}-\frac {1}{2} e^x (1-x)+\log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 13, normalized size = 0.65 \begin {gather*} \frac {1}{2} e^x (-2+x)+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.83, size = 20, normalized size = 1.00 \begin {gather*} \frac {{\left (x - 2\right )} e^{\left (x + \log \relax (x)\right )} + 2 \, x \log \relax (x)}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 12, normalized size = 0.60 \begin {gather*} \frac {1}{2} \, x e^{x} - e^{x} + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 11, normalized size = 0.55
method | result | size |
risch | \(\ln \relax (x )+\frac {{\mathrm e}^{x} \left (x -2\right )}{2}\) | \(11\) |
default | \(\frac {{\mathrm e}^{x} x}{2}+\ln \relax (x )-{\mathrm e}^{x}\) | \(13\) |
norman | \(\frac {{\mathrm e}^{x} x}{2}+\ln \relax (x )-{\mathrm e}^{x}\) | \(13\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 14, normalized size = 0.70 \begin {gather*} \frac {1}{2} \, {\left (x - 1\right )} e^{x} - \frac {1}{2} \, e^{x} + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.05, size = 12, normalized size = 0.60 \begin {gather*} \ln \relax (x)-{\mathrm {e}}^x+\frac {x\,{\mathrm {e}}^x}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.09, size = 10, normalized size = 0.50 \begin {gather*} \frac {\left (x - 2\right ) e^{x}}{2} + \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________