Optimal. Leaf size=31 \[ 3+x+\log \left (-x+\frac {x \log (x (\log (-1+x)+\log (x)))}{2 x-x^2}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 2.43, antiderivative size = 32, normalized size of antiderivative = 1.03, number of steps used = 6, number of rules used = 4, integrand size = 206, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.019, Rules used = {6688, 6728, 43, 6684} \begin {gather*} \log \left (-x^2+2 x-\log (x (\log (x-1)+\log (x)))\right )+x-\log (2-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 6684
Rule 6688
Rule 6728
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2-5 x+2 x^2+(-1+x) \log (-1+x) \left (-2+5 x-3 x^3+x^4+(-3+x) x \log (x (\log (-1+x)+\log (x)))\right )+(-1+x) \log (x) \left (-2+5 x-3 x^3+x^4+(-3+x) x \log (x (\log (-1+x)+\log (x)))\right )}{x \left (2-3 x+x^2\right ) (\log (-1+x)+\log (x)) ((-2+x) x+\log (x (\log (-1+x)+\log (x))))} \, dx\\ &=\int \left (\frac {-3+x}{-2+x}+\frac {-1+2 x-\log (-1+x)+3 x \log (-1+x)-4 x^2 \log (-1+x)+2 x^3 \log (-1+x)-\log (x)+3 x \log (x)-4 x^2 \log (x)+2 x^3 \log (x)}{(-1+x) x (\log (-1+x)+\log (x)) \left (-2 x+x^2+\log (x (\log (-1+x)+\log (x)))\right )}\right ) \, dx\\ &=\int \frac {-3+x}{-2+x} \, dx+\int \frac {-1+2 x-\log (-1+x)+3 x \log (-1+x)-4 x^2 \log (-1+x)+2 x^3 \log (-1+x)-\log (x)+3 x \log (x)-4 x^2 \log (x)+2 x^3 \log (x)}{(-1+x) x (\log (-1+x)+\log (x)) \left (-2 x+x^2+\log (x (\log (-1+x)+\log (x)))\right )} \, dx\\ &=\log \left (2 x-x^2-\log (x (\log (-1+x)+\log (x)))\right )+\int \left (1+\frac {1}{2-x}\right ) \, dx\\ &=x-\log (2-x)+\log \left (2 x-x^2-\log (x (\log (-1+x)+\log (x)))\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.25, size = 28, normalized size = 0.90 \begin {gather*} x-\log (2-x)+\log \left (-2 x+x^2+\log (x (\log (-1+x)+\log (x)))\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 28, normalized size = 0.90 \begin {gather*} x + \log \left (x^{2} - 2 \, x + \log \left (x \log \left (x - 1\right ) + x \log \relax (x)\right )\right ) - \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.42, size = 26, normalized size = 0.84 \begin {gather*} x + \log \left (x^{2} - 2 \, x + \log \relax (x) + \log \left (\log \left (x - 1\right ) + \log \relax (x)\right )\right ) - \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.11, size = 134, normalized size = 4.32
method | result | size |
risch | \(x -\ln \left (x -2\right )+\ln \left (\ln \left (\ln \left (x -1\right )+\ln \relax (x )\right )-\frac {i \left (\pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (\ln \left (x -1\right )+\ln \relax (x )\right )\right ) \mathrm {csgn}\left (i x \left (\ln \left (x -1\right )+\ln \relax (x )\right )\right )-\pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (\ln \left (x -1\right )+\ln \relax (x )\right )\right )^{2}-\pi \,\mathrm {csgn}\left (i \left (\ln \left (x -1\right )+\ln \relax (x )\right )\right ) \mathrm {csgn}\left (i x \left (\ln \left (x -1\right )+\ln \relax (x )\right )\right )^{2}+\pi \mathrm {csgn}\left (i x \left (\ln \left (x -1\right )+\ln \relax (x )\right )\right )^{3}+2 i x^{2}-4 i x +2 i \ln \relax (x )\right )}{2}\right )\) | \(134\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 26, normalized size = 0.84 \begin {gather*} x + \log \left (x^{2} - 2 \, x + \log \relax (x) + \log \left (\log \left (x - 1\right ) + \log \relax (x)\right )\right ) - \log \left (x - 2\right ) \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 {\ln \left (x-1\right )\,\left (x^5-4\,x^4+3\,x^3+5\,x^2-7\,x+2\right )-5\,x+\ln \left (x\,\ln \left (x-1\right )+x\,\ln \relax (x)\right )\,\left (\ln \relax (x)\,\left (x^3-4\,x^2+3\,x\right )+\ln \left (x-1\right )\,\left (x^3-4\,x^2+3\,x\right )\right )+2\,x^2+\ln \relax (x)\,\left (x^5-4\,x^4+3\,x^3+5\,x^2-7\,x+2\right )+2}{\ln \relax (x)\,\left (-x^5+5\,x^4-8\,x^3+4\,x^2\right )-\ln \left (x\,\ln \left (x-1\right )+x\,\ln \relax (x)\right )\,\left (\ln \relax (x)\,\left (x^3-3\,x^2+2\,x\right )+\ln \left (x-1\right )\,\left (x^3-3\,x^2+2\,x\right )\right )+\ln \left (x-1\right )\,\left (-x^5+5\,x^4-8\,x^3+4\,x^2\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.77, size = 27, normalized size = 0.87 \begin {gather*} x - \log {\left (x - 2 \right )} + \log {\left (x^{2} - 2 x + \log {\left (x \log {\relax (x )} + x \log {\left (x - 1 \right )} \right )} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________