Optimal. Leaf size=20 \[ 2-e^x+\frac {1}{2} \left (2+e^x x\right )+\log (x) \]
[Out]
________________________________________________________________________________________
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, 2207,
2225} \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 2207
Rule 2225
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]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 13, normalized size = 0.65
method | result | size |
risch | \(\ln \left (x \right )+\frac {{\mathrm e}^{x} \left (x -2\right )}{2}\) | \(11\) |
default | \(\frac {{\mathrm e}^{x} x}{2}+\ln \left (x \right )-{\mathrm e}^{x}\) | \(13\) |
norman | \(\frac {{\mathrm e}^{x} x}{2}+\ln \left (x \right )-{\mathrm e}^{x}\) | \(13\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 14, normalized size = 0.70 \begin {gather*} \frac {1}{2} \, {\left (x - 1\right )} e^{x} - \frac {1}{2} \, e^{x} + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 20, normalized size = 1.00 \begin {gather*} \frac {{\left (x - 2\right )} e^{\left (x + \log \left (x\right )\right )} + 2 \, x \log \left (x\right )}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.04, size = 10, normalized size = 0.50 \begin {gather*} \frac {\left (x - 2\right ) e^{x}}{2} + \log {\left (x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 12, normalized size = 0.60 \begin {gather*} \frac {1}{2} \, x e^{x} - e^{x} + \log \left (x\right ) \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 \left (x\right )-{\mathrm {e}}^x+\frac {x\,{\mathrm {e}}^x}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________