Optimal. Leaf size=29 \[ x+\frac {5 (1+x-\log (x))^2}{x \left (5+\frac {5 \log (3)}{3 x}\right )} \]
________________________________________________________________________________________
Rubi [C] time = 0.76, antiderivative size = 263, normalized size of antiderivative = 9.07, number of steps used = 21, number of rules used = 13, integrand size = 74, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {6, 1594, 27, 6742, 43, 894, 2357, 2301, 2314, 31, 2317, 2391, 2318} \begin {gather*} -\frac {18 \text {Li}_2\left (-\frac {x \log (27)}{\log ^2(3)}\right )}{\log (27)}+\frac {6 \text {Li}_2\left (-\frac {3 x}{\log (3)}\right )}{\log (3)}+2 x-\frac {9 x \log ^2(x)}{\log (3) (3 x+\log (3))}+\frac {3 \log ^2(x)}{\log (3)}-\frac {18 \log \left (\frac {x \log (27)}{\log ^2(3)}+1\right ) \log (x)}{\log (27)}+\frac {2}{3} \left (2+\frac {9}{\log ^2(3)}\right ) \log (3) \log (3 x+\log (3))-\frac {2 \log ^2(3)}{3 (3 x+\log (3))}+\frac {27-\log ^2(3)}{3 (3 x+\log (3))}-\frac {2 \left (9-2 \log ^2(3)\right )}{3 (3 x+\log (3))}+\frac {6 \log \left (\frac {3 x}{\log (3)}+1\right ) \log (x)}{\log (3)}+\frac {6 x (3-\log (3)) \log (x)}{\log (3) (3 x+\log (3))}-\frac {6 \log (x)}{\log (3)}-\frac {4}{3} \log (3) \log (3 x+\log (3))-\frac {2 (3-\log (3)) \log (3 x+\log (3))}{\log (3)}-2 \log (9 x+\log (27))-\frac {2 \log (3)}{3 x+\log (3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 27
Rule 31
Rule 43
Rule 894
Rule 1594
Rule 2301
Rule 2314
Rule 2317
Rule 2318
Rule 2357
Rule 2391
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-18 x^2+18 x^3+\left (-6+12 x^2\right ) \log (3)+x \left (-27+\log ^2(3)\right )+(36 x+(6-6 x) \log (3)) \log (x)-9 x \log ^2(x)}{9 x^3+6 x^2 \log (3)+x \log ^2(3)} \, dx\\ &=\int \frac {-18 x^2+18 x^3+\left (-6+12 x^2\right ) \log (3)+x \left (-27+\log ^2(3)\right )+(36 x+(6-6 x) \log (3)) \log (x)-9 x \log ^2(x)}{x \left (9 x^2+6 x \log (3)+\log ^2(3)\right )} \, dx\\ &=\int \frac {-18 x^2+18 x^3+\left (-6+12 x^2\right ) \log (3)+x \left (-27+\log ^2(3)\right )+(36 x+(6-6 x) \log (3)) \log (x)-9 x \log ^2(x)}{x (3 x+\log (3))^2} \, dx\\ &=\int \left (-\frac {18 x}{(3 x+\log (3))^2}+\frac {18 x^2}{(3 x+\log (3))^2}+\frac {6 \left (-1+2 x^2\right ) \log (3)}{x (3 x+\log (3))^2}+\frac {-27+\log ^2(3)}{(3 x+\log (3))^2}+\frac {6 (x (6-\log (3))+\log (3)) \log (x)}{x (3 x+\log (3))^2}-\frac {9 \log ^2(x)}{(3 x+\log (3))^2}\right ) \, dx\\ &=\frac {27-\log ^2(3)}{3 (3 x+\log (3))}+6 \int \frac {(x (6-\log (3))+\log (3)) \log (x)}{x (3 x+\log (3))^2} \, dx-9 \int \frac {\log ^2(x)}{(3 x+\log (3))^2} \, dx-18 \int \frac {x}{(3 x+\log (3))^2} \, dx+18 \int \frac {x^2}{(3 x+\log (3))^2} \, dx+(6 \log (3)) \int \frac {-1+2 x^2}{x (3 x+\log (3))^2} \, dx\\ &=\frac {27-\log ^2(3)}{3 (3 x+\log (3))}-\frac {9 x \log ^2(x)}{\log (3) (3 x+\log (3))}+6 \int \left (\frac {\log (x)}{x \log (3)}+\frac {(3-\log (3)) \log (x)}{(3 x+\log (3))^2}-\frac {3 \log (x)}{\log ^2(3)+x \log (27)}\right ) \, dx+18 \int \left (\frac {1}{9}+\frac {\log ^2(3)}{9 (3 x+\log (3))^2}-\frac {2 \log (3)}{9 (3 x+\log (3))}\right ) \, dx-18 \int \left (-\frac {\log (3)}{3 (3 x+\log (3))^2}+\frac {1}{9 x+\log (27)}\right ) \, dx+\frac {18 \int \frac {\log (x)}{3 x+\log (3)} \, dx}{\log (3)}+(6 \log (3)) \int \left (-\frac {1}{x \log ^2(3)}+\frac {9-2 \log ^2(3)}{3 \log (3) (3 x+\log (3))^2}+\frac {9+2 \log ^2(3)}{3 \log ^2(3) (3 x+\log (3))}\right ) \, dx\\ &=2 x-\frac {2 \log (3)}{3 x+\log (3)}-\frac {2 \log ^2(3)}{3 (3 x+\log (3))}-\frac {2 \left (9-2 \log ^2(3)\right )}{3 (3 x+\log (3))}+\frac {27-\log ^2(3)}{3 (3 x+\log (3))}-\frac {6 \log (x)}{\log (3)}-\frac {9 x \log ^2(x)}{\log (3) (3 x+\log (3))}+\frac {6 \log (x) \log \left (1+\frac {3 x}{\log (3)}\right )}{\log (3)}-\frac {4}{3} \log (3) \log (3 x+\log (3))+\frac {2}{3} \left (2+\frac {9}{\log ^2(3)}\right ) \log (3) \log (3 x+\log (3))-2 \log (9 x+\log (27))-18 \int \frac {\log (x)}{\log ^2(3)+x \log (27)} \, dx+(6 (3-\log (3))) \int \frac {\log (x)}{(3 x+\log (3))^2} \, dx+\frac {6 \int \frac {\log (x)}{x} \, dx}{\log (3)}-\frac {6 \int \frac {\log \left (1+\frac {3 x}{\log (3)}\right )}{x} \, dx}{\log (3)}\\ &=2 x-\frac {2 \log (3)}{3 x+\log (3)}-\frac {2 \log ^2(3)}{3 (3 x+\log (3))}-\frac {2 \left (9-2 \log ^2(3)\right )}{3 (3 x+\log (3))}+\frac {27-\log ^2(3)}{3 (3 x+\log (3))}-\frac {6 \log (x)}{\log (3)}+\frac {6 x (3-\log (3)) \log (x)}{\log (3) (3 x+\log (3))}+\frac {3 \log ^2(x)}{\log (3)}-\frac {9 x \log ^2(x)}{\log (3) (3 x+\log (3))}+\frac {6 \log (x) \log \left (1+\frac {3 x}{\log (3)}\right )}{\log (3)}-\frac {4}{3} \log (3) \log (3 x+\log (3))+\frac {2}{3} \left (2+\frac {9}{\log ^2(3)}\right ) \log (3) \log (3 x+\log (3))-2 \log (9 x+\log (27))-\frac {18 \log (x) \log \left (1+\frac {x \log (27)}{\log ^2(3)}\right )}{\log (27)}+\frac {6 \text {Li}_2\left (-\frac {3 x}{\log (3)}\right )}{\log (3)}-\frac {(6 (3-\log (3))) \int \frac {1}{3 x+\log (3)} \, dx}{\log (3)}+\frac {18 \int \frac {\log \left (1+\frac {x \log (27)}{\log ^2(3)}\right )}{x} \, dx}{\log (27)}\\ &=2 x-\frac {2 \log (3)}{3 x+\log (3)}-\frac {2 \log ^2(3)}{3 (3 x+\log (3))}-\frac {2 \left (9-2 \log ^2(3)\right )}{3 (3 x+\log (3))}+\frac {27-\log ^2(3)}{3 (3 x+\log (3))}-\frac {6 \log (x)}{\log (3)}+\frac {6 x (3-\log (3)) \log (x)}{\log (3) (3 x+\log (3))}+\frac {3 \log ^2(x)}{\log (3)}-\frac {9 x \log ^2(x)}{\log (3) (3 x+\log (3))}+\frac {6 \log (x) \log \left (1+\frac {3 x}{\log (3)}\right )}{\log (3)}-\frac {2 (3-\log (3)) \log (3 x+\log (3))}{\log (3)}-\frac {4}{3} \log (3) \log (3 x+\log (3))+\frac {2}{3} \left (2+\frac {9}{\log ^2(3)}\right ) \log (3) \log (3 x+\log (3))-2 \log (9 x+\log (27))-\frac {18 \log (x) \log \left (1+\frac {x \log (27)}{\log ^2(3)}\right )}{\log (27)}+\frac {6 \text {Li}_2\left (-\frac {3 x}{\log (3)}\right )}{\log (3)}-\frac {18 \text {Li}_2\left (-\frac {x \log (27)}{\log ^2(3)}\right )}{\log (27)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 0.47, size = 194, normalized size = 6.69 \begin {gather*} 2 x-\frac {-3+\log ^2(3)+\log (9)-\frac {\log ^3(9)}{\log (729)}}{3 x+\log (3)}+\frac {3 (-1+\log (x))^2}{\log (3)}+\frac {2 (-3+\log (3)) \log (x)}{3 x+\log (3)}+\frac {3 \log ^2(x)}{3 x+\log (3)}-\frac {2 \left (-9+2 \log ^2(3)-\log (3) \log (9)+\log (27)+9 \log (x)\right ) \log \left (1+\frac {3 x}{\log (3)}\right )}{\log (27)}-\frac {2 (-3+\log (3)) (\log (x)-\log (3 x+\log (3)))}{\log (3)}+3 \log (x) \left (-\frac {\log (x)}{\log (3)}+\frac {6 \log \left (1+\frac {x \log (27)}{\log ^2(3)}\right )}{\log (27)}\right )-\frac {6 \text {Li}_2\left (-\frac {3 x}{\log (3)}\right )}{\log (3)}+\frac {18 \text {Li}_2\left (-\frac {x \log (27)}{\log ^2(3)}\right )}{\log (27)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.09, size = 41, normalized size = 1.41 \begin {gather*} \frac {18 \, x^{2} + 6 \, {\left (x - 1\right )} \log \relax (3) + \log \relax (3)^{2} - 18 \, {\left (x + 1\right )} \log \relax (x) + 9 \, \log \relax (x)^{2} + 9}{3 \, {\left (3 \, x + \log \relax (3)\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.27, size = 58, normalized size = 2.00 \begin {gather*} 2 \, x + \frac {2 \, {\left (\log \relax (3) - 3\right )} \log \relax (x)}{3 \, x + \log \relax (3)} + \frac {3 \, \log \relax (x)^{2}}{3 \, x + \log \relax (3)} + \frac {\log \relax (3)^{2} - 6 \, \log \relax (3) + 9}{3 \, {\left (3 \, x + \log \relax (3)\right )}} - 2 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.15, size = 42, normalized size = 1.45
method | result | size |
norman | \(\frac {-6 \ln \relax (x )-6 x \ln \relax (x )+6 x^{2}+3 \ln \relax (x )^{2}-\frac {\ln \relax (3)^{2}}{3}+3-2 \ln \relax (3)}{\ln \relax (3)+3 x}\) | \(42\) |
risch | \(\frac {3 \ln \relax (x )^{2}}{\ln \relax (3)+3 x}+\frac {2 \left (\ln \relax (3)-3\right ) \ln \relax (x )}{\ln \relax (3)+3 x}-\frac {6 \ln \relax (3) \ln \relax (x )+18 x \ln \relax (x )-\ln \relax (3)^{2}-6 x \ln \relax (3)-18 x^{2}+6 \ln \relax (3)-9}{3 \left (\ln \relax (3)+3 x \right )}\) | \(75\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.83, size = 173, normalized size = 5.97 \begin {gather*} \frac {4}{3} \, {\left (\frac {\log \relax (3)}{3 \, x + \log \relax (3)} + \log \left (3 \, x + \log \relax (3)\right )\right )} \log \relax (3) - 6 \, {\left (\frac {1}{3 \, x \log \relax (3) + \log \relax (3)^{2}} - \frac {\log \left (3 \, x + \log \relax (3)\right )}{\log \relax (3)^{2}} + \frac {\log \relax (x)}{\log \relax (3)^{2}}\right )} \log \relax (3) - \frac {4}{3} \, \log \relax (3) \log \left (3 \, x + \log \relax (3)\right ) + 2 \, x - \frac {\log \relax (3)^{2}}{3 \, x + \log \relax (3)} + \frac {2 \, {\left (\log \relax (3) - 3\right )} \log \left (3 \, x + \log \relax (3)\right )}{\log \relax (3)} - \frac {2 \, {\left (\log \relax (3) - 3\right )} \log \relax (x)}{\log \relax (3)} + \frac {2 \, {\left (\log \relax (3) - 3\right )} \log \relax (x) + 3 \, \log \relax (x)^{2}}{3 \, x + \log \relax (3)} - \frac {2 \, \log \relax (3)}{3 \, x + \log \relax (3)} + \frac {9}{3 \, x + \log \relax (3)} - 2 \, \log \left (3 \, x + \log \relax (3)\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.92, size = 40, normalized size = 1.38 \begin {gather*} \frac {6\,x\,\ln \relax (3)-6\,\ln \relax (3)\,\ln \relax (x)}{3\,\ln \relax (3)}+\frac {{\left (\ln \relax (3)+3\,\ln \relax (x)-3\right )}^2}{3\,\left (3\,x+\ln \relax (3)\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.47, size = 58, normalized size = 2.00 \begin {gather*} 2 x - 2 \log {\relax (x )} + \frac {- 6 \log {\relax (3 )} + \log {\relax (3 )}^{2} + 9}{9 x + 3 \log {\relax (3 )}} + \frac {3 \log {\relax (x )}^{2}}{3 x + \log {\relax (3 )}} + \frac {\left (-6 + 2 \log {\relax (3 )}\right ) \log {\relax (x )}}{3 x + \log {\relax (3 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________