Optimal. Leaf size=29 \[ \frac {\log ^2\left (-\frac {16}{x}-x+4 x \left (x-x^2\right )\right )}{4 x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 5.76, 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 = {6873, 12,
6874, 2608, 2605, 1694, 1676, 1121, 632, 210, 1141, 1175, 1178, 642, 1120, 1108, 648, 1687, 1183}
\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 210
Rule 632
Rule 642
Rule 648
Rule 1108
Rule 1120
Rule 1121
Rule 1141
Rule 1175
Rule 1178
Rule 1183
Rule 1676
Rule 1687
Rule 1694
Rule 2605
Rule 2608
Rule 6873
Rule 6874
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-\text {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 \text {Subst}\left (\int \frac {x (-1+4 x)}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+\text {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 \text {Subst}\left (\int \frac {x}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )-128 \text {Subst}\left (\int \frac {4 x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+128 \text {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 \text {Subst}\left (\int \frac {1}{1025-32 x+256 x^2} \, dx,x,\left (-\frac {1}{4}+x\right )^2\right )-128 \text {Subst}\left (\int \frac {x}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )+128 \text {Subst}\left (\int \frac {4 x^2}{1025-32 x^2+256 x^4} \, dx,x,-\frac {1}{4}+x\right )-512 \text {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 \text {Subst}\left (\int \frac {1}{1025-32 x+256 x^2} \, dx,x,\left (-\frac {1}{4}+x\right )^2\right )-128 \text {Subst}\left (\int \frac {1}{-1048576-x^2} \, dx,x,256 x (-1+2 x)\right )+256 \text {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 \text {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 \text {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} \text {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} \text {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 \text {Subst}\left (\int \frac {1}{-1048576-x^2} \, dx,x,256 x (-1+2 x)\right )-256 \text {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 \text {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}}} \text {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}}} \text {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} \text {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} \text {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}}} \text {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}}} \text {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 )+\text {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 )+\text {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}-\text {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 )-\text {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 = 115.96, size = 0, normalized size = 0.00 \begin {gather*} \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 )}{64 x^2+4 x^4-16 x^5+16 x^6} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, 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.29, 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 \left (x\right ) + \log \left (x\right )^{2}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.10, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________
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]
________________________________________________________________________________________