Optimal. Leaf size=21 \[ \frac {35 \left (\frac {1}{x}-\log \left ((3-x)^2\right )\right )^2}{x} \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(49\) vs. \(2(21)=42\).
time = 0.26, antiderivative size = 49, normalized size of antiderivative = 2.33, number of steps
used = 17, number of rules used = 11, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.159, Rules used = {1607, 6874,
907, 2465, 2437, 2338, 2442, 46, 2441, 2352, 2444} \begin {gather*} \frac {35}{x^3}-\frac {70 \log \left ((x-3)^2\right )}{x^2}+\frac {35 (3-x) \log ^2\left ((x-3)^2\right )}{3 x}+\frac {35}{3} \log ^2\left ((x-3)^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 907
Rule 1607
Rule 2338
Rule 2352
Rule 2437
Rule 2441
Rule 2442
Rule 2444
Rule 2465
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {315-105 x-140 x^2+\left (-420 x+140 x^2+140 x^3\right ) \log \left (9-6 x+x^2\right )+\left (105 x^2-35 x^3\right ) \log ^2\left (9-6 x+x^2\right )}{(-3+x) x^4} \, dx\\ &=\int \left (-\frac {35 \left (-9+3 x+4 x^2\right )}{(-3+x) x^4}+\frac {140 \left (-3+x+x^2\right ) \log \left ((-3+x)^2\right )}{(-3+x) x^3}-\frac {35 \log ^2\left ((-3+x)^2\right )}{x^2}\right ) \, dx\\ &=-\left (35 \int \frac {-9+3 x+4 x^2}{(-3+x) x^4} \, dx\right )-35 \int \frac {\log ^2\left ((-3+x)^2\right )}{x^2} \, dx+140 \int \frac {\left (-3+x+x^2\right ) \log \left ((-3+x)^2\right )}{(-3+x) x^3} \, dx\\ &=\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}-35 \int \left (\frac {4}{9 (-3+x)}+\frac {3}{x^4}-\frac {4}{3 x^2}-\frac {4}{9 x}\right ) \, dx+\frac {140}{3} \int \frac {\log \left ((-3+x)^2\right )}{x} \, dx+140 \int \left (\frac {\log \left ((-3+x)^2\right )}{3 (-3+x)}+\frac {\log \left ((-3+x)^2\right )}{x^3}-\frac {\log \left ((-3+x)^2\right )}{3 x}\right ) \, dx\\ &=\frac {35}{x^3}-\frac {140}{3 x}-\frac {140}{9} \log (3-x)+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}+\frac {140}{3} \log \left ((-3+x)^2\right ) \log \left (\frac {x}{3}\right )+\frac {140 \log (x)}{9}+\frac {140}{3} \int \frac {\log \left ((-3+x)^2\right )}{-3+x} \, dx-\frac {140}{3} \int \frac {\log \left ((-3+x)^2\right )}{x} \, dx-\frac {280}{3} \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx+140 \int \frac {\log \left ((-3+x)^2\right )}{x^3} \, dx\\ &=\frac {35}{x^3}-\frac {140}{3 x}-\frac {140}{9} \log (3-x)-\frac {70 \log \left ((-3+x)^2\right )}{x^2}+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}+\frac {140 \log (x)}{9}+\frac {280}{3} \text {Li}_2\left (1-\frac {x}{3}\right )+\frac {140}{3} \text {Subst}\left (\int \frac {\log \left (x^2\right )}{x} \, dx,x,-3+x\right )+\frac {280}{3} \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx+140 \int \frac {1}{(-3+x) x^2} \, dx\\ &=\frac {35}{x^3}-\frac {140}{3 x}-\frac {140}{9} \log (3-x)-\frac {70 \log \left ((-3+x)^2\right )}{x^2}+\frac {35}{3} \log ^2\left ((-3+x)^2\right )+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}+\frac {140 \log (x)}{9}+140 \int \left (\frac {1}{9 (-3+x)}-\frac {1}{3 x^2}-\frac {1}{9 x}\right ) \, dx\\ &=\frac {35}{x^3}-\frac {70 \log \left ((-3+x)^2\right )}{x^2}+\frac {35}{3} \log ^2\left ((-3+x)^2\right )+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 32, normalized size = 1.52 \begin {gather*} -35 \left (-\frac {1}{x^3}+\frac {2 \log \left ((-3+x)^2\right )}{x^2}-\frac {\log ^2\left ((-3+x)^2\right )}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 35, normalized size = 1.67
method | result | size |
norman | \(\frac {35-70 \ln \left (x^{2}-6 x +9\right ) x +35 \ln \left (x^{2}-6 x +9\right )^{2} x^{2}}{x^{3}}\) | \(35\) |
risch | \(\frac {35 \ln \left (x^{2}-6 x +9\right )^{2}}{x}-\frac {70 \ln \left (x^{2}-6 x +9\right )}{x^{2}}+\frac {35}{x^{3}}\) | \(37\) |
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. 65 vs.
\(2 (19) = 38\).
time = 0.29, size = 65, normalized size = 3.10 \begin {gather*} \frac {140 \, {\left (9 \, x \log \left (x - 3\right )^{2} + {\left (x^{2} - 9\right )} \log \left (x - 3\right ) + 3 \, x\right )}}{9 \, x^{2}} - \frac {35 \, {\left (2 \, x + 3\right )}}{6 \, x^{2}} - \frac {140}{3 \, x} + \frac {35 \, {\left (2 \, x^{2} + 3 \, x + 6\right )}}{6 \, x^{3}} - \frac {140}{9} \, \log \left (x - 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 34, normalized size = 1.62 \begin {gather*} \frac {35 \, {\left (x^{2} \log \left (x^{2} - 6 \, x + 9\right )^{2} - 2 \, x \log \left (x^{2} - 6 \, x + 9\right ) + 1\right )}}{x^{3}} \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. 34 vs.
\(2 (14) = 28\).
time = 0.08, size = 34, normalized size = 1.62 \begin {gather*} \frac {35 \log {\left (x^{2} - 6 x + 9 \right )}^{2}}{x} - \frac {70 \log {\left (x^{2} - 6 x + 9 \right )}}{x^{2}} + \frac {35}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 36, normalized size = 1.71 \begin {gather*} \frac {35 \, \log \left (x^{2} - 6 \, x + 9\right )^{2}}{x} - \frac {70 \, \log \left (x^{2} - 6 \, x + 9\right )}{x^{2}} + \frac {35}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.11, size = 20, normalized size = 0.95 \begin {gather*} \frac {35\,{\left (x\,\ln \left (x^2-6\,x+9\right )-1\right )}^2}{x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________