Optimal. Leaf size=29 \[ 4+\left (e^2+x\right ) \left (x+e^{4-x} \log \left (x \log \left (\left (4+e^x\right ) x\right )\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 18.02, antiderivative size = 62, normalized size of antiderivative = 2.14, number of steps used = 29, number of rules used = 6, integrand size = 222, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.027, Rules used = {6688, 6742, 2194, 2178, 2176, 2555} \begin {gather*} x^2+e^2 x+e^{4-x} \log \left (x \log \left (e^x x+4 x\right )\right )-e^{4-x} \left (-x-e^2+1\right ) \log \left (x \log \left (e^x x+4 x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2178
Rule 2194
Rule 2555
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (e^6+e^4 x+e^{2+x} x+2 e^x x^2+\frac {e^4 \left (e^2+x\right ) \left (4+e^x (1+x)\right )}{\left (4+e^x\right ) \log \left (\left (4+e^x\right ) x\right )}-e^4 x \left (-1+e^2+x\right ) \log \left (x \log \left (\left (4+e^x\right ) x\right )\right )\right )}{x} \, dx\\ &=\int \left (e^2+2 x+\frac {4 e^{4-x} \left (-e^2-x\right )}{\left (4+e^x\right ) \log \left (4 x+e^x x\right )}+\frac {e^{4-x} \left (e^2+\left (1+e^2\right ) x+x^2+e^2 \log \left (\left (4+e^x\right ) x\right )+x \log \left (\left (4+e^x\right ) x\right )+\left (1-e^2\right ) x \log \left (\left (4+e^x\right ) x\right ) \log \left (x \log \left (\left (4+e^x\right ) x\right )\right )-x^2 \log \left (\left (4+e^x\right ) x\right ) \log \left (x \log \left (\left (4+e^x\right ) x\right )\right )\right )}{x \log \left (4 x+e^x x\right )}\right ) \, dx\\ &=e^2 x+x^2+4 \int \frac {e^{4-x} \left (-e^2-x\right )}{\left (4+e^x\right ) \log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{4-x} \left (e^2+\left (1+e^2\right ) x+x^2+e^2 \log \left (\left (4+e^x\right ) x\right )+x \log \left (\left (4+e^x\right ) x\right )+\left (1-e^2\right ) x \log \left (\left (4+e^x\right ) x\right ) \log \left (x \log \left (\left (4+e^x\right ) x\right )\right )-x^2 \log \left (\left (4+e^x\right ) x\right ) \log \left (x \log \left (\left (4+e^x\right ) x\right )\right )\right )}{x \log \left (4 x+e^x x\right )} \, dx\\ &=e^2 x+x^2+4 \int \left (\frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )}+\frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )}\right ) \, dx+\int \frac {e^{4-x} \left ((1+x) \left (e^2+x\right )-\log \left (\left (4+e^x\right ) x\right ) \left (-e^2-x+x \left (-1+e^2+x\right ) \log \left (x \log \left (\left (4+e^x\right ) x\right )\right )\right )\right )}{x \log \left (4 x+e^x x\right )} \, dx\\ &=e^2 x+x^2+4 \int \frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+4 \int \frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+\int \left (\frac {e^{4-x} \left (e^2+x\right ) \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )}+e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )\right ) \, dx\\ &=e^2 x+x^2+4 \int \frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+4 \int \frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{4-x} \left (e^2+x\right ) \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )} \, dx+\int e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right ) \, dx\\ &=e^2 x+x^2+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )+4 \int \frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+4 \int \frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+\int \left (\frac {e^{4-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{\log \left (4 x+e^x x\right )}+\frac {e^{6-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )}\right ) \, dx-\int \frac {e^{4-x} \left (e^2+x\right ) \left (4+e^x (1+x)+\left (4+e^x\right ) \log \left (\left (4+e^x\right ) x\right )\right )}{\left (4+e^x\right ) x \log \left (4 x+e^x x\right )} \, dx\\ &=e^2 x+x^2+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )+4 \int \frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+4 \int \frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx-\int \left (\frac {4 e^{4-x} \left (-e^2-x\right )}{\left (4+e^x\right ) \log \left (4 x+e^x x\right )}+\frac {e^{4-x} \left (e^2+x\right ) \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )}\right ) \, dx+\int \frac {e^{4-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{\log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{6-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )} \, dx\\ &=e^2 x+x^2+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )+4 \int \frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx-4 \int \frac {e^{4-x} \left (-e^2-x\right )}{\left (4+e^x\right ) \log \left (4 x+e^x x\right )} \, dx+4 \int \frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+\int \left (\frac {e^{6-x}}{x}+\frac {e^{6-x}}{\log \left (4 x+e^x x\right )}+\frac {e^{6-x}}{x \log \left (4 x+e^x x\right )}\right ) \, dx+\int \left (e^{4-x}+\frac {e^{4-x}}{\log \left (4 x+e^x x\right )}+\frac {e^{4-x} x}{\log \left (4 x+e^x x\right )}\right ) \, dx-\int \frac {e^{4-x} \left (e^2+x\right ) \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )} \, dx\\ &=e^2 x+x^2+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )-4 \int \left (\frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )}+\frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )}\right ) \, dx+4 \int \frac {e^{6-x}}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+4 \int \frac {e^{4-x} x}{\left (-4-e^x\right ) \log \left (4 x+e^x x\right )} \, dx+\int e^{4-x} \, dx+\int \frac {e^{6-x}}{x} \, dx-\int \left (\frac {e^{4-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{\log \left (4 x+e^x x\right )}+\frac {e^{6-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )}\right ) \, dx+\int \frac {e^{4-x}}{\log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{6-x}}{\log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{6-x}}{x \log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{4-x} x}{\log \left (4 x+e^x x\right )} \, dx\\ &=-e^{4-x}+e^2 x+x^2+e^6 \text {Ei}(-x)+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )+\int \frac {e^{4-x}}{\log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{6-x}}{\log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{6-x}}{x \log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{4-x} x}{\log \left (4 x+e^x x\right )} \, dx-\int \frac {e^{4-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{\log \left (4 x+e^x x\right )} \, dx-\int \frac {e^{6-x} \left (1+x+\log \left (\left (4+e^x\right ) x\right )\right )}{x \log \left (4 x+e^x x\right )} \, dx\\ &=-e^{4-x}+e^2 x+x^2+e^6 \text {Ei}(-x)+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )-\int \left (\frac {e^{6-x}}{x}+\frac {e^{6-x}}{\log \left (4 x+e^x x\right )}+\frac {e^{6-x}}{x \log \left (4 x+e^x x\right )}\right ) \, dx-\int \left (e^{4-x}+\frac {e^{4-x}}{\log \left (4 x+e^x x\right )}+\frac {e^{4-x} x}{\log \left (4 x+e^x x\right )}\right ) \, dx+\int \frac {e^{4-x}}{\log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{6-x}}{\log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{6-x}}{x \log \left (4 x+e^x x\right )} \, dx+\int \frac {e^{4-x} x}{\log \left (4 x+e^x x\right )} \, dx\\ &=-e^{4-x}+e^2 x+x^2+e^6 \text {Ei}(-x)+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )-\int e^{4-x} \, dx-\int \frac {e^{6-x}}{x} \, dx\\ &=e^2 x+x^2+e^{4-x} \log \left (x \log \left (4 x+e^x x\right )\right )-e^{4-x} \left (1-e^2-x\right ) \log \left (x \log \left (4 x+e^x x\right )\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 33, normalized size = 1.14 \begin {gather*} e^2 x+x^2+e^{4-x} \left (e^2+x\right ) \log \left (x \log \left (\left (4+e^x\right ) x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 37, normalized size = 1.28 \begin {gather*} {\left ({\left (x^{2} + x e^{2}\right )} e^{x} + {\left (x e^{4} + e^{6}\right )} \log \left (x \log \left (x e^{x} + 4 \, x\right )\right )\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.46, size = 54, normalized size = 1.86 \begin {gather*} {\left (x^{2} e^{x} + x e^{4} \log \relax (x) + x e^{4} \log \left (\log \relax (x) + \log \left (e^{x} + 4\right )\right ) + x e^{\left (x + 2\right )} + e^{6} \log \relax (x) + e^{6} \log \left (\log \relax (x) + \log \left (e^{x} + 4\right )\right )\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 1.83, size = 2622, normalized size = 90.41
method | result | size |
risch | \(\text {Expression too large to display}\) | \(2622\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 43, normalized size = 1.48 \begin {gather*} {\left (x e^{4} + e^{6}\right )} e^{\left (-x\right )} \log \relax (x) + {\left (x e^{4} + e^{6}\right )} e^{\left (-x\right )} \log \left (\log \relax (x) + \log \left (e^{x} + 4\right )\right ) + x^{2} + x e^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {{\mathrm {e}}^{\ln \left (\ln \left (x\,\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\right )\right )-x+4}\,\left (4\,x+4\,{\mathrm {e}}^2+\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\,\left (4\,x+4\,{\mathrm {e}}^2+{\mathrm {e}}^x\,\left (x+{\mathrm {e}}^2\right )\right )+{\mathrm {e}}^x\,\left (x+{\mathrm {e}}^2\,\left (x+1\right )+x^2\right )-\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\,\ln \left (x\,\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\right )\,\left (4\,x\,{\mathrm {e}}^2-4\,x+{\mathrm {e}}^x\,\left (x\,{\mathrm {e}}^2-x+x^2\right )+4\,x^2\right )\right )+\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\,\ln \left (x\,\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\right )\,\left ({\mathrm {e}}^x\,\left (2\,x^2+{\mathrm {e}}^2\,x\right )+4\,x\,{\mathrm {e}}^2+8\,x^2\right )}{\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\,\ln \left (x\,\ln \left (4\,x+x\,{\mathrm {e}}^x\right )\right )\,\left (4\,x+x\,{\mathrm {e}}^x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.43, size = 32, normalized size = 1.10 \begin {gather*} x^{2} + x e^{2} + \left (x e^{4} + e^{6}\right ) e^{- x} \log {\left (x \log {\left (x e^{x} + 4 x \right )} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________