Optimal. Leaf size=29 \[ \frac {e^{3+x}+x \left (-e^{4-x}+x-\log (x)\right )^2}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 46, normalized size of antiderivative = 1.59, number of steps used = 6, number of rules used = 5, integrand size = 82, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {14, 2194, 2197, 6686, 2288} \begin {gather*} -\frac {2 e^{4-x} \left (x^2-x \log (x)\right )}{x}+e^{8-2 x}+\frac {e^{x+3}}{x}+(x-\log (x))^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2194
Rule 2197
Rule 2288
Rule 6686
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-2 e^{8-2 x}+\frac {e^{3+x} (-1+x)}{x^2}+\frac {2 (-1+x) (x-\log (x))}{x}+\frac {2 e^{4-x} \left (1-x+x^2-x \log (x)\right )}{x}\right ) \, dx\\ &=-\left (2 \int e^{8-2 x} \, dx\right )+2 \int \frac {(-1+x) (x-\log (x))}{x} \, dx+2 \int \frac {e^{4-x} \left (1-x+x^2-x \log (x)\right )}{x} \, dx+\int \frac {e^{3+x} (-1+x)}{x^2} \, dx\\ &=e^{8-2 x}+\frac {e^{3+x}}{x}+(x-\log (x))^2-\frac {2 e^{4-x} \left (x^2-x \log (x)\right )}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 50, normalized size = 1.72 \begin {gather*} e^{8-2 x}+\frac {e^{3+x}}{x}-2 e^{4-x} x+x^2+\left (2 e^{4-x}-2 x\right ) \log (x)+\log ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.54, size = 74, normalized size = 2.55 \begin {gather*} \frac {{\left (x^{3} e^{\left (2 \, x + 6\right )} + x e^{\left (2 \, x + 6\right )} \log \relax (x)^{2} - 2 \, x^{2} e^{\left (x + 10\right )} + x e^{14} - 2 \, {\left (x^{2} e^{\left (2 \, x + 6\right )} - x e^{\left (x + 10\right )}\right )} \log \relax (x) + e^{\left (3 \, x + 9\right )}\right )} e^{\left (-2 \, x - 6\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 55, normalized size = 1.90 \begin {gather*} \frac {x^{3} - 2 \, x^{2} e^{\left (-x + 4\right )} - 2 \, x^{2} \log \relax (x) + 2 \, x e^{\left (-x + 4\right )} \log \relax (x) + x \log \relax (x)^{2} + x e^{\left (-2 \, x + 8\right )} + e^{\left (x + 3\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 49, normalized size = 1.69
method | result | size |
default | \(-2 x \,{\mathrm e}^{-x +4}+2 \ln \relax (x ) {\mathrm e}^{-x +4}+\frac {{\mathrm e}^{3+x}}{x}+x^{2}+{\mathrm e}^{-2 x +8}-2 x \ln \relax (x )+\ln \relax (x )^{2}\) | \(49\) |
risch | \(\ln \relax (x )^{2}+2 \left (-{\mathrm e}^{3+x} x +{\mathrm e}^{7}\right ) {\mathrm e}^{-3-x} \ln \relax (x )+\frac {\left (x^{3} {\mathrm e}^{2 x +6}-2 x^{2} {\mathrm e}^{x +10}+{\mathrm e}^{14} x +{\mathrm e}^{3 x +9}\right ) {\mathrm e}^{-2 x -6}}{x}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.62, size = 64, normalized size = 2.21 \begin {gather*} x^{2} + {\rm Ei}\relax (x) e^{3} - 2 \, {\left (x e^{4} + e^{4}\right )} e^{\left (-x\right )} - e^{3} \Gamma \left (-1, -x\right ) - 2 \, x \log \relax (x) + 2 \, e^{\left (-x + 4\right )} \log \relax (x) + \log \relax (x)^{2} + 2 \, e^{\left (-x + 4\right )} + e^{\left (-2 \, x + 8\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.57, size = 64, normalized size = 2.21 \begin {gather*} {\mathrm {e}}^{8-2\,x}-2\,x-2\,x\,\left (\ln \relax (x)-1\right )+{\ln \relax (x)}^2-2\,x\,{\mathrm {e}}^{4-x}+\frac {{\mathrm {e}}^{x+3}}{x}-2\,{\mathrm {e}}^4\,\mathrm {expint}\relax (x)-2\,{\mathrm {e}}^4\,\left (\mathrm {ei}\left (-x\right )-{\mathrm {e}}^{-x}\,\ln \relax (x)\right )+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.40, size = 49, normalized size = 1.69 \begin {gather*} x^{2} - 2 x \log {\relax (x )} + \log {\relax (x )}^{2} + \frac {x e^{8 - 2 x} + \left (- 2 x^{2} + 2 x \log {\relax (x )}\right ) e^{4 - x} + e^{7} e^{x - 4}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________