Optimal. Leaf size=22 \[ \frac {4 \left (-\frac {4 x}{-27+x}+\log (3-x)\right )^2}{x^3} \]
________________________________________________________________________________________
Rubi [B] time = 1.35, antiderivative size = 114, normalized size of antiderivative = 5.18, number of steps used = 39, number of rules used = 22, integrand size = 98, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.224, Rules used = {6741, 6742, 44, 88, 72, 2418, 2395, 36, 31, 2390, 2301, 29, 2392, 2391, 2398, 2411, 2347, 2344, 2316, 2315, 2314, 2319} \begin {gather*} \frac {4 \log ^2(3-x)}{x^3}+\frac {32 \log (3-x)}{27 x^2}+\frac {64}{729 (27-x)}+\frac {64}{729 x}+\frac {64}{27 (27-x)^2}+\frac {32 \log (3-x)}{729 (27-x)}-\frac {8 (3-x) \log (3-x)}{27 x}+\frac {680 \log (3-x)}{729 x}-\frac {8}{27} \log (3-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 44
Rule 72
Rule 88
Rule 2301
Rule 2314
Rule 2315
Rule 2316
Rule 2319
Rule 2344
Rule 2347
Rule 2390
Rule 2391
Rule 2392
Rule 2395
Rule 2398
Rule 2411
Rule 2418
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-28512 x^2+4032 x^3-224 x^4+\left (-297432 x+77112 x^2-5256 x^3+104 x^4\right ) \log (3-x)+\left (-708588+314928 x-29160 x^2+1008 x^3-12 x^4\right ) \log ^2(3-x)}{(3-x) (27-x)^3 x^4} \, dx\\ &=\int \left (-\frac {224}{(-27+x)^3 (-3+x)}-\frac {28512}{(-27+x)^3 (-3+x) x^2}+\frac {4032}{(-27+x)^3 (-3+x) x}+\frac {8 \left (1377-306 x+13 x^2\right ) \log (3-x)}{(-27+x)^2 (-3+x) x^3}-\frac {12 \log ^2(3-x)}{x^4}\right ) \, dx\\ &=8 \int \frac {\left (1377-306 x+13 x^2\right ) \log (3-x)}{(-27+x)^2 (-3+x) x^3} \, dx-12 \int \frac {\log ^2(3-x)}{x^4} \, dx-224 \int \frac {1}{(-27+x)^3 (-3+x)} \, dx+4032 \int \frac {1}{(-27+x)^3 (-3+x) x} \, dx-28512 \int \frac {1}{(-27+x)^3 (-3+x) x^2} \, dx\\ &=\frac {4 \log ^2(3-x)}{x^3}+8 \int \frac {\log (3-x)}{(3-x) x^3} \, dx+8 \int \left (\frac {4 \log (3-x)}{729 (-27+x)^2}+\frac {\log (3-x)}{27 (-3+x)}-\frac {17 \log (3-x)}{27 x^3}-\frac {85 \log (3-x)}{729 x^2}-\frac {\log (3-x)}{27 x}\right ) \, dx-224 \int \left (\frac {1}{24 (-27+x)^3}-\frac {1}{576 (-27+x)^2}+\frac {1}{13824 (-27+x)}-\frac {1}{13824 (-3+x)}\right ) \, dx+4032 \int \left (\frac {1}{648 (-27+x)^3}-\frac {17}{139968 (-27+x)^2}+\frac {217}{30233088 (-27+x)}-\frac {1}{41472 (-3+x)}+\frac {1}{59049 x}\right ) \, dx-28512 \int \left (\frac {1}{17496 (-27+x)^3}-\frac {25}{3779136 (-27+x)^2}+\frac {139}{272097792 (-27+x)}-\frac {1}{124416 (-3+x)}+\frac {1}{59049 x^2}+\frac {4}{531441 x}\right ) \, dx\\ &=\frac {64}{27 (27-x)^2}+\frac {64}{729 (27-x)}+\frac {352}{729 x}+\frac {4}{27} \log (3-x)+\frac {4 \log ^2(3-x)}{x^3}-\frac {4 \log (27-x)}{2187}-\frac {320 \log (x)}{2187}+\frac {32}{729} \int \frac {\log (3-x)}{(-27+x)^2} \, dx+\frac {8}{27} \int \frac {\log (3-x)}{-3+x} \, dx-\frac {8}{27} \int \frac {\log (3-x)}{x} \, dx-\frac {680}{729} \int \frac {\log (3-x)}{x^2} \, dx-\frac {136}{27} \int \frac {\log (3-x)}{x^3} \, dx-8 \operatorname {Subst}\left (\int \frac {\log (x)}{(3-x)^3 x} \, dx,x,3-x\right )\\ &=\frac {64}{27 (27-x)^2}+\frac {64}{729 (27-x)}+\frac {352}{729 x}+\frac {4}{27} \log (3-x)+\frac {32 \log (3-x)}{729 (27-x)}+\frac {68 \log (3-x)}{27 x^2}+\frac {680 \log (3-x)}{729 x}+\frac {4 \log ^2(3-x)}{x^3}-\frac {4 \log (27-x)}{2187}-\frac {320 \log (x)}{2187}-\frac {8}{27} \log (3) \log (x)-\frac {32}{729} \int \frac {1}{(3-x) (-27+x)} \, dx-\frac {8}{27} \int \frac {\log \left (1-\frac {x}{3}\right )}{x} \, dx+\frac {8}{27} \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,3-x\right )+\frac {680}{729} \int \frac {1}{(3-x) x} \, dx+\frac {68}{27} \int \frac {1}{(3-x) x^2} \, dx-\frac {8}{3} \operatorname {Subst}\left (\int \frac {\log (x)}{(3-x)^3} \, dx,x,3-x\right )-\frac {8}{3} \operatorname {Subst}\left (\int \frac {\log (x)}{(3-x)^2 x} \, dx,x,3-x\right )\\ &=\frac {64}{27 (27-x)^2}+\frac {64}{729 (27-x)}+\frac {352}{729 x}+\frac {4}{27} \log (3-x)+\frac {32 \log (3-x)}{729 (27-x)}+\frac {32 \log (3-x)}{27 x^2}+\frac {680 \log (3-x)}{729 x}+\frac {4}{27} \log ^2(3-x)+\frac {4 \log ^2(3-x)}{x^3}-\frac {4 \log (27-x)}{2187}-\frac {320 \log (x)}{2187}-\frac {8}{27} \log (3) \log (x)+\frac {8 \text {Li}_2\left (\frac {x}{3}\right )}{27}+\frac {4 \int \frac {1}{3-x} \, dx}{2187}+\frac {4 \int \frac {1}{-27+x} \, dx}{2187}+\frac {680 \int \frac {1}{3-x} \, dx}{2187}+\frac {680 \int \frac {1}{x} \, dx}{2187}-\frac {8}{9} \operatorname {Subst}\left (\int \frac {\log (x)}{(3-x)^2} \, dx,x,3-x\right )-\frac {8}{9} \operatorname {Subst}\left (\int \frac {\log (x)}{(3-x) x} \, dx,x,3-x\right )+\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{(3-x)^2 x} \, dx,x,3-x\right )+\frac {68}{27} \int \left (-\frac {1}{9 (-3+x)}+\frac {1}{3 x^2}+\frac {1}{9 x}\right ) \, dx\\ &=\frac {64}{27 (27-x)^2}+\frac {64}{729 (27-x)}-\frac {260}{729 x}-\frac {4}{9} \log (3-x)+\frac {32 \log (3-x)}{729 (27-x)}+\frac {32 \log (3-x)}{27 x^2}+\frac {680 \log (3-x)}{729 x}-\frac {8 (3-x) \log (3-x)}{27 x}+\frac {4}{27} \log ^2(3-x)+\frac {4 \log ^2(3-x)}{x^3}+\frac {4 \log (x)}{9}-\frac {8}{27} \log (3) \log (x)+\frac {8 \text {Li}_2\left (\frac {x}{3}\right )}{27}+\frac {8}{27} \operatorname {Subst}\left (\int \frac {1}{3-x} \, dx,x,3-x\right )-\frac {8}{27} \operatorname {Subst}\left (\int \frac {\log (x)}{3-x} \, dx,x,3-x\right )-\frac {8}{27} \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,3-x\right )+\frac {4}{3} \operatorname {Subst}\left (\int \left (\frac {1}{3 (-3+x)^2}-\frac {1}{9 (-3+x)}+\frac {1}{9 x}\right ) \, dx,x,3-x\right )\\ &=\frac {64}{27 (27-x)^2}+\frac {64}{729 (27-x)}+\frac {64}{729 x}-\frac {8}{27} \log (3-x)+\frac {32 \log (3-x)}{729 (27-x)}+\frac {32 \log (3-x)}{27 x^2}+\frac {680 \log (3-x)}{729 x}-\frac {8 (3-x) \log (3-x)}{27 x}+\frac {4 \log ^2(3-x)}{x^3}+\frac {8 \text {Li}_2\left (\frac {x}{3}\right )}{27}-\frac {8}{27} \operatorname {Subst}\left (\int \frac {\log \left (\frac {x}{3}\right )}{3-x} \, dx,x,3-x\right )\\ &=\frac {64}{27 (27-x)^2}+\frac {64}{729 (27-x)}+\frac {64}{729 x}-\frac {8}{27} \log (3-x)+\frac {32 \log (3-x)}{729 (27-x)}+\frac {32 \log (3-x)}{27 x^2}+\frac {680 \log (3-x)}{729 x}-\frac {8 (3-x) \log (3-x)}{27 x}+\frac {4 \log ^2(3-x)}{x^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.18, size = 92, normalized size = 4.18 \begin {gather*} -\frac {4 \left (2 (-27+x)^2 x^3 \tanh ^{-1}\left (\frac {1}{12} (-15+x)\right )-x \left (472392-17496 x+729 x^2-54 x^3+x^4\right ) \log (3-x)-2187 (-27+x)^2 \log ^2(3-x)+x^2 \left (-34992+(-27+x)^2 x \log (27-x)\right )\right )}{2187 (-27+x)^2 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.61, size = 56, normalized size = 2.55 \begin {gather*} \frac {4 \, {\left ({\left (x^{2} - 54 \, x + 729\right )} \log \left (-x + 3\right )^{2} + 16 \, x^{2} - 8 \, {\left (x^{2} - 27 \, x\right )} \log \left (-x + 3\right )\right )}}{x^{5} - 54 \, x^{4} + 729 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.21, size = 56, normalized size = 2.55 \begin {gather*} -\frac {32}{729} \, {\left (\frac {1}{x - 27} - \frac {x + 27}{x^{2}}\right )} \log \left (-x + 3\right ) - \frac {64 \, {\left (x - 54\right )}}{729 \, {\left (x^{2} - 54 \, x + 729\right )}} + \frac {64}{729 \, x} + \frac {4 \, \log \left (-x + 3\right )^{2}}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 41, normalized size = 1.86
method | result | size |
risch | \(\frac {4 \ln \left (3-x \right )^{2}}{x^{3}}-\frac {32 \ln \left (3-x \right )}{x^{2} \left (x -27\right )}+\frac {64}{\left (x -27\right )^{2} x}\) | \(41\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.58, size = 56, normalized size = 2.55 \begin {gather*} \frac {4 \, {\left ({\left (x^{2} - 54 \, x + 729\right )} \log \left (-x + 3\right )^{2} + 16 \, x^{2} - 8 \, {\left (x^{2} - 27 \, x\right )} \log \left (-x + 3\right )\right )}}{x^{5} - 54 \, x^{4} + 729 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.31, size = 33, normalized size = 1.50 \begin {gather*} \frac {4\,{\left (4\,x+27\,\ln \left (3-x\right )-x\,\ln \left (3-x\right )\right )}^2}{x^3\,{\left (x-27\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.27, size = 39, normalized size = 1.77 \begin {gather*} \frac {64}{x^{3} - 54 x^{2} + 729 x} - \frac {32 \log {\left (3 - x \right )}}{x^{3} - 27 x^{2}} + \frac {4 \log {\left (3 - x \right )}^{2}}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________