Optimal. Leaf size=27 \[ -2-\frac {4 x \left (\frac {\log (x)}{x}+x^2 \log ^2(x)\right )}{3-x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.30, antiderivative size = 51, normalized size of antiderivative = 1.89, number of steps
used = 24, number of rules used = 15, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.283, Rules used =
{1608, 27, 6874, 36, 31, 29, 2404, 2332, 2351, 2353, 2352, 2341, 2333, 2355, 2342}
\begin {gather*} 4 x^2 \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+12 x \log ^2(x)-\frac {4 x \log (x)}{3 (3-x)}-\frac {4 \log (x)}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 29
Rule 31
Rule 36
Rule 1608
Rule 2332
Rule 2333
Rule 2341
Rule 2342
Rule 2351
Rule 2352
Rule 2353
Rule 2355
Rule 2404
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-12+4 x+\left (-4 x-24 x^3+8 x^4\right ) \log (x)+\left (-36 x^3+8 x^4\right ) \log ^2(x)}{x \left (9-6 x+x^2\right )} \, dx\\ &=\int \frac {-12+4 x+\left (-4 x-24 x^3+8 x^4\right ) \log (x)+\left (-36 x^3+8 x^4\right ) \log ^2(x)}{(-3+x)^2 x} \, dx\\ &=\int \left (\frac {4}{(-3+x) x}+\frac {4 \left (-1-6 x^2+2 x^3\right ) \log (x)}{(-3+x)^2}+\frac {4 x^2 (-9+2 x) \log ^2(x)}{(-3+x)^2}\right ) \, dx\\ &=4 \int \frac {1}{(-3+x) x} \, dx+4 \int \frac {\left (-1-6 x^2+2 x^3\right ) \log (x)}{(-3+x)^2} \, dx+4 \int \frac {x^2 (-9+2 x) \log ^2(x)}{(-3+x)^2} \, dx\\ &=\frac {4}{3} \int \frac {1}{-3+x} \, dx-\frac {4}{3} \int \frac {1}{x} \, dx+4 \int \left (6 \log (x)-\frac {\log (x)}{(-3+x)^2}+\frac {18 \log (x)}{-3+x}+2 x \log (x)\right ) \, dx+4 \int \left (3 \log ^2(x)-\frac {27 \log ^2(x)}{(-3+x)^2}+2 x \log ^2(x)\right ) \, dx\\ &=\frac {4}{3} \log (3-x)-\frac {4 \log (x)}{3}-4 \int \frac {\log (x)}{(-3+x)^2} \, dx+8 \int x \log (x) \, dx+8 \int x \log ^2(x) \, dx+12 \int \log ^2(x) \, dx+24 \int \log (x) \, dx+72 \int \frac {\log (x)}{-3+x} \, dx-108 \int \frac {\log ^2(x)}{(-3+x)^2} \, dx\\ &=-24 x-2 x^2+\frac {4}{3} \log (3-x)+72 \log (3) \log (-3+x)-\frac {4 \log (x)}{3}+24 x \log (x)-\frac {4 x \log (x)}{3 (3-x)}+4 x^2 \log (x)+12 x \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+4 x^2 \log ^2(x)-\frac {4}{3} \int \frac {1}{-3+x} \, dx-8 \int x \log (x) \, dx-24 \int \log (x) \, dx+72 \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx-72 \int \frac {\log (x)}{-3+x} \, dx\\ &=-\frac {4 \log (x)}{3}-\frac {4 x \log (x)}{3 (3-x)}+12 x \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+4 x^2 \log ^2(x)-72 \text {Li}_2\left (1-\frac {x}{3}\right )-72 \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx\\ &=-\frac {4 \log (x)}{3}-\frac {4 x \log (x)}{3 (3-x)}+12 x \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+4 x^2 \log ^2(x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 17, normalized size = 0.63 \begin {gather*} \frac {4 \log (x) \left (1+x^3 \log (x)\right )}{-3+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.40, size = 21, normalized size = 0.78
method | result | size |
norman | \(\frac {4 \ln \left (x \right )+4 x^{3} \ln \left (x \right )^{2}}{x -3}\) | \(21\) |
risch | \(\frac {4 x^{3} \ln \left (x \right )^{2}}{x -3}+\frac {4 \ln \left (x \right )}{x -3}\) | \(25\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 24, normalized size = 0.89 \begin {gather*} \frac {4 \, x^{3} \log \left (x\right )^{2}}{x - 3} + \frac {4 \, \log \left (x\right )}{x - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 18, normalized size = 0.67 \begin {gather*} \frac {4 \, {\left (x^{3} \log \left (x\right )^{2} + \log \left (x\right )\right )}}{x - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.13, size = 20, normalized size = 0.74 \begin {gather*} \frac {4 x^{3} \log {\left (x \right )}^{2}}{x - 3} + \frac {4 \log {\left (x \right )}}{x - 3} \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*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.43, size = 17, normalized size = 0.63 \begin {gather*} \frac {4\,\ln \left (x\right )\,\left (x^3\,\ln \left (x\right )+1\right )}{x-3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________