Optimal. Leaf size=29 \[ \frac {\log ^2\left (-\frac {16}{x}-x+4 x \left (x-x^2\right )\right )}{4 x} \]
________________________________________________________________________________________
Rubi [A] time = 5.67, antiderivative size = 30, normalized size of antiderivative = 1.03, number of steps used = 51, number of rules used = 19, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {6741, 12, 6742, 2528, 2525, 1680, 1662, 1107, 618, 204, 1127, 1161, 1164, 628, 1106, 1094, 634, 1673, 1169} \begin {gather*} \frac {\log ^2\left (-\frac {4 x^4-4 x^3+x^2+16}{x}\right )}{4 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 618
Rule 628
Rule 634
Rule 1094
Rule 1106
Rule 1107
Rule 1127
Rule 1161
Rule 1164
Rule 1169
Rule 1662
Rule 1673
Rule 1680
Rule 2525
Rule 2528
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\left (-32+2 x^2-16 x^3+24 x^4\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )+\left (-16-x^2+4 x^3-4 x^4\right ) \log ^2\left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{4 x^2 \left (16+x^2-4 x^3+4 x^4\right )} \, dx\\ &=\frac {1}{4} \int \frac {\left (-32+2 x^2-16 x^3+24 x^4\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )+\left (-16-x^2+4 x^3-4 x^4\right ) \log ^2\left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2 \left (16+x^2-4 x^3+4 x^4\right )} \, dx\\ &=\frac {1}{4} \int \left (\frac {2 \left (-16+x^2-8 x^3+12 x^4\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2 \left (16+x^2-4 x^3+4 x^4\right )}-\frac {\log ^2\left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2}\right ) \, dx\\ &=-\left (\frac {1}{4} \int \frac {\log ^2\left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2} \, dx\right )+\frac {1}{2} \int \frac {\left (-16+x^2-8 x^3+12 x^4\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2 \left (16+x^2-4 x^3+4 x^4\right )} \, dx\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}-\frac {1}{2} \int \frac {\left (-16+x^2-8 x^3+12 x^4\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2 \left (16+x^2-4 x^3+4 x^4\right )} \, dx+\frac {1}{2} \int \left (-\frac {\log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2}+\frac {2 \left (1-6 x+8 x^2\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}\right ) \, dx\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}-\frac {1}{2} \int \frac {\log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2} \, dx-\frac {1}{2} \int \left (-\frac {\log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2}+\frac {2 \left (1-6 x+8 x^2\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}\right ) \, dx+\int \frac {\left (1-6 x+8 x^2\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4} \, dx\\ &=\frac {\log \left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{2 x}+\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}-\frac {1}{2} \int \frac {-16+x^2-8 x^3+12 x^4}{x^2 \left (16+x^2-4 x^3+4 x^4\right )} \, dx+\frac {1}{2} \int \frac {\log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{x^2} \, dx-\int \frac {\left (1-6 x+8 x^2\right ) \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4} \, dx+\int \left (\frac {\log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}-\frac {6 x \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}+\frac {8 x^2 \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}\right ) \, dx\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}+\frac {1}{2} \int \frac {-16+x^2-8 x^3+12 x^4}{x^2 \left (16+x^2-4 x^3+4 x^4\right )} \, dx-\frac {1}{2} \int \left (-\frac {1}{x^2}+\frac {2 \left (1-6 x+8 x^2\right )}{16+x^2-4 x^3+4 x^4}\right ) \, dx-6 \int \frac {x \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4} \, dx+8 \int \frac {x^2 \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4} \, dx+\int \frac {\log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4} \, dx-\int \left (\frac {\log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}-\frac {6 x \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}+\frac {8 x^2 \log \left (\frac {-16-x^2+4 x^3-4 x^4}{x}\right )}{16+x^2-4 x^3+4 x^4}\right ) \, dx\\ &=-\frac {1}{2 x}+\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}+\frac {1}{2} \int \left (-\frac {1}{x^2}+\frac {2 \left (1-6 x+8 x^2\right )}{16+x^2-4 x^3+4 x^4}\right ) \, dx-\int \frac {1-6 x+8 x^2}{16+x^2-4 x^3+4 x^4} \, dx\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}+\int \frac {1-6 x+8 x^2}{16+x^2-4 x^3+4 x^4} \, dx-\operatorname {Subst}\left (\int \frac {128 x (-1+4 x)}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}-128 \operatorname {Subst}\left (\int \frac {x (-1+4 x)}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+\operatorname {Subst}\left (\int \frac {128 x (-1+4 x)}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}+128 \operatorname {Subst}\left (\int \frac {x}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )-128 \operatorname {Subst}\left (\int \frac {4 x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+128 \operatorname {Subst}\left (\int \frac {x (-1+4 x)}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}+64 \operatorname {Subst}\left (\int \frac {1}{1025-32 x+256 x^2} \, dx,x,\left (-\frac {1}{4}+x\right )^2\right )-128 \operatorname {Subst}\left (\int \frac {x}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+128 \operatorname {Subst}\left (\int \frac {4 x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )-512 \operatorname {Subst}\left (\int \frac {x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}-64 \operatorname {Subst}\left (\int \frac {1}{1025-32 x+256 x^2} \, dx,x,\left (-\frac {1}{4}+x\right )^2\right )-128 \operatorname {Subst}\left (\int \frac {1}{-1048576-x^2} \, dx,x,256 x (-1+2 x)\right )+256 \operatorname {Subst}\left (\int \frac {\frac {5 \sqrt {41}}{16}-x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )-256 \operatorname {Subst}\left (\int \frac {\frac {5 \sqrt {41}}{16}+x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+512 \operatorname {Subst}\left (\int \frac {x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )\\ &=-\frac {1}{8} \tan ^{-1}\left (\frac {1}{4} (1-2 x) x\right )+\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\frac {5 \sqrt {41}}{16}-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x+x^2} \, dx,x,-\frac {1}{4}+x\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\frac {5 \sqrt {41}}{16}+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x+x^2} \, dx,x,-\frac {1}{4}+x\right )+128 \operatorname {Subst}\left (\int \frac {1}{-1048576-x^2} \, dx,x,256 x (-1+2 x)\right )-256 \operatorname {Subst}\left (\int \frac {\frac {5 \sqrt {41}}{16}-x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+256 \operatorname {Subst}\left (\int \frac {\frac {5 \sqrt {41}}{16}+x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )-\sqrt {\frac {2}{1+5 \sqrt {41}}} \operatorname {Subst}\left (\int \frac {\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )}+2 x}{-\frac {5 \sqrt {41}}{16}-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x-x^2} \, dx,x,-\frac {1}{4}+x\right )-\sqrt {\frac {2}{1+5 \sqrt {41}}} \operatorname {Subst}\left (\int \frac {\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )}-2 x}{-\frac {5 \sqrt {41}}{16}+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x-x^2} \, dx,x,-\frac {1}{4}+x\right )\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}+\sqrt {\frac {2}{1+5 \sqrt {41}}} \log \left (5 \sqrt {41}-\sqrt {2 \left (1+5 \sqrt {41}\right )} (1-4 x)+(-1+4 x)^2\right )-\sqrt {\frac {2}{1+5 \sqrt {41}}} \log \left (5 \sqrt {41}+\sqrt {2 \left (1+5 \sqrt {41}\right )} (1-4 x)+(-1+4 x)^2\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\frac {5 \sqrt {41}}{16}-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x+x^2} \, dx,x,-\frac {1}{4}+x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\frac {5 \sqrt {41}}{16}+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x+x^2} \, dx,x,-\frac {1}{4}+x\right )+\sqrt {\frac {2}{1+5 \sqrt {41}}} \operatorname {Subst}\left (\int \frac {\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )}+2 x}{-\frac {5 \sqrt {41}}{16}-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x-x^2} \, dx,x,-\frac {1}{4}+x\right )+\sqrt {\frac {2}{1+5 \sqrt {41}}} \operatorname {Subst}\left (\int \frac {\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )}-2 x}{-\frac {5 \sqrt {41}}{16}+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )} x-x^2} \, dx,x,-\frac {1}{4}+x\right )+\operatorname {Subst}\left (\int \frac {1}{\frac {1}{8} \left (1-5 \sqrt {41}\right )-x^2} \, dx,x,\frac {1}{2} \left (-1-\sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )}+4 x\right )\right )+\operatorname {Subst}\left (\int \frac {1}{\frac {1}{8} \left (1-5 \sqrt {41}\right )-x^2} \, dx,x,\frac {1}{4} \left (-2+\sqrt {2+10 \sqrt {41}}+8 x\right )\right )\\ &=-2 \sqrt {\frac {2}{-1+5 \sqrt {41}}} \tan ^{-1}\left (\frac {-2-\sqrt {2+10 \sqrt {41}}+8 x}{\sqrt {-2+10 \sqrt {41}}}\right )-2 \sqrt {\frac {2}{-1+5 \sqrt {41}}} \tan ^{-1}\left (\frac {-2+\sqrt {2+10 \sqrt {41}}+8 x}{\sqrt {-2+10 \sqrt {41}}}\right )+\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}-\operatorname {Subst}\left (\int \frac {1}{\frac {1}{8} \left (1-5 \sqrt {41}\right )-x^2} \, dx,x,\frac {1}{2} \left (-1-\sqrt {\frac {1}{2} \left (1+5 \sqrt {41}\right )}+4 x\right )\right )-\operatorname {Subst}\left (\int \frac {1}{\frac {1}{8} \left (1-5 \sqrt {41}\right )-x^2} \, dx,x,\frac {1}{4} \left (-2+\sqrt {2+10 \sqrt {41}}+8 x\right )\right )\\ &=\frac {\log ^2\left (-\frac {16+x^2-4 x^3+4 x^4}{x}\right )}{4 x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [F] time = 180.00, size = 0, normalized size = 0.00 \begin {gather*} \text {\$Aborted} \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.74, size = 28, normalized size = 0.97 \begin {gather*} \frac {\log \left (-\frac {4 \, x^{4} - 4 \, x^{3} + x^{2} + 16}{x}\right )^{2}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 30, normalized size = 1.03
method | result | size |
norman | \(\frac {\ln \left (\frac {-4 x^{4}+4 x^{3}-x^{2}-16}{x}\right )^{2}}{4 x}\) | \(30\) |
risch | \(\frac {\ln \left (\frac {-4 x^{4}+4 x^{3}-x^{2}-16}{x}\right )^{2}}{4 x}\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.78, size = 52, normalized size = 1.79 \begin {gather*} \frac {\log \left (-4 \, x^{4} + 4 \, x^{3} - x^{2} - 16\right )^{2} - 2 \, \log \left (-4 \, x^{4} + 4 \, x^{3} - x^{2} - 16\right ) \log \relax (x) + \log \relax (x)^{2}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.07, size = 28, normalized size = 0.97 \begin {gather*} \frac {{\ln \left (-\frac {4\,x^4-4\,x^3+x^2+16}{x}\right )}^2}{4\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.22, size = 22, normalized size = 0.76 \begin {gather*} \frac {\log {\left (\frac {- 4 x^{4} + 4 x^{3} - x^{2} - 16}{x} \right )}^{2}}{4 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________