Optimal. Leaf size=28 \[ \frac {3 (2+x)+\frac {5+x-4 \log (x)}{x}+\log (x)}{x (3+x)} \]
________________________________________________________________________________________
Rubi [B] time = 0.40, antiderivative size = 60, normalized size of antiderivative = 2.14, number of steps used = 16, number of rules used = 8, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {1594, 27, 6742, 44, 2357, 2304, 2314, 31} \begin {gather*} \frac {5}{3 x^2}-\frac {4 \log (x)}{3 x^2}+\frac {16}{9 x}+\frac {11}{9 (x+3)}+\frac {7 \log (x)}{9 x}+\frac {7 x \log (x)}{27 (x+3)}-\frac {7 \log (x)}{27} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 31
Rule 44
Rule 1594
Rule 2304
Rule 2314
Rule 2357
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-42-37 x-13 x^2-3 x^3+\left (24+9 x-2 x^2\right ) \log (x)}{x^3 \left (9+6 x+x^2\right )} \, dx\\ &=\int \frac {-42-37 x-13 x^2-3 x^3+\left (24+9 x-2 x^2\right ) \log (x)}{x^3 (3+x)^2} \, dx\\ &=\int \left (-\frac {3}{(3+x)^2}-\frac {42}{x^3 (3+x)^2}-\frac {37}{x^2 (3+x)^2}-\frac {13}{x (3+x)^2}-\frac {\left (-24-9 x+2 x^2\right ) \log (x)}{x^3 (3+x)^2}\right ) \, dx\\ &=\frac {3}{3+x}-13 \int \frac {1}{x (3+x)^2} \, dx-37 \int \frac {1}{x^2 (3+x)^2} \, dx-42 \int \frac {1}{x^3 (3+x)^2} \, dx-\int \frac {\left (-24-9 x+2 x^2\right ) \log (x)}{x^3 (3+x)^2} \, dx\\ &=\frac {3}{3+x}-13 \int \left (\frac {1}{9 x}-\frac {1}{3 (3+x)^2}-\frac {1}{9 (3+x)}\right ) \, dx-37 \int \left (\frac {1}{9 x^2}-\frac {2}{27 x}+\frac {1}{9 (3+x)^2}+\frac {2}{27 (3+x)}\right ) \, dx-42 \int \left (\frac {1}{9 x^3}-\frac {2}{27 x^2}+\frac {1}{27 x}-\frac {1}{27 (3+x)^2}-\frac {1}{27 (3+x)}\right ) \, dx-\int \left (-\frac {8 \log (x)}{3 x^3}+\frac {7 \log (x)}{9 x^2}-\frac {7 \log (x)}{9 (3+x)^2}\right ) \, dx\\ &=\frac {7}{3 x^2}+\frac {1}{x}+\frac {11}{9 (3+x)}-\frac {7 \log (x)}{27}+\frac {7}{27} \log (3+x)-\frac {7}{9} \int \frac {\log (x)}{x^2} \, dx+\frac {7}{9} \int \frac {\log (x)}{(3+x)^2} \, dx+\frac {8}{3} \int \frac {\log (x)}{x^3} \, dx\\ &=\frac {5}{3 x^2}+\frac {16}{9 x}+\frac {11}{9 (3+x)}-\frac {7 \log (x)}{27}-\frac {4 \log (x)}{3 x^2}+\frac {7 \log (x)}{9 x}+\frac {7 x \log (x)}{27 (3+x)}+\frac {7}{27} \log (3+x)-\frac {7}{27} \int \frac {1}{3+x} \, dx\\ &=\frac {5}{3 x^2}+\frac {16}{9 x}+\frac {11}{9 (3+x)}-\frac {7 \log (x)}{27}-\frac {4 \log (x)}{3 x^2}+\frac {7 \log (x)}{9 x}+\frac {7 x \log (x)}{27 (3+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 25, normalized size = 0.89 \begin {gather*} \frac {5+7 x+3 x^2+(-4+x) \log (x)}{x^2 (3+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.84, size = 28, normalized size = 1.00 \begin {gather*} \frac {3 \, x^{2} + {\left (x - 4\right )} \log \relax (x) + 7 \, x + 5}{x^{3} + 3 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.50, size = 40, normalized size = 1.43 \begin {gather*} -\frac {1}{9} \, {\left (\frac {7}{x + 3} - \frac {7 \, x - 12}{x^{2}}\right )} \log \relax (x) + \frac {11}{9 \, {\left (x + 3\right )}} + \frac {16 \, x + 15}{9 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 28, normalized size = 1.00
method | result | size |
norman | \(\frac {5+x \ln \relax (x )+3 x^{2}+7 x -4 \ln \relax (x )}{x^{2} \left (3+x \right )}\) | \(28\) |
risch | \(\frac {\left (x -4\right ) \ln \relax (x )}{x^{2} \left (3+x \right )}+\frac {3 x^{2}+7 x +5}{x^{2} \left (3+x \right )}\) | \(35\) |
default | \(\frac {11}{9 \left (3+x \right )}+\frac {16}{9 x}+\frac {5}{3 x^{2}}-\frac {7 \ln \relax (x )}{27}+\frac {7 \ln \relax (x )}{9 x}-\frac {4 \ln \relax (x )}{3 x^{2}}+\frac {7 \ln \relax (x ) x}{27 \left (3+x \right )}\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.48, size = 92, normalized size = 3.29 \begin {gather*} \frac {21 \, x^{2} + {\left (7 \, x^{3} + 21 \, x^{2} + 27 \, x - 108\right )} \log \relax (x) + 45 \, x - 54}{27 \, {\left (x^{3} + 3 \, x^{2}\right )}} - \frac {7 \, {\left (2 \, x^{2} + 3 \, x - 3\right )}}{3 \, {\left (x^{3} + 3 \, x^{2}\right )}} + \frac {37 \, {\left (2 \, x + 3\right )}}{9 \, {\left (x^{2} + 3 \, x\right )}} - \frac {4}{3 \, {\left (x + 3\right )}} - \frac {7}{27} \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.94, size = 26, normalized size = 0.93 \begin {gather*} \frac {x\,\left (\ln \relax (x)+7\right )-4\,\ln \relax (x)+3\,x^2+5}{x^2\,\left (x+3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.19, size = 34, normalized size = 1.21 \begin {gather*} \frac {\left (x - 4\right ) \log {\relax (x )}}{x^{3} + 3 x^{2}} - \frac {- 3 x^{2} - 7 x - 5}{x^{3} + 3 x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________