Optimal. Leaf size=28 \[ 1+e^{\frac {4}{x+\log (x)}}-x-\log (x) \left (2-x^2+\log (x)\right ) \]
________________________________________________________________________________________
Rubi [A] time = 2.92, antiderivative size = 30, normalized size of antiderivative = 1.07, number of steps used = 31, number of rules used = 7, integrand size = 102, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {6688, 6742, 6706, 14, 2357, 2301, 2304} \begin {gather*} x^2 \log (x)-x-\log ^2(x)+e^{\frac {4}{x+\log (x)}}-2 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2301
Rule 2304
Rule 2357
Rule 6688
Rule 6706
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {(1+x) \left (-4 e^{\frac {4}{x+\log (x)}}+(-2+x) x^2+2 x \left (-2+x^2\right ) \log (x)+\left (-2-3 x+4 x^2\right ) \log ^2(x)+2 (-1+x) \log ^3(x)\right )}{x (x+\log (x))^2} \, dx\\ &=\int \left (-\frac {4 e^{\frac {4}{x+\log (x)}} (1+x)}{x (x+\log (x))^2}+\frac {(-2+x) x (1+x)}{(x+\log (x))^2}+\frac {2 (1+x) \left (-2+x^2\right ) \log (x)}{(x+\log (x))^2}+\frac {(1+x) \left (-2-3 x+4 x^2\right ) \log ^2(x)}{x (x+\log (x))^2}+\frac {2 (-1+x) (1+x) \log ^3(x)}{x (x+\log (x))^2}\right ) \, dx\\ &=2 \int \frac {(1+x) \left (-2+x^2\right ) \log (x)}{(x+\log (x))^2} \, dx+2 \int \frac {(-1+x) (1+x) \log ^3(x)}{x (x+\log (x))^2} \, dx-4 \int \frac {e^{\frac {4}{x+\log (x)}} (1+x)}{x (x+\log (x))^2} \, dx+\int \frac {(-2+x) x (1+x)}{(x+\log (x))^2} \, dx+\int \frac {(1+x) \left (-2-3 x+4 x^2\right ) \log ^2(x)}{x (x+\log (x))^2} \, dx\\ &=e^{\frac {4}{x+\log (x)}}+2 \int \left (-\frac {x \left (-2-2 x+x^2+x^3\right )}{(x+\log (x))^2}+\frac {(1+x) \left (-2+x^2\right )}{x+\log (x)}\right ) \, dx+2 \int \left (-2 \left (-1+x^2\right )+\frac {(-1+x) (1+x) \log (x)}{x}+\frac {x^2 \left (1-x^2\right )}{(x+\log (x))^2}+\frac {3 x \left (-1+x^2\right )}{x+\log (x)}\right ) \, dx+\int \left (-\frac {2 x}{(x+\log (x))^2}-\frac {x^2}{(x+\log (x))^2}+\frac {x^3}{(x+\log (x))^2}\right ) \, dx+\int \left (\frac {-2-5 x+x^2+4 x^3}{x}+\frac {x \left (-2-5 x+x^2+4 x^3\right )}{(x+\log (x))^2}-\frac {2 \left (-2-5 x+x^2+4 x^3\right )}{x+\log (x)}\right ) \, dx\\ &=e^{\frac {4}{x+\log (x)}}+2 \int \frac {(-1+x) (1+x) \log (x)}{x} \, dx-2 \int \frac {x}{(x+\log (x))^2} \, dx+2 \int \frac {x^2 \left (1-x^2\right )}{(x+\log (x))^2} \, dx-2 \int \frac {x \left (-2-2 x+x^2+x^3\right )}{(x+\log (x))^2} \, dx+2 \int \frac {(1+x) \left (-2+x^2\right )}{x+\log (x)} \, dx-2 \int \frac {-2-5 x+x^2+4 x^3}{x+\log (x)} \, dx-4 \int \left (-1+x^2\right ) \, dx+6 \int \frac {x \left (-1+x^2\right )}{x+\log (x)} \, dx+\int \frac {-2-5 x+x^2+4 x^3}{x} \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+\int \frac {x^3}{(x+\log (x))^2} \, dx+\int \frac {x \left (-2-5 x+x^2+4 x^3\right )}{(x+\log (x))^2} \, dx\\ &=e^{\frac {4}{x+\log (x)}}+4 x-\frac {4 x^3}{3}-2 \int \frac {x}{(x+\log (x))^2} \, dx+2 \int \left (-\frac {\log (x)}{x}+x \log (x)\right ) \, dx+2 \int \left (\frac {x^2}{(x+\log (x))^2}-\frac {x^4}{(x+\log (x))^2}\right ) \, dx-2 \int \left (-\frac {2 x}{(x+\log (x))^2}-\frac {2 x^2}{(x+\log (x))^2}+\frac {x^3}{(x+\log (x))^2}+\frac {x^4}{(x+\log (x))^2}\right ) \, dx+2 \int \left (-\frac {2}{x+\log (x)}-\frac {2 x}{x+\log (x)}+\frac {x^2}{x+\log (x)}+\frac {x^3}{x+\log (x)}\right ) \, dx-2 \int \left (-\frac {2}{x+\log (x)}-\frac {5 x}{x+\log (x)}+\frac {x^2}{x+\log (x)}+\frac {4 x^3}{x+\log (x)}\right ) \, dx+6 \int \left (-\frac {x}{x+\log (x)}+\frac {x^3}{x+\log (x)}\right ) \, dx+\int \left (-5-\frac {2}{x}+x+4 x^2\right ) \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+\int \frac {x^3}{(x+\log (x))^2} \, dx+\int \left (-\frac {2 x}{(x+\log (x))^2}-\frac {5 x^2}{(x+\log (x))^2}+\frac {x^3}{(x+\log (x))^2}+\frac {4 x^4}{(x+\log (x))^2}\right ) \, dx\\ &=e^{\frac {4}{x+\log (x)}}-x+\frac {x^2}{2}-2 \log (x)-2 \int \frac {\log (x)}{x} \, dx+2 \int x \log (x) \, dx-2 \left (2 \int \frac {x}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^2}{(x+\log (x))^2} \, dx-2 \int \frac {x^3}{(x+\log (x))^2} \, dx-2 \left (2 \int \frac {x^4}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^3}{x+\log (x)} \, dx+4 \int \frac {x}{(x+\log (x))^2} \, dx+4 \int \frac {x^2}{(x+\log (x))^2} \, dx+4 \int \frac {x^4}{(x+\log (x))^2} \, dx-4 \int \frac {x}{x+\log (x)} \, dx-5 \int \frac {x^2}{(x+\log (x))^2} \, dx-6 \int \frac {x}{x+\log (x)} \, dx+6 \int \frac {x^3}{x+\log (x)} \, dx-8 \int \frac {x^3}{x+\log (x)} \, dx+10 \int \frac {x}{x+\log (x)} \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+2 \int \frac {x^3}{(x+\log (x))^2} \, dx\\ &=e^{\frac {4}{x+\log (x)}}-x-2 \log (x)+x^2 \log (x)-\log ^2(x)-2 \left (2 \int \frac {x}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^2}{(x+\log (x))^2} \, dx-2 \int \frac {x^3}{(x+\log (x))^2} \, dx-2 \left (2 \int \frac {x^4}{(x+\log (x))^2} \, dx\right )+2 \int \frac {x^3}{x+\log (x)} \, dx+4 \int \frac {x}{(x+\log (x))^2} \, dx+4 \int \frac {x^2}{(x+\log (x))^2} \, dx+4 \int \frac {x^4}{(x+\log (x))^2} \, dx-4 \int \frac {x}{x+\log (x)} \, dx-5 \int \frac {x^2}{(x+\log (x))^2} \, dx-6 \int \frac {x}{x+\log (x)} \, dx+6 \int \frac {x^3}{x+\log (x)} \, dx-8 \int \frac {x^3}{x+\log (x)} \, dx+10 \int \frac {x}{x+\log (x)} \, dx-\int \frac {x^2}{(x+\log (x))^2} \, dx+2 \int \frac {x^3}{(x+\log (x))^2} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.73, size = 30, normalized size = 1.07 \begin {gather*} e^{\frac {4}{x+\log (x)}}-x-2 \log (x)+x^2 \log (x)-\log ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.67, size = 27, normalized size = 0.96 \begin {gather*} {\left (x^{2} - 2\right )} \log \relax (x) - \log \relax (x)^{2} - x + e^{\left (\frac {4}{x + \log \relax (x)}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 29, normalized size = 1.04 \begin {gather*} x^{2} \log \relax (x) - \log \relax (x)^{2} - x + e^{\left (\frac {4}{x + \log \relax (x)}\right )} - 2 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 30, normalized size = 1.07
method | result | size |
risch | \(-\ln \relax (x )^{2}+x^{2} \ln \relax (x )-x -2 \ln \relax (x )+{\mathrm e}^{\frac {4}{x +\ln \relax (x )}}\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 27, normalized size = 0.96 \begin {gather*} {\left (x^{2} - 2\right )} \log \relax (x) - \log \relax (x)^{2} - x + e^{\left (\frac {4}{x + \log \relax (x)}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.71, size = 29, normalized size = 1.04 \begin {gather*} {\mathrm {e}}^{\frac {4}{x+\ln \relax (x)}}-x-2\,\ln \relax (x)+x^2\,\ln \relax (x)-{\ln \relax (x)}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.42, size = 26, normalized size = 0.93 \begin {gather*} x^{2} \log {\relax (x )} - x + e^{\frac {4}{x + \log {\relax (x )}}} - \log {\relax (x )}^{2} - 2 \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________