Optimal. Leaf size=24 \[ -x+\log \left (\frac {x^3 (2+x)}{162 \left (-1+e^{\frac {1}{x}}\right )}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.91, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {6741, 6742, 6715, 2282, 36, 31, 29, 1620} \begin {gather*} -x-\log \left (1-e^{\frac {1}{x}}\right )+3 \log (x)+\log (x+2) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 1620
Rule 2282
Rule 6715
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {6 x+2 x^2-x^3-e^{\frac {1}{x}} \left (2+7 x+2 x^2-x^3\right )}{\left (1-e^{\frac {1}{x}}\right ) x^2 (2+x)} \, dx\\ &=\int \left (\frac {1}{\left (-1+e^{\frac {1}{x}}\right ) x^2}+\frac {2+7 x+2 x^2-x^3}{x^2 (2+x)}\right ) \, dx\\ &=\int \frac {1}{\left (-1+e^{\frac {1}{x}}\right ) x^2} \, dx+\int \frac {2+7 x+2 x^2-x^3}{x^2 (2+x)} \, dx\\ &=\int \left (-1+\frac {1}{x^2}+\frac {3}{x}+\frac {1}{2+x}\right ) \, dx-\operatorname {Subst}\left (\int \frac {1}{-1+e^x} \, dx,x,\frac {1}{x}\right )\\ &=-\frac {1}{x}-x+3 \log (x)+\log (2+x)-\operatorname {Subst}\left (\int \frac {1}{(-1+x) x} \, dx,x,e^{\frac {1}{x}}\right )\\ &=-\frac {1}{x}-x+3 \log (x)+\log (2+x)-\operatorname {Subst}\left (\int \frac {1}{-1+x} \, dx,x,e^{\frac {1}{x}}\right )+\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^{\frac {1}{x}}\right )\\ &=-x-\log \left (1-e^{\frac {1}{x}}\right )+3 \log (x)+\log (2+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 24, normalized size = 1.00 \begin {gather*} -x-\log \left (1-e^{\frac {1}{x}}\right )+3 \log (x)+\log (2+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 21, normalized size = 0.88 \begin {gather*} -x + \log \left (x + 2\right ) + 3 \, \log \relax (x) - \log \left (e^{\frac {1}{x}} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.38, size = 35, normalized size = 1.46 \begin {gather*} x {\left (\frac {4 \, \log \relax (x)}{x} + \frac {\log \left (\frac {2}{x} + 1\right )}{x} - \frac {\log \left (e^{\frac {1}{x}} - 1\right )}{x} - 1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 22, normalized size = 0.92
method | result | size |
norman | \(-x +3 \ln \relax (x )-\ln \left ({\mathrm e}^{\frac {1}{x}}-1\right )+\ln \left (2+x \right )\) | \(22\) |
risch | \(-x +3 \ln \relax (x )-\ln \left ({\mathrm e}^{\frac {1}{x}}-1\right )+\ln \left (2+x \right )\) | \(22\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.89, size = 21, normalized size = 0.88 \begin {gather*} -x + \log \left (x + 2\right ) + 3 \, \log \relax (x) - \log \left (e^{\frac {1}{x}} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.16, size = 21, normalized size = 0.88 \begin {gather*} \ln \left (x+2\right )-\ln \left ({\mathrm {e}}^{1/x}-1\right )-x+3\,\ln \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.17, size = 19, normalized size = 0.79 \begin {gather*} - x + 3 \log {\relax (x )} + \log {\left (x + 2 \right )} - \log {\left (e^{\frac {1}{x}} - 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________