Optimal. Leaf size=28 \[ e-e^x \left (-\frac {6}{x}+x\right )+\log \left (\frac {\left (e^4-x\right )^2}{x^2}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.43, antiderivative size = 29, normalized size of antiderivative = 1.04, number of steps used = 14, number of rules used = 10, integrand size = 61, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.164, Rules used = {1593, 6742, 36, 31, 29, 2199, 2194, 2177, 2178, 2176} \begin {gather*} -e^x x+\frac {6 e^x}{x}+2 \log \left (e^4-x\right )-2 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 1593
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-2 e^4 x+e^x \left (6 x-6 x^2+x^3+x^4+e^4 \left (-6+6 x-x^2-x^3\right )\right )}{\left (e^4-x\right ) x^2} \, dx\\ &=\int \left (-\frac {2 e^4}{\left (e^4-x\right ) x}-\frac {e^x \left (6-6 x+x^2+x^3\right )}{x^2}\right ) \, dx\\ &=-\left (\left (2 e^4\right ) \int \frac {1}{\left (e^4-x\right ) x} \, dx\right )-\int \frac {e^x \left (6-6 x+x^2+x^3\right )}{x^2} \, dx\\ &=-\left (2 \int \frac {1}{e^4-x} \, dx\right )-2 \int \frac {1}{x} \, dx-\int \left (e^x+\frac {6 e^x}{x^2}-\frac {6 e^x}{x}+e^x x\right ) \, dx\\ &=2 \log \left (e^4-x\right )-2 \log (x)-6 \int \frac {e^x}{x^2} \, dx+6 \int \frac {e^x}{x} \, dx-\int e^x \, dx-\int e^x x \, dx\\ &=-e^x+\frac {6 e^x}{x}-e^x x+6 \text {Ei}(x)+2 \log \left (e^4-x\right )-2 \log (x)-6 \int \frac {e^x}{x} \, dx+\int e^x \, dx\\ &=\frac {6 e^x}{x}-e^x x+2 \log \left (e^4-x\right )-2 \log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 29, normalized size = 1.04 \begin {gather*} \frac {6 e^x}{x}-e^x x+2 \log \left (e^4-x\right )-2 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 29, normalized size = 1.04 \begin {gather*} -\frac {{\left (x^{2} - 6\right )} e^{x} - 2 \, x \log \left (x - e^{4}\right ) + 2 \, x \log \relax (x)}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 31, normalized size = 1.11 \begin {gather*} -\frac {x^{2} e^{x} - 2 \, x \log \left (x - e^{4}\right ) + 2 \, x \log \relax (x) - 6 \, e^{x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.32, size = 27, normalized size = 0.96
method | result | size |
risch | \(2 \ln \left (x -{\mathrm e}^{4}\right )-2 \ln \relax (x )-\frac {\left (x^{2}-6\right ) {\mathrm e}^{x}}{x}\) | \(27\) |
norman | \(\frac {-{\mathrm e}^{x} x^{2}+6 \,{\mathrm e}^{x}}{x}-2 \ln \relax (x )+2 \ln \left ({\mathrm e}^{4}-x \right )\) | \(31\) |
default | \(-{\mathrm e}^{x} x -{\mathrm e}^{4} {\mathrm e}^{x}+{\mathrm e}^{8} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )-2 \ln \relax (x )+2 \ln \left (x -{\mathrm e}^{4}\right )-6 \,{\mathrm e}^{4} \left (-{\mathrm e}^{-8} \expIntegralEi \left (1, -x \right )+{\mathrm e}^{-4} \left (-\frac {{\mathrm e}^{x}}{x}-\expIntegralEi \left (1, -x \right )\right )+{\mathrm e}^{-8} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )\right )-6 \,{\mathrm e}^{-4} \expIntegralEi \left (1, -x \right )+6 \,{\mathrm e}^{-4} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )-6 \,{\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )+6 \,{\mathrm e}^{4} \left (-{\mathrm e}^{-4} \expIntegralEi \left (1, -x \right )+{\mathrm e}^{-4} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )\right )-{\mathrm e}^{4} \left (-{\mathrm e}^{x}+{\mathrm e}^{4} {\mathrm e}^{{\mathrm e}^{4}} \expIntegralEi \left (1, {\mathrm e}^{4}-x \right )\right )\) | \(188\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 34, normalized size = 1.21 \begin {gather*} 2 \, {\left (e^{\left (-4\right )} \log \left (x - e^{4}\right ) - e^{\left (-4\right )} \log \relax (x)\right )} e^{4} - \frac {{\left (x^{2} - 6\right )} e^{x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.30, size = 30, normalized size = 1.07 \begin {gather*} 2\,\ln \left (x-{\mathrm {e}}^4\right )-2\,\ln \relax (x)+\frac {6\,{\mathrm {e}}^x-x^2\,{\mathrm {e}}^x}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.23, size = 31, normalized size = 1.11 \begin {gather*} 2 \left (- \frac {\log {\relax (x )}}{e^{4}} + \frac {\log {\left (x - e^{4} \right )}}{e^{4}}\right ) e^{4} + \frac {\left (6 - x^{2}\right ) e^{x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________