Optimal. Leaf size=22 \[ x-\left (\frac {5}{3}-\frac {5}{(-3-x)^2}\right ) (-5+x+\log (x)) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(47\) vs. \(2(22)=44\).
time = 0.23, antiderivative size = 47, normalized size of antiderivative = 2.14, number of steps
used = 14, number of rules used = 7, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {6820, 12,
6874, 46, 37, 45, 2356} \begin {gather*} -\frac {19 x^2}{3 (x+3)^2}-\frac {2 x}{3}-\frac {33}{x+3}+\frac {17}{(x+3)^2}+\frac {5 \log (x)}{(x+3)^2}-\frac {5 \log (x)}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 37
Rule 45
Rule 46
Rule 2356
Rule 6820
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-90+21 x-114 x^2-23 x^3-2 x^4-30 x \log (x)}{3 x (3+x)^3} \, dx\\ &=\frac {1}{3} \int \frac {-90+21 x-114 x^2-23 x^3-2 x^4-30 x \log (x)}{x (3+x)^3} \, dx\\ &=\frac {1}{3} \int \left (\frac {21}{(3+x)^3}-\frac {90}{x (3+x)^3}-\frac {114 x}{(3+x)^3}-\frac {23 x^2}{(3+x)^3}-\frac {2 x^3}{(3+x)^3}-\frac {30 \log (x)}{(3+x)^3}\right ) \, dx\\ &=-\frac {7}{2 (3+x)^2}-\frac {2}{3} \int \frac {x^3}{(3+x)^3} \, dx-\frac {23}{3} \int \frac {x^2}{(3+x)^3} \, dx-10 \int \frac {\log (x)}{(3+x)^3} \, dx-30 \int \frac {1}{x (3+x)^3} \, dx-38 \int \frac {x}{(3+x)^3} \, dx\\ &=-\frac {7}{2 (3+x)^2}-\frac {19 x^2}{3 (3+x)^2}+\frac {5 \log (x)}{(3+x)^2}-\frac {2}{3} \int \left (1-\frac {27}{(3+x)^3}+\frac {27}{(3+x)^2}-\frac {9}{3+x}\right ) \, dx-5 \int \frac {1}{x (3+x)^2} \, dx-\frac {23}{3} \int \left (\frac {9}{(3+x)^3}-\frac {6}{(3+x)^2}+\frac {1}{3+x}\right ) \, dx-30 \int \left (\frac {1}{27 x}-\frac {1}{3 (3+x)^3}-\frac {1}{9 (3+x)^2}-\frac {1}{27 (3+x)}\right ) \, dx\\ &=-\frac {2 x}{3}+\frac {17}{(3+x)^2}-\frac {19 x^2}{3 (3+x)^2}-\frac {94}{3 (3+x)}-\frac {10 \log (x)}{9}+\frac {5 \log (x)}{(3+x)^2}-\frac {5}{9} \log (3+x)-5 \int \left (\frac {1}{9 x}-\frac {1}{3 (3+x)^2}-\frac {1}{9 (3+x)}\right ) \, dx\\ &=-\frac {2 x}{3}+\frac {17}{(3+x)^2}-\frac {19 x^2}{3 (3+x)^2}-\frac {33}{3+x}-\frac {5 \log (x)}{3}+\frac {5 \log (x)}{(3+x)^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 35, normalized size = 1.59 \begin {gather*} \frac {1}{3} \left (-2 x-\frac {120}{(3+x)^2}+\frac {15}{3+x}-5 \log (x)+\frac {15 \log (x)}{(3+x)^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 36, normalized size = 1.64
method | result | size |
norman | \(\frac {-10 \ln \left (x \right )+23 x -10 x \ln \left (x \right )-\frac {5 x^{2} \ln \left (x \right )}{3}-\frac {2 x^{3}}{3}+11}{\left (3+x \right )^{2}}\) | \(33\) |
default | \(\frac {5}{3+x}-\frac {5 \ln \left (x \right ) x \left (x +6\right )}{9 \left (3+x \right )^{2}}-\frac {2 x}{3}-\frac {10 \ln \left (x \right )}{9}-\frac {40}{\left (3+x \right )^{2}}\) | \(36\) |
risch | \(\frac {5 \ln \left (x \right )}{x^{2}+6 x +9}-\frac {5 x^{2} \ln \left (x \right )+2 x^{3}+30 x \ln \left (x \right )+12 x^{2}+45 \ln \left (x \right )+3 x +75}{3 \left (x^{2}+6 x +9\right )}\) | \(59\) |
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. 109 vs.
\(2 (18) = 36\).
time = 0.28, size = 109, normalized size = 4.95 \begin {gather*} -\frac {2}{3} \, x - \frac {23 \, {\left (4 \, x + 9\right )}}{2 \, {\left (x^{2} + 6 \, x + 9\right )}} - \frac {5 \, {\left (2 \, x + 9\right )}}{3 \, {\left (x^{2} + 6 \, x + 9\right )}} + \frac {9 \, {\left (2 \, x + 5\right )}}{x^{2} + 6 \, x + 9} + \frac {19 \, {\left (2 \, x + 3\right )}}{x^{2} + 6 \, x + 9} + \frac {5 \, \log \left (x\right )}{x^{2} + 6 \, x + 9} - \frac {7}{2 \, {\left (x^{2} + 6 \, x + 9\right )}} - \frac {5}{3 \, {\left (x + 3\right )}} - \frac {5}{3} \, \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 39 vs.
\(2 (18) = 36\).
time = 0.36, size = 39, normalized size = 1.77 \begin {gather*} -\frac {2 \, x^{3} + 12 \, x^{2} + 5 \, {\left (x^{2} + 6 \, x + 6\right )} \log \left (x\right ) + 3 \, x + 75}{3 \, {\left (x^{2} + 6 \, x + 9\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 37, normalized size = 1.68 \begin {gather*} - \frac {2 x}{3} - \frac {25 - 5 x}{x^{2} + 6 x + 9} - \frac {5 \log {\left (x \right )}}{3} + \frac {5 \log {\left (x \right )}}{x^{2} + 6 x + 9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 37 vs.
\(2 (18) = 36\).
time = 0.39, size = 37, normalized size = 1.68 \begin {gather*} -\frac {2}{3} \, x + \frac {5 \, {\left (x - 5\right )}}{x^{2} + 6 \, x + 9} + \frac {5 \, \log \left (x\right )}{x^{2} + 6 \, x + 9} - \frac {5}{3} \, \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.75, size = 23, normalized size = 1.05 \begin {gather*} \frac {5\,x+5\,\ln \left (x\right )-25}{{\left (x+3\right )}^2}-\frac {5\,\ln \left (x\right )}{3}-\frac {2\,x}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________