Optimal. Leaf size=101 \[ -\frac {2}{x}-\frac {10 \sqrt {-x+x^2}}{x}-\frac {2 \left (-x+x^2\right )^{3/2}}{3 x^3}-16 \tanh ^{-1}\left (\frac {1-10 x}{6 \sqrt {-x+x^2}}\right )-16 \log (x)+16 \log (1+8 x)-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps
used = 20, number of rules used = 12, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {2617, 2615,
6874, 654, 634, 212, 748, 857, 738, 664, 676, 678} \begin {gather*} -\frac {10 \sqrt {x^2-x}}{x}-\frac {\log \left (4 \sqrt {x^2-x}+4 x-1\right )}{2 x^2}-16 \tanh ^{-1}\left (\frac {1-10 x}{6 \sqrt {x^2-x}}\right )-\frac {2 \left (x^2-x\right )^{3/2}}{3 x^3}-\frac {2}{x}-16 \log (x)+16 \log (8 x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 634
Rule 654
Rule 664
Rule 676
Rule 678
Rule 738
Rule 748
Rule 857
Rule 2615
Rule 2617
Rule 6874
Rubi steps
\begin {align*} \int \frac {\log \left (-1+4 x+4 \sqrt {(-1+x) x}\right )}{x^3} \, dx &=\int \frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{x^3} \, dx\\ &=-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2}-4 \int \frac {1}{x^2 \left (-4 (1+2 x) \sqrt {-x+x^2}+8 \left (-x+x^2\right )\right )} \, dx\\ &=-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2}-4 \int \left (-\frac {1}{2 x^2}+\frac {4}{x}-\frac {32}{1+8 x}-\frac {x}{12 \sqrt {-x+x^2}}+\frac {256 \sqrt {-x+x^2}}{3 (-1-8 x)}+\frac {\sqrt {-x+x^2}}{4 x^3}-\frac {5 \sqrt {-x+x^2}}{4 x^2}+\frac {43 \sqrt {-x+x^2}}{4 x}\right ) \, dx\\ &=-\frac {2}{x}-16 \log (x)+16 \log (1+8 x)-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2}+\frac {1}{3} \int \frac {x}{\sqrt {-x+x^2}} \, dx+5 \int \frac {\sqrt {-x+x^2}}{x^2} \, dx-43 \int \frac {\sqrt {-x+x^2}}{x} \, dx-\frac {1024}{3} \int \frac {\sqrt {-x+x^2}}{-1-8 x} \, dx-\int \frac {\sqrt {-x+x^2}}{x^3} \, dx\\ &=-\frac {2}{x}-\frac {10 \sqrt {-x+x^2}}{x}-\frac {2 \left (-x+x^2\right )^{3/2}}{3 x^3}-16 \log (x)+16 \log (1+8 x)-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2}+\frac {1}{6} \int \frac {1}{\sqrt {-x+x^2}} \, dx+5 \int \frac {1}{\sqrt {-x+x^2}} \, dx-\frac {64}{3} \int \frac {1-10 x}{(-1-8 x) \sqrt {-x+x^2}} \, dx+\frac {43}{2} \int \frac {1}{\sqrt {-x+x^2}} \, dx\\ &=-\frac {2}{x}-\frac {10 \sqrt {-x+x^2}}{x}-\frac {2 \left (-x+x^2\right )^{3/2}}{3 x^3}-16 \log (x)+16 \log (1+8 x)-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2}+\frac {1}{3} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-x+x^2}}\right )+10 \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-x+x^2}}\right )-\frac {80}{3} \int \frac {1}{\sqrt {-x+x^2}} \, dx+43 \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-x+x^2}}\right )-48 \int \frac {1}{(-1-8 x) \sqrt {-x+x^2}} \, dx\\ &=-\frac {2}{x}-\frac {10 \sqrt {-x+x^2}}{x}-\frac {2 \left (-x+x^2\right )^{3/2}}{3 x^3}+\frac {160}{3} \tanh ^{-1}\left (\frac {x}{\sqrt {-x+x^2}}\right )-16 \log (x)+16 \log (1+8 x)-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2}-\frac {160}{3} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-x+x^2}}\right )+96 \text {Subst}\left (\int \frac {1}{36-x^2} \, dx,x,\frac {-1+10 x}{\sqrt {-x+x^2}}\right )\\ &=-\frac {2}{x}-\frac {10 \sqrt {-x+x^2}}{x}-\frac {2 \left (-x+x^2\right )^{3/2}}{3 x^3}-16 \tanh ^{-1}\left (\frac {1-10 x}{6 \sqrt {-x+x^2}}\right )-16 \log (x)+16 \log (1+8 x)-\frac {\log \left (-1+4 x+4 \sqrt {-x+x^2}\right )}{2 x^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 82, normalized size = 0.81 \begin {gather*} -\frac {2}{x}-\frac {2 \sqrt {(-1+x) x} (-1+16 x)}{3 x^2}-16 \log (x)+32 \log (1+8 x)-\frac {\log \left (-1+4 x+4 \sqrt {(-1+x) x}\right )}{2 x^2}-16 \log \left (1-10 x+6 \sqrt {(-1+x) x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.00, size = 0, normalized size = 0.00 \[\int \frac {\ln \left (-1+4 x +4 \sqrt {\left (-1+x \right ) x}\right )}{x^{3}}\, dx\]
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*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 138, normalized size = 1.37 \begin {gather*} \frac {189 \, x^{2} \log \left (8 \, x + 1\right ) - 192 \, x^{2} \log \left (x\right ) + 3 \, x^{2} \log \left (-2 \, x + 2 \, \sqrt {x^{2} - x} + 1\right ) + 189 \, x^{2} \log \left (-2 \, x + 2 \, \sqrt {x^{2} - x} - 1\right ) - 189 \, x^{2} \log \left (-4 \, x + 4 \, \sqrt {x^{2} - x} + 1\right ) - 128 \, x^{2} + 6 \, {\left (x^{2} - 1\right )} \log \left (4 \, x + 4 \, \sqrt {x^{2} - x} - 1\right ) - 8 \, \sqrt {x^{2} - x} {\left (16 \, x - 1\right )} - 24 \, x}{12 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.81, size = 130, normalized size = 1.29 \begin {gather*} -\frac {2}{x} - \frac {\log \left (4 \, x + 4 \, \sqrt {{\left (x - 1\right )} x} - 1\right )}{2 \, x^{2}} - \frac {2 \, {\left (18 \, {\left (x - \sqrt {x^{2} - x}\right )}^{2} - 3 \, x + 3 \, \sqrt {x^{2} - x} + 1\right )}}{3 \, {\left (x - \sqrt {x^{2} - x}\right )}^{3}} + 16 \, \log \left ({\left | 8 \, x + 1 \right |}\right ) - 16 \, \log \left ({\left | x \right |}\right ) + 16 \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} - x} - 1 \right |}\right ) - 16 \, \log \left ({\left | -4 \, x + 4 \, \sqrt {x^{2} - x} + 1 \right |}\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.01 \begin {gather*} \int \frac {\ln \left (4\,x+4\,\sqrt {x\,\left (x-1\right )}-1\right )}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________