Optimal. Leaf size=28 \[ \frac {2+\log (x)}{x}+\log \left (e^{-x} (1+x) \left (-1+x^2\right )^2 \log (x)\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.37, antiderivative size = 32, normalized size of antiderivative = 1.14, number of steps used = 9, number of rules used = 7, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.127, Rules used = {1593, 6688, 14, 1802, 2302, 29, 2304} \begin {gather*} -x+\frac {2}{x}+2 \log (1-x)+3 \log (x+1)+\log (\log (x))+\frac {\log (x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 29
Rule 1593
Rule 1802
Rule 2302
Rule 2304
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-x+x^3+\left (1-x^2+5 x^3-x^4\right ) \log (x)+\left (1-x^2\right ) \log ^2(x)}{x^2 \left (-1+x^2\right ) \log (x)} \, dx\\ &=\int \frac {-\frac {-1+x^2-5 x^3+x^4}{-1+x^2}+\frac {x}{\log (x)}-\log (x)}{x^2} \, dx\\ &=\int \left (\frac {1-x^2+5 x^3-x^4}{x^2 \left (-1+x^2\right )}+\frac {1}{x \log (x)}-\frac {\log (x)}{x^2}\right ) \, dx\\ &=\int \frac {1-x^2+5 x^3-x^4}{x^2 \left (-1+x^2\right )} \, dx+\int \frac {1}{x \log (x)} \, dx-\int \frac {\log (x)}{x^2} \, dx\\ &=\frac {1}{x}+\frac {\log (x)}{x}+\int \left (-1+\frac {2}{-1+x}-\frac {1}{x^2}+\frac {3}{1+x}\right ) \, dx+\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\log (x)\right )\\ &=\frac {2}{x}-x+2 \log (1-x)+\frac {\log (x)}{x}+3 \log (1+x)+\log (\log (x))\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 32, normalized size = 1.14 \begin {gather*} \frac {2}{x}-x+2 \log (1-x)+\frac {\log (x)}{x}+3 \log (1+x)+\log (\log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 34, normalized size = 1.21 \begin {gather*} -\frac {x^{2} - 3 \, x \log \left (x + 1\right ) - 2 \, x \log \left (x - 1\right ) - x \log \left (\log \relax (x)\right ) - \log \relax (x) - 2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 30, normalized size = 1.07 \begin {gather*} -x + \frac {\log \relax (x)}{x} + \frac {2}{x} + 3 \, \log \left (x + 1\right ) + 2 \, \log \left (x - 1\right ) + \log \left (\log \relax (x)\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.36, size = 30, normalized size = 1.07
method | result | size |
norman | \(\frac {2-x^{2}+\ln \relax (x )}{x}+2 \ln \left (x -1\right )+3 \ln \left (x +1\right )+\ln \left (\ln \relax (x )\right )\) | \(30\) |
default | \(\ln \left (\ln \relax (x )\right )+\frac {\ln \relax (x )}{x}+\frac {2}{x}-x +3 \ln \left (x +1\right )+2 \ln \left (x -1\right )\) | \(31\) |
risch | \(\frac {\ln \relax (x )}{x}+\frac {3 \ln \left (x +1\right ) x +2 \ln \left (x -1\right ) x -x^{2}+2}{x}+\ln \left (\ln \relax (x )\right )\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.79, size = 30, normalized size = 1.07 \begin {gather*} -\frac {x^{2} - \log \relax (x) - 2}{x} + 3 \, \log \left (x + 1\right ) + 2 \, \log \left (x - 1\right ) + \log \left (\log \relax (x)\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.22, size = 27, normalized size = 0.96 \begin {gather*} 2\,\ln \left (x-1\right )-x+3\,\ln \left (x+1\right )+\ln \left (\ln \relax (x)\right )+\frac {\ln \relax (x)+2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.19, size = 27, normalized size = 0.96 \begin {gather*} - x + 2 \log {\left (x - 1 \right )} + 3 \log {\left (x + 1 \right )} + \log {\left (\log {\relax (x )} \right )} + \frac {\log {\relax (x )}}{x} + \frac {2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________