Optimal. Leaf size=28 \[ x^2-x \left (-\frac {x^2 \log (x)}{3 (3+x)}-\log \left (x^2\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.23, antiderivative size = 34, normalized size of antiderivative = 1.21, number of steps used = 17, number of rules used = 9, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {27, 12, 6742, 43, 2357, 2295, 2304, 2314, 31} \begin {gather*} x^2+\frac {1}{3} x^2 \log (x)+x \log \left (x^2\right )+\frac {3 x \log (x)}{x+3}-x \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 27
Rule 31
Rule 43
Rule 2295
Rule 2304
Rule 2314
Rule 2357
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {54+90 x+45 x^2+7 x^3+\left (9 x^2+2 x^3\right ) \log (x)+\left (27+18 x+3 x^2\right ) \log \left (x^2\right )}{3 (3+x)^2} \, dx\\ &=\frac {1}{3} \int \frac {54+90 x+45 x^2+7 x^3+\left (9 x^2+2 x^3\right ) \log (x)+\left (27+18 x+3 x^2\right ) \log \left (x^2\right )}{(3+x)^2} \, dx\\ &=\frac {1}{3} \int \left (\frac {54}{(3+x)^2}+\frac {90 x}{(3+x)^2}+\frac {45 x^2}{(3+x)^2}+\frac {7 x^3}{(3+x)^2}+\frac {x^2 (9+2 x) \log (x)}{(3+x)^2}+3 \log \left (x^2\right )\right ) \, dx\\ &=-\frac {18}{3+x}+\frac {1}{3} \int \frac {x^2 (9+2 x) \log (x)}{(3+x)^2} \, dx+\frac {7}{3} \int \frac {x^3}{(3+x)^2} \, dx+15 \int \frac {x^2}{(3+x)^2} \, dx+30 \int \frac {x}{(3+x)^2} \, dx+\int \log \left (x^2\right ) \, dx\\ &=-2 x-\frac {18}{3+x}+x \log \left (x^2\right )+\frac {1}{3} \int \left (-3 \log (x)+2 x \log (x)+\frac {27 \log (x)}{(3+x)^2}\right ) \, dx+\frac {7}{3} \int \left (-6+x-\frac {27}{(3+x)^2}+\frac {27}{3+x}\right ) \, dx+15 \int \left (1+\frac {9}{(3+x)^2}-\frac {6}{3+x}\right ) \, dx+30 \int \left (-\frac {3}{(3+x)^2}+\frac {1}{3+x}\right ) \, dx\\ &=-x+\frac {7 x^2}{6}+x \log \left (x^2\right )+3 \log (3+x)+\frac {2}{3} \int x \log (x) \, dx+9 \int \frac {\log (x)}{(3+x)^2} \, dx-\int \log (x) \, dx\\ &=x^2-x \log (x)+\frac {1}{3} x^2 \log (x)+\frac {3 x \log (x)}{3+x}+x \log \left (x^2\right )+3 \log (3+x)-3 \int \frac {1}{3+x} \, dx\\ &=x^2-x \log (x)+\frac {1}{3} x^2 \log (x)+\frac {3 x \log (x)}{3+x}+x \log \left (x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 25, normalized size = 0.89 \begin {gather*} \frac {1}{3} \left (\frac {x^3 \log (x)}{3+x}+3 x \left (x+\log \left (x^2\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 33, normalized size = 1.18 \begin {gather*} \frac {3 \, x^{3} + 9 \, x^{2} + {\left (x^{3} + 6 \, x^{2} + 18 \, x\right )} \log \relax (x)}{3 \, {\left (x + 3\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 26, normalized size = 0.93 \begin {gather*} x^{2} + \frac {1}{3} \, {\left (x^{2} + 3 \, x - \frac {27}{x + 3}\right )} \log \relax (x) + 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.29, size = 33, normalized size = 1.18
method | result | size |
default | \(x^{2}+\frac {x^{2} \ln \relax (x )}{3}-x \ln \relax (x )+\frac {3 \ln \relax (x ) x}{3+x}+x \ln \left (x^{2}\right )\) | \(33\) |
risch | \(\frac {\left (x^{3}+6 x^{2}+9 x -27\right ) \ln \relax (x )}{3 x +9}-\frac {i \pi x \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{2}+i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-\frac {i \pi x \mathrm {csgn}\left (i x^{2}\right )^{3}}{2}+x^{2}+3 \ln \relax (x )\) | \(83\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 47, normalized size = 1.68 \begin {gather*} \frac {7}{6} \, x^{2} + x - \frac {x^{3} + 9 \, x^{2} - 2 \, {\left (x^{3} + 6 \, x^{2} + 9 \, x - 27\right )} \log \relax (x) + 18 \, x}{6 \, {\left (x + 3\right )}} + 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.50, size = 37, normalized size = 1.32 \begin {gather*} \frac {x\,\left (9\,x+9\,\ln \left (x^2\right )+3\,x\,\ln \left (x^2\right )+x^2\,\ln \relax (x)+3\,x^2\right )}{3\,\left (x+3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.32, size = 29, normalized size = 1.04 \begin {gather*} x^{2} + 3 \log {\relax (x )} + \frac {\left (x^{3} + 6 x^{2} + 9 x - 27\right ) \log {\relax (x )}}{3 x + 9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________