Optimal. Leaf size=32 \[ 3+\frac {\left (\frac {-3+x+\frac {\log ^2(3)}{x^2}}{x}+\log \left (x^2\right )\right )^2}{3-x} \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(168\) vs. \(2(32)=64\).
time = 0.80, antiderivative size = 168, normalized size of antiderivative = 5.25, number of steps
used = 26, number of rules used = 14, integrand size = 111, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.126, Rules used = {1608, 27,
6874, 46, 78, 75, 2404, 2354, 2438, 2338, 2351, 31, 2341, 2355} \begin {gather*} \frac {\log ^4(3)}{(3-x) x^6}-\frac {2 \log ^2(3)}{x^4}+\frac {3}{x^2}+\frac {x \log ^2\left (x^2\right )}{3 (3-x)}+\frac {1}{3} \log ^2\left (x^2\right )-\frac {2 \left (27-\log ^2(3)\right ) \log \left (x^2\right )}{27 x}+\frac {2 x \log ^2(3) \log \left (x^2\right )}{81 (3-x)}+\frac {2 \log ^2(3) \log \left (x^2\right )}{9 x^2}+\frac {2 \log ^2(3) \log \left (x^2\right )}{3 x^3}+\frac {3}{x}+\frac {4}{81} \log ^2(3) \log (x)-\frac {4 \left (27-\log ^2(3)\right )}{27 x}-\frac {4 \log ^2(3)}{27 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 31
Rule 46
Rule 75
Rule 78
Rule 1608
Rule 2338
Rule 2341
Rule 2351
Rule 2354
Rule 2355
Rule 2404
Rule 2438
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-54 x^4+9 x^5+12 x^6-3 x^7+\left (72 x^2-36 x^3+4 x^4\right ) \log ^2(3)+(-18+7 x) \log ^4(3)+\left (18 x^5-2 x^7+\left (-18 x^3+8 x^4\right ) \log ^2(3)\right ) \log \left (x^2\right )+x^7 \log ^2\left (x^2\right )}{x^7 \left (9-6 x+x^2\right )} \, dx\\ &=\int \frac {-54 x^4+9 x^5+12 x^6-3 x^7+\left (72 x^2-36 x^3+4 x^4\right ) \log ^2(3)+(-18+7 x) \log ^4(3)+\left (18 x^5-2 x^7+\left (-18 x^3+8 x^4\right ) \log ^2(3)\right ) \log \left (x^2\right )+x^7 \log ^2\left (x^2\right )}{(-3+x)^2 x^7} \, dx\\ &=\int \left (-\frac {3}{(-3+x)^2}-\frac {54}{(-3+x)^2 x^3}+\frac {9}{(-3+x)^2 x^2}+\frac {12}{(-3+x)^2 x}+\frac {4 (-6+x) \log ^2(3)}{(-3+x) x^5}+\frac {(-18+7 x) \log ^4(3)}{(-3+x)^2 x^7}-\frac {2 \left (-9 x^2+x^4+9 \log ^2(3)-4 x \log ^2(3)\right ) \log \left (x^2\right )}{(-3+x)^2 x^4}+\frac {\log ^2\left (x^2\right )}{(-3+x)^2}\right ) \, dx\\ &=-\frac {3}{3-x}-2 \int \frac {\left (-9 x^2+x^4+9 \log ^2(3)-4 x \log ^2(3)\right ) \log \left (x^2\right )}{(-3+x)^2 x^4} \, dx+9 \int \frac {1}{(-3+x)^2 x^2} \, dx+12 \int \frac {1}{(-3+x)^2 x} \, dx-54 \int \frac {1}{(-3+x)^2 x^3} \, dx+\left (4 \log ^2(3)\right ) \int \frac {-6+x}{(-3+x) x^5} \, dx+\log ^4(3) \int \frac {-18+7 x}{(-3+x)^2 x^7} \, dx+\int \frac {\log ^2\left (x^2\right )}{(-3+x)^2} \, dx\\ &=-\frac {3}{3-x}+\frac {\log ^4(3)}{(3-x) x^6}+\frac {x \log ^2\left (x^2\right )}{3 (3-x)}+\frac {4}{3} \int \frac {\log \left (x^2\right )}{-3+x} \, dx-2 \int \left (\frac {2 \log \left (x^2\right )}{3 (-3+x)}-\frac {2 \log \left (x^2\right )}{3 x}-\frac {\log ^2(3) \log \left (x^2\right )}{27 (-3+x)^2}+\frac {\log ^2(3) \log \left (x^2\right )}{x^4}+\frac {2 \log ^2(3) \log \left (x^2\right )}{9 x^3}+\frac {\left (-27+\log ^2(3)\right ) \log \left (x^2\right )}{27 x^2}\right ) \, dx+9 \int \left (\frac {1}{9 (-3+x)^2}-\frac {2}{27 (-3+x)}+\frac {1}{9 x^2}+\frac {2}{27 x}\right ) \, dx+12 \int \left (\frac {1}{3 (-3+x)^2}-\frac {1}{9 (-3+x)}+\frac {1}{9 x}\right ) \, dx-54 \int \left (\frac {1}{27 (-3+x)^2}-\frac {1}{27 (-3+x)}+\frac {1}{9 x^3}+\frac {2}{27 x^2}+\frac {1}{27 x}\right ) \, dx+\left (4 \log ^2(3)\right ) \int \left (-\frac {1}{81 (-3+x)}+\frac {2}{x^5}+\frac {1}{3 x^4}+\frac {1}{9 x^3}+\frac {1}{27 x^2}+\frac {1}{81 x}\right ) \, dx\\ &=\frac {3}{x^2}+\frac {3}{x}-\frac {2 \log ^2(3)}{x^4}-\frac {4 \log ^2(3)}{9 x^3}-\frac {2 \log ^2(3)}{9 x^2}-\frac {4 \log ^2(3)}{27 x}+\frac {\log ^4(3)}{(3-x) x^6}-\frac {4}{81} \log ^2(3) \log (3-x)+\frac {4}{81} \log ^2(3) \log (x)+\frac {4}{3} \log \left (1-\frac {x}{3}\right ) \log \left (x^2\right )+\frac {x \log ^2\left (x^2\right )}{3 (3-x)}-\frac {4}{3} \int \frac {\log \left (x^2\right )}{-3+x} \, dx+\frac {4}{3} \int \frac {\log \left (x^2\right )}{x} \, dx-\frac {8}{3} \int \frac {\log \left (1-\frac {x}{3}\right )}{x} \, dx+\frac {1}{27} \left (2 \log ^2(3)\right ) \int \frac {\log \left (x^2\right )}{(-3+x)^2} \, dx-\frac {1}{9} \left (4 \log ^2(3)\right ) \int \frac {\log \left (x^2\right )}{x^3} \, dx-\left (2 \log ^2(3)\right ) \int \frac {\log \left (x^2\right )}{x^4} \, dx+\frac {1}{27} \left (2 \left (27-\log ^2(3)\right )\right ) \int \frac {\log \left (x^2\right )}{x^2} \, dx\\ &=\frac {3}{x^2}+\frac {3}{x}-\frac {2 \log ^2(3)}{x^4}-\frac {4 \log ^2(3)}{27 x}+\frac {\log ^4(3)}{(3-x) x^6}-\frac {4 \left (27-\log ^2(3)\right )}{27 x}-\frac {4}{81} \log ^2(3) \log (3-x)+\frac {4}{81} \log ^2(3) \log (x)+\frac {2 \log ^2(3) \log \left (x^2\right )}{3 x^3}+\frac {2 \log ^2(3) \log \left (x^2\right )}{9 x^2}+\frac {2 x \log ^2(3) \log \left (x^2\right )}{81 (3-x)}-\frac {2 \left (27-\log ^2(3)\right ) \log \left (x^2\right )}{27 x}+\frac {1}{3} \log ^2\left (x^2\right )+\frac {x \log ^2\left (x^2\right )}{3 (3-x)}+\frac {8 \text {Li}_2\left (\frac {x}{3}\right )}{3}+\frac {8}{3} \int \frac {\log \left (1-\frac {x}{3}\right )}{x} \, dx+\frac {1}{81} \left (4 \log ^2(3)\right ) \int \frac {1}{-3+x} \, dx\\ &=\frac {3}{x^2}+\frac {3}{x}-\frac {2 \log ^2(3)}{x^4}-\frac {4 \log ^2(3)}{27 x}+\frac {\log ^4(3)}{(3-x) x^6}-\frac {4 \left (27-\log ^2(3)\right )}{27 x}+\frac {4}{81} \log ^2(3) \log (x)+\frac {2 \log ^2(3) \log \left (x^2\right )}{3 x^3}+\frac {2 \log ^2(3) \log \left (x^2\right )}{9 x^2}+\frac {2 x \log ^2(3) \log \left (x^2\right )}{81 (3-x)}-\frac {2 \left (27-\log ^2(3)\right ) \log \left (x^2\right )}{27 x}+\frac {1}{3} \log ^2\left (x^2\right )+\frac {x \log ^2\left (x^2\right )}{3 (3-x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 33, normalized size = 1.03 \begin {gather*} -\frac {\left (-3 x^2+x^3+\log ^2(3)+x^3 \log \left (x^2\right )\right )^2}{(-3+x) x^6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(87\) vs.
\(2(32)=64\).
time = 0.10, size = 88, normalized size = 2.75
method | result | size |
risch | \(-\frac {\ln \left (x^{2}\right )^{2}}{x -3}-\frac {2 \left (x^{3}+\ln \left (3\right )^{2}-3 x^{2}\right ) \ln \left (x^{2}\right )}{\left (x -3\right ) x^{3}}-\frac {x^{6}+2 x^{3} \ln \left (3\right )^{2}-6 x^{5}+\ln \left (3\right )^{4}-6 x^{2} \ln \left (3\right )^{2}+9 x^{4}}{\left (x -3\right ) x^{6}}\) | \(88\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 400 vs.
\(2 (31) = 62\).
time = 0.52, size = 400, normalized size = 12.50 \begin {gather*} \frac {1}{7290} \, {\left (\frac {3 \, {\left (140 \, x^{6} - 210 \, x^{5} - 210 \, x^{4} - 315 \, x^{3} - 567 \, x^{2} - 1134 \, x - 2430\right )}}{x^{7} - 3 \, x^{6}} + 140 \, \log \left (x - 3\right ) - 140 \, \log \left (x\right )\right )} \log \left (3\right )^{4} - \frac {7}{7290} \, {\left (\frac {3 \, {\left (20 \, x^{5} - 30 \, x^{4} - 30 \, x^{3} - 45 \, x^{2} - 81 \, x - 162\right )}}{x^{6} - 3 \, x^{5}} + 20 \, \log \left (x - 3\right ) - 20 \, \log \left (x\right )\right )} \log \left (3\right )^{4} - \frac {2}{81} \, {\left (\frac {3 \, {\left (20 \, x^{4} - 30 \, x^{3} - 30 \, x^{2} - 45 \, x - 81\right )}}{x^{5} - 3 \, x^{4}} + 20 \, \log \left (x - 3\right ) - 20 \, \log \left (x\right )\right )} \log \left (3\right )^{2} + \frac {4}{27} \, {\left (\frac {3 \, {\left (4 \, x^{3} - 6 \, x^{2} - 6 \, x - 9\right )}}{x^{4} - 3 \, x^{3}} + 4 \, \log \left (x - 3\right ) - 4 \, \log \left (x\right )\right )} \log \left (3\right )^{2} - \frac {2}{27} \, {\left (\frac {3 \, {\left (2 \, x^{2} - 3 \, x - 3\right )}}{x^{3} - 3 \, x^{2}} + 2 \, \log \left (x - 3\right ) - 2 \, \log \left (x\right )\right )} \log \left (3\right )^{2} + \frac {4}{81} \, \log \left (3\right )^{2} \log \left (x - 3\right ) - \frac {2 \, {\left (162 \, x^{3} \log \left (x\right )^{2} - 6 \, {\left (\log \left (3\right )^{2} - 27\right )} x^{3} + 9 \, {\left (\log \left (3\right )^{2} - 54\right )} x^{2} + 9 \, x \log \left (3\right )^{2} + 54 \, \log \left (3\right )^{2} + 2 \, {\left (x^{4} \log \left (3\right )^{2} - 3 \, {\left (\log \left (3\right )^{2} - 27\right )} x^{3} - 243 \, x^{2} + 81 \, \log \left (3\right )^{2}\right )} \log \left (x\right )\right )}}{81 \, {\left (x^{4} - 3 \, x^{3}\right )}} + \frac {3 \, {\left (2 \, x^{2} - 3 \, x - 3\right )}}{x^{3} - 3 \, x^{2}} - \frac {2 \, x - 3}{x^{2} - 3 \, x} - \frac {1}{x - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 79 vs.
\(2 (31) = 62\).
time = 0.43, size = 79, normalized size = 2.47 \begin {gather*} -\frac {x^{6} \log \left (x^{2}\right )^{2} + x^{6} - 6 \, x^{5} + 9 \, x^{4} + \log \left (3\right )^{4} + 2 \, {\left (x^{3} - 3 \, x^{2}\right )} \log \left (3\right )^{2} + 2 \, {\left (x^{6} - 3 \, x^{5} + x^{3} \log \left (3\right )^{2}\right )} \log \left (x^{2}\right )}{x^{7} - 3 \, x^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs.
\(2 (24) = 48\).
time = 0.84, size = 87, normalized size = 2.72 \begin {gather*} \frac {- x^{6} + 6 x^{5} - 9 x^{4} - 2 x^{3} \log {\left (3 \right )}^{2} + 6 x^{2} \log {\left (3 \right )}^{2} - \log {\left (3 \right )}^{4}}{x^{7} - 3 x^{6}} + \frac {\left (- 2 x^{3} + 6 x^{2} - 2 \log {\left (3 \right )}^{2}\right ) \log {\left (x^{2} \right )}}{x^{4} - 3 x^{3}} - \frac {\log {\left (x^{2} \right )}^{2}}{x - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 147 vs.
\(2 (31) = 62\).
time = 0.40, size = 147, normalized size = 4.59 \begin {gather*} -\frac {\log \left (3\right )^{4}}{729 \, {\left (x - 3\right )}} - \frac {2}{27} \, {\left (\frac {\log \left (3\right )^{2}}{x - 3} - \frac {x^{2} \log \left (3\right )^{2} + 3 \, x \log \left (3\right )^{2} - 27 \, x^{2} + 9 \, \log \left (3\right )^{2}}{x^{3}}\right )} \log \left (x^{2}\right ) - \frac {\log \left (x^{2}\right )^{2}}{x - 3} + \frac {x^{5} \log \left (3\right )^{4} + 3 \, x^{4} \log \left (3\right )^{4} + 9 \, x^{3} \log \left (3\right )^{4} + 27 \, x^{2} \log \left (3\right )^{4} - 729 \, x^{5} + 81 \, x \log \left (3\right )^{4} + 2187 \, x^{4} - 1458 \, x^{2} \log \left (3\right )^{2} + 243 \, \log \left (3\right )^{4}}{729 \, x^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.00, size = 81, normalized size = 2.53 \begin {gather*} -\frac {x^3\,\left (2\,\ln \left (x^2\right )\,{\ln \left (3\right )}^2+2\,{\ln \left (3\right )}^2\right )-6\,x^2\,{\ln \left (3\right )}^2-x^5\,\left (6\,\ln \left (x^2\right )+6\right )+{\ln \left (3\right )}^4+9\,x^4+x^6\,\left ({\ln \left (x^2\right )}^2+2\,\ln \left (x^2\right )+1\right )}{x^6\,\left (x-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________