Optimal. Leaf size=21 \[ \left (-3 \left (3-\frac {2}{3-x}\right )^2+x+\log (x)\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.75, antiderivative size = 79, normalized size of antiderivative = 3.76, number of steps used = 21, number of rules used = 12, integrand size = 98, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {6688, 12, 6742, 1850, 1620, 2357, 2295, 2319, 44, 2314, 31, 2301} \begin {gather*} x^2-54 x-\frac {1704}{3-x}+\frac {1872}{(3-x)^2}-\frac {864}{(3-x)^3}+\frac {144}{(3-x)^4}+\log ^2(x)+\frac {24 x \log (x)}{3-x}+2 x \log (x)-\frac {24 \log (x)}{(3-x)^2}-30 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 44
Rule 1620
Rule 1850
Rule 2295
Rule 2301
Rule 2314
Rule 2319
Rule 2357
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2 \left (27+84 x-54 x^2+8 x^3-x^4\right ) \left (-147+135 x-33 x^2+x^3+(-3+x)^2 \log (x)\right )}{(3-x)^5 x} \, dx\\ &=2 \int \frac {\left (27+84 x-54 x^2+8 x^3-x^4\right ) \left (-147+135 x-33 x^2+x^3+(-3+x)^2 \log (x)\right )}{(3-x)^5 x} \, dx\\ &=2 \int \left (\frac {135 \left (-27-84 x+54 x^2-8 x^3+x^4\right )}{(-3+x)^5}-\frac {147 \left (-27-84 x+54 x^2-8 x^3+x^4\right )}{(-3+x)^5 x}-\frac {33 x \left (-27-84 x+54 x^2-8 x^3+x^4\right )}{(-3+x)^5}+\frac {x^2 \left (-27-84 x+54 x^2-8 x^3+x^4\right )}{(-3+x)^5}+\frac {\left (-27-84 x+54 x^2-8 x^3+x^4\right ) \log (x)}{(-3+x)^3 x}\right ) \, dx\\ &=2 \int \frac {x^2 \left (-27-84 x+54 x^2-8 x^3+x^4\right )}{(-3+x)^5} \, dx+2 \int \frac {\left (-27-84 x+54 x^2-8 x^3+x^4\right ) \log (x)}{(-3+x)^3 x} \, dx-66 \int \frac {x \left (-27-84 x+54 x^2-8 x^3+x^4\right )}{(-3+x)^5} \, dx+270 \int \frac {-27-84 x+54 x^2-8 x^3+x^4}{(-3+x)^5} \, dx-294 \int \frac {-27-84 x+54 x^2-8 x^3+x^4}{(-3+x)^5 x} \, dx\\ &=2 \int \left (7+\frac {648}{(-3+x)^5}+\frac {1620}{(-3+x)^4}+\frac {1188}{(-3+x)^3}+\frac {384}{(-3+x)^2}+\frac {69}{-3+x}+x\right ) \, dx+2 \int \left (\log (x)+\frac {24 \log (x)}{(-3+x)^3}+\frac {36 \log (x)}{(-3+x)^2}+\frac {\log (x)}{x}\right ) \, dx-66 \int \left (1+\frac {216}{(-3+x)^5}+\frac {468}{(-3+x)^4}+\frac {240}{(-3+x)^3}+\frac {48}{(-3+x)^2}+\frac {7}{-3+x}\right ) \, dx+270 \int \left (\frac {72}{(-3+x)^5}+\frac {132}{(-3+x)^4}+\frac {36}{(-3+x)^3}+\frac {4}{(-3+x)^2}+\frac {1}{-3+x}\right ) \, dx-294 \int \left (\frac {24}{(-3+x)^5}+\frac {36}{(-3+x)^4}+\frac {4}{3 (-3+x)^2}-\frac {1}{9 (-3+x)}+\frac {1}{9 x}\right ) \, dx\\ &=\frac {144}{(3-x)^4}-\frac {864}{(3-x)^3}+\frac {1872}{(3-x)^2}-\frac {1712}{3-x}-52 x+x^2-\frac {64}{3} \log (3-x)-\frac {98 \log (x)}{3}+2 \int \log (x) \, dx+2 \int \frac {\log (x)}{x} \, dx+48 \int \frac {\log (x)}{(-3+x)^3} \, dx+72 \int \frac {\log (x)}{(-3+x)^2} \, dx\\ &=\frac {144}{(3-x)^4}-\frac {864}{(3-x)^3}+\frac {1872}{(3-x)^2}-\frac {1712}{3-x}-54 x+x^2-\frac {64}{3} \log (3-x)-\frac {98 \log (x)}{3}-\frac {24 \log (x)}{(3-x)^2}+2 x \log (x)+\frac {24 x \log (x)}{3-x}+\log ^2(x)+24 \int \frac {1}{-3+x} \, dx+24 \int \frac {1}{(-3+x)^2 x} \, dx\\ &=\frac {144}{(3-x)^4}-\frac {864}{(3-x)^3}+\frac {1872}{(3-x)^2}-\frac {1712}{3-x}-54 x+x^2+\frac {8}{3} \log (3-x)-\frac {98 \log (x)}{3}-\frac {24 \log (x)}{(3-x)^2}+2 x \log (x)+\frac {24 x \log (x)}{3-x}+\log ^2(x)+24 \int \left (\frac {1}{3 (-3+x)^2}-\frac {1}{9 (-3+x)}+\frac {1}{9 x}\right ) \, dx\\ &=\frac {144}{(3-x)^4}-\frac {864}{(3-x)^3}+\frac {1872}{(3-x)^2}-\frac {1704}{3-x}-54 x+x^2-30 \log (x)-\frac {24 \log (x)}{(3-x)^2}+2 x \log (x)+\frac {24 x \log (x)}{3-x}+\log ^2(x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.09, size = 66, normalized size = 3.14 \begin {gather*} \frac {-31608+31266 x-7551 x^2-1320 x^3+702 x^4-66 x^5+x^6+2 (-3+x)^2 \left (-147+135 x-33 x^2+x^3\right ) \log (x)+(-3+x)^4 \log ^2(x)}{(-3+x)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.56, size = 99, normalized size = 4.71 \begin {gather*} \frac {x^{6} - 66 \, x^{5} + 702 \, x^{4} - 1320 \, x^{3} + {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )} \log \relax (x)^{2} - 7551 \, x^{2} + 2 \, {\left (x^{5} - 39 \, x^{4} + 342 \, x^{3} - 1254 \, x^{2} + 2097 \, x - 1323\right )} \log \relax (x) + 31266 \, x - 31608}{x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 \, {\left (x^{7} - 41 \, x^{6} + 453 \, x^{5} - 3093 \, x^{4} + 11211 \, x^{3} - 18387 \, x^{2} + {\left (x^{6} - 14 \, x^{5} + 111 \, x^{4} - 480 \, x^{3} + 963 \, x^{2} - 594 \, x - 243\right )} \log \relax (x) + 8703 \, x + 3969\right )}}{x^{6} - 15 \, x^{5} + 90 \, x^{4} - 270 \, x^{3} + 405 \, x^{2} - 243 \, x}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.10, size = 72, normalized size = 3.43
method | result | size |
default | \(x^{2}-54 x -\frac {98 \ln \relax (x )}{3}+\frac {144}{\left (x -3\right )^{4}}+\frac {864}{\left (x -3\right )^{3}}+\frac {1872}{\left (x -3\right )^{2}}+\frac {1704}{x -3}+2 x \ln \relax (x )+\ln \relax (x )^{2}+\frac {8 \ln \relax (x ) x \left (x -6\right )}{3 \left (x -3\right )^{2}}-\frac {24 \ln \relax (x ) x}{x -3}\) | \(72\) |
norman | \(\frac {x^{6}+x^{4} \ln \relax (x )^{2}-2998 x^{3}+1116 \ln \relax (x )+16164 x +\frac {5051 x^{4}}{6}-822 x \ln \relax (x )-\frac {284 x^{4} \ln \relax (x )}{9}+\frac {380 x^{3} \ln \relax (x )}{3}-66 x^{5}+81 \ln \relax (x )^{2}-108 x \ln \relax (x )^{2}+54 x^{2} \ln \relax (x )^{2}-12 x^{3} \ln \relax (x )^{2}+2 x^{5} \ln \relax (x )-\frac {40563}{2}}{\left (x -3\right )^{4}}-\frac {418 \ln \relax (x )}{9}\) | \(104\) |
risch | \(\ln \relax (x )^{2}+\frac {2 \left (x^{3}-6 x^{2}-27 x +96\right ) \ln \relax (x )}{x^{2}-6 x +9}-\frac {-x^{6}+54 x^{4} \ln \relax (x )+66 x^{5}-648 x^{3} \ln \relax (x )-702 x^{4}+2916 x^{2} \ln \relax (x )+1320 x^{3}-5832 x \ln \relax (x )+7551 x^{2}+4374 \ln \relax (x )-31266 x +31608}{\left (x^{2}-6 x +9\right )^{2}}\) | \(105\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.41, size = 336, normalized size = 16.00 \begin {gather*} x^{2} - 52 \, x - \frac {27 \, {\left (80 \, x^{3} - 630 \, x^{2} + 1692 \, x - 1539\right )}}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} + \frac {369 \, {\left (40 \, x^{3} - 300 \, x^{2} + 780 \, x - 693\right )}}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} - \frac {1359 \, {\left (16 \, x^{3} - 108 \, x^{2} + 264 \, x - 225\right )}}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} + \frac {3093 \, {\left (4 \, x^{3} - 18 \, x^{2} + 36 \, x - 27\right )}}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} + \frac {49 \, {\left (4 \, x^{3} - 42 \, x^{2} + 156 \, x - 225\right )}}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} - \frac {11211 \, {\left (2 \, x^{2} - 4 \, x + 3\right )}}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} - \frac {6 \, x^{3} - 3 \, {\left (x^{2} - 6 \, x + 9\right )} \log \relax (x)^{2} - 36 \, x^{2} - 2 \, {\left (3 \, x^{3} - 50 \, x^{2} + 111 \, x\right )} \log \relax (x) + 78 \, x - 72}{3 \, {\left (x^{2} - 6 \, x + 9\right )}} + \frac {6129 \, {\left (4 \, x - 3\right )}}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} - \frac {8703}{2 \, {\left (x^{4} - 12 \, x^{3} + 54 \, x^{2} - 108 \, x + 81\right )}} - \frac {98}{3} \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.12, size = 62, normalized size = 2.95 \begin {gather*} {\ln \relax (x)}^2-54\,\ln \relax (x)-\frac {x\,\left (1800\,\ln \relax (x)-35640\right )-1728\,\ln \relax (x)+x^3\,\left (72\,\ln \relax (x)-1704\right )-x^2\,\left (624\,\ln \relax (x)-13464\right )+31608}{{\left (x-3\right )}^4}+x\,\left (2\,\ln \relax (x)-54\right )+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.30, size = 76, normalized size = 3.62 \begin {gather*} x^{2} - 54 x + \frac {1704 x^{3} - 13464 x^{2} + 35640 x - 31608}{x^{4} - 12 x^{3} + 54 x^{2} - 108 x + 81} + \log {\relax (x )}^{2} - 54 \log {\relax (x )} + \frac {\left (2 x^{3} - 12 x^{2} - 54 x + 192\right ) \log {\relax (x )}}{x^{2} - 6 x + 9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________