Optimal. Leaf size=28 \[ 4 x+\frac {x+\left (5+\left (e^x-x\right )^2\right ) (2+\log (x))^2}{x} \]
________________________________________________________________________________________
Rubi [B] time = 0.28, antiderivative size = 90, normalized size of antiderivative = 3.21, number of steps used = 14, number of rules used = 8, integrand size = 94, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {14, 2288, 2334, 2353, 2296, 2295, 2305, 2304} \begin {gather*} \frac {e^{2 x} (\log (x)+2) (2 x+x \log (x))}{x^2}+8 x+\frac {20}{x}+x \log ^2(x)+\frac {5 \log ^2(x)}{x}-2 x \log (x)+2 \left (3 x+\frac {5}{x}\right ) \log (x)+\frac {10 \log (x)}{x}-\frac {2 e^x (\log (x)+2) (2 x+x \log (x))}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2288
Rule 2295
Rule 2296
Rule 2304
Rule 2305
Rule 2334
Rule 2353
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {2 e^x (2+\log (x)) (2+2 x+x \log (x))}{x}+\frac {e^{2 x} (2+\log (x)) (4 x-\log (x)+2 x \log (x))}{x^2}+\frac {12 x^2-10 \log (x)+6 x^2 \log (x)-5 \log ^2(x)+x^2 \log ^2(x)}{x^2}\right ) \, dx\\ &=-\left (2 \int \frac {e^x (2+\log (x)) (2+2 x+x \log (x))}{x} \, dx\right )+\int \frac {e^{2 x} (2+\log (x)) (4 x-\log (x)+2 x \log (x))}{x^2} \, dx+\int \frac {12 x^2-10 \log (x)+6 x^2 \log (x)-5 \log ^2(x)+x^2 \log ^2(x)}{x^2} \, dx\\ &=\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}+\int \left (12+\frac {2 \left (-5+3 x^2\right ) \log (x)}{x^2}+\frac {\left (-5+x^2\right ) \log ^2(x)}{x^2}\right ) \, dx\\ &=12 x+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}+2 \int \frac {\left (-5+3 x^2\right ) \log (x)}{x^2} \, dx+\int \frac {\left (-5+x^2\right ) \log ^2(x)}{x^2} \, dx\\ &=12 x+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}-2 \int \left (3+\frac {5}{x^2}\right ) \, dx+\int \left (\log ^2(x)-\frac {5 \log ^2(x)}{x^2}\right ) \, dx\\ &=\frac {10}{x}+6 x+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}-5 \int \frac {\log ^2(x)}{x^2} \, dx+\int \log ^2(x) \, dx\\ &=\frac {10}{x}+6 x+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {5 \log ^2(x)}{x}+x \log ^2(x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}-2 \int \log (x) \, dx-10 \int \frac {\log (x)}{x^2} \, dx\\ &=\frac {20}{x}+8 x+\frac {10 \log (x)}{x}-2 x \log (x)+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {5 \log ^2(x)}{x}+x \log ^2(x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.09, size = 66, normalized size = 2.36 \begin {gather*} \frac {4 \left (5+e^{2 x}-2 e^x x+2 x^2\right )+4 \left (5+e^{2 x}-2 e^x x+x^2\right ) \log (x)+\left (5+e^{2 x}-2 e^x x+x^2\right ) \log ^2(x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 59, normalized size = 2.11 \begin {gather*} \frac {{\left (x^{2} - 2 \, x e^{x} + e^{\left (2 \, x\right )} + 5\right )} \log \relax (x)^{2} + 8 \, x^{2} - 8 \, x e^{x} + 4 \, {\left (x^{2} - 2 \, x e^{x} + e^{\left (2 \, x\right )} + 5\right )} \log \relax (x) + 4 \, e^{\left (2 \, x\right )} + 20}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.12, size = 80, normalized size = 2.86 \begin {gather*} \frac {x^{2} \log \relax (x)^{2} - 2 \, x e^{x} \log \relax (x)^{2} + 4 \, x^{2} \log \relax (x) - 8 \, x e^{x} \log \relax (x) + e^{\left (2 \, x\right )} \log \relax (x)^{2} + 8 \, x^{2} - 8 \, x e^{x} + 4 \, e^{\left (2 \, x\right )} \log \relax (x) + 5 \, \log \relax (x)^{2} + 4 \, e^{\left (2 \, x\right )} + 20 \, \log \relax (x) + 20}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.10, size = 66, normalized size = 2.36
method | result | size |
risch | \(\frac {\left (x^{2}-2 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x}+5\right ) \ln \relax (x )^{2}}{x}+\frac {4 \left (x^{2}-2 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x}+5\right ) \ln \relax (x )}{x}+\frac {8 x^{2}-8 \,{\mathrm e}^{x} x +4 \,{\mathrm e}^{2 x}+20}{x}\) | \(66\) |
default | \(8 x -8 \,{\mathrm e}^{x} \ln \relax (x )-2 \,{\mathrm e}^{x} \ln \relax (x )^{2}-8 \,{\mathrm e}^{x}+\frac {\ln \relax (x )^{2} {\mathrm e}^{2 x}+4 \ln \relax (x ) {\mathrm e}^{2 x}+4 \,{\mathrm e}^{2 x}}{x}+x \ln \relax (x )^{2}+4 x \ln \relax (x )+\frac {5 \ln \relax (x )^{2}}{x}+\frac {20 \ln \relax (x )}{x}+\frac {20}{x}\) | \(83\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} 6 \, x \log \relax (x) - 8 \, e^{x} \log \relax (x) + 6 \, x - \frac {2 \, x e^{x} \log \relax (x)^{2} - {\left (x^{2} + 5\right )} \log \relax (x)^{2} - 2 \, x^{2} - {\left (\log \relax (x)^{2} + 4 \, \log \relax (x)\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x^{2} - 5\right )} \log \relax (x) - 10}{x} + \frac {10 \, \log \relax (x)}{x} + \frac {10}{x} + 8 \, {\rm Ei}\left (2 \, x\right ) - 8 \, e^{x} - 4 \, \int \frac {e^{\left (2 \, x\right )}}{x^{2}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.35, size = 70, normalized size = 2.50 \begin {gather*} \frac {4\,{\mathrm {e}}^{2\,x}+20\,\ln \relax (x)+5\,{\ln \relax (x)}^2+4\,{\mathrm {e}}^{2\,x}\,\ln \relax (x)+{\mathrm {e}}^{2\,x}\,{\ln \relax (x)}^2+20}{x}-8\,{\mathrm {e}}^x\,\ln \relax (x)-8\,{\mathrm {e}}^x-2\,{\mathrm {e}}^x\,{\ln \relax (x)}^2+x\,\left ({\ln \relax (x)}^2+4\,\ln \relax (x)+8\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.44, size = 71, normalized size = 2.54 \begin {gather*} 8 x + \frac {\left (x^{2} + 5\right ) \log {\relax (x )}^{2}}{x} + \frac {\left (4 x^{2} + 20\right ) \log {\relax (x )}}{x} + \frac {\left (- 2 x \log {\relax (x )}^{2} - 8 x \log {\relax (x )} - 8 x\right ) e^{x} + \left (\log {\relax (x )}^{2} + 4 \log {\relax (x )} + 4\right ) e^{2 x}}{x} + \frac {20}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________