Optimal. Leaf size=21 \[ 9 x^2 \left (e+\log (3-x)-\log ^2\left (x^2\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.52, antiderivative size = 42, normalized size of antiderivative = 2.00, number of steps used = 16, number of rules used = 10, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.145, Rules used = {6741, 12, 6688, 6742, 14, 77, 2395, 43, 2304, 2305} \begin {gather*} \frac {9}{2} (1+2 e) x^2-\frac {9 x^2}{2}-9 x^2 \log ^2\left (x^2\right )+9 x^2 \log (3-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 43
Rule 77
Rule 2304
Rule 2305
Rule 2395
Rule 6688
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {9 x \left (6 e-(1+2 e) x+6 \log (3-x)-2 x \log (3-x)-12 \log \left (x^2\right )+4 x \log \left (x^2\right )-6 \log ^2\left (x^2\right )+2 x \log ^2\left (x^2\right )\right )}{3-x} \, dx\\ &=9 \int \frac {x \left (6 e-(1+2 e) x+6 \log (3-x)-2 x \log (3-x)-12 \log \left (x^2\right )+4 x \log \left (x^2\right )-6 \log ^2\left (x^2\right )+2 x \log ^2\left (x^2\right )\right )}{3-x} \, dx\\ &=9 \int \frac {x \left (6 e-(1+2 e) x-2 (-3+x) \log (3-x)+4 (-3+x) \log \left (x^2\right )+2 (-3+x) \log ^2\left (x^2\right )\right )}{3-x} \, dx\\ &=9 \int \left (\frac {x (6 e-(1+2 e) x+6 \log (3-x)-2 x \log (3-x))}{3-x}-4 x \log \left (x^2\right )-2 x \log ^2\left (x^2\right )\right ) \, dx\\ &=9 \int \frac {x (6 e-(1+2 e) x+6 \log (3-x)-2 x \log (3-x))}{3-x} \, dx-18 \int x \log ^2\left (x^2\right ) \, dx-36 \int x \log \left (x^2\right ) \, dx\\ &=18 x^2-18 x^2 \log \left (x^2\right )-9 x^2 \log ^2\left (x^2\right )+9 \int x \left (2 e+\frac {x}{-3+x}+2 \log (3-x)\right ) \, dx+36 \int x \log \left (x^2\right ) \, dx\\ &=-9 x^2 \log ^2\left (x^2\right )+9 \int \left (\frac {x (6 e-(1+2 e) x)}{3-x}+2 x \log (3-x)\right ) \, dx\\ &=-9 x^2 \log ^2\left (x^2\right )+9 \int \frac {x (6 e-(1+2 e) x)}{3-x} \, dx+18 \int x \log (3-x) \, dx\\ &=9 x^2 \log (3-x)-9 x^2 \log ^2\left (x^2\right )+9 \int \frac {x^2}{3-x} \, dx+9 \int \left (3+\frac {9}{-3+x}+(1+2 e) x\right ) \, dx\\ &=27 x+\frac {9}{2} (1+2 e) x^2+81 \log (3-x)+9 x^2 \log (3-x)-9 x^2 \log ^2\left (x^2\right )+9 \int \left (-3-\frac {9}{-3+x}-x\right ) \, dx\\ &=-\frac {9 x^2}{2}+\frac {9}{2} (1+2 e) x^2+9 x^2 \log (3-x)-9 x^2 \log ^2\left (x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 29, normalized size = 1.38 \begin {gather*} 9 \left (e x^2+x^2 \log (3-x)-x^2 \log ^2\left (x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 30, normalized size = 1.43 \begin {gather*} -9 \, x^{2} \log \left (x^{2}\right )^{2} + 9 \, x^{2} e + 9 \, x^{2} \log \left (-x + 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 30, normalized size = 1.43 \begin {gather*} -9 \, x^{2} \log \left (x^{2}\right )^{2} + 9 \, x^{2} e + 9 \, x^{2} \log \left (-x + 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.24, size = 55, normalized size = 2.62
method | result | size |
default | \(-9 x^{2} \ln \left (x^{2}\right )^{2}+9 \left (3-x \right )^{2} \ln \left (3-x \right )+\frac {243}{2}-54 \left (3-x \right ) \ln \left (3-x \right )+9 x^{2} {\mathrm e}+81 \ln \left (x -3\right )\) | \(55\) |
risch | \(9 \ln \left (3-x \right ) x^{2}-36 x^{2} \ln \relax (x )^{2}+18 i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right ) \ln \relax (x )-36 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2} \ln \relax (x )+18 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3} \ln \relax (x )+\frac {9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}}{4}-9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}+\frac {27 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}}{2}-9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}+\frac {9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}}{4}+9 x^{2} {\mathrm e}\) | \(204\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.40, size = 76, normalized size = 3.62 \begin {gather*} -36 \, x^{2} \log \relax (x)^{2} + 9 \, {\left (x^{2} + 6 \, x + 18 \, \log \left (x - 3\right )\right )} e - 54 \, {\left (x + 3 \, \log \left (x - 3\right )\right )} e + 9 \, {\left (x^{2} + 6 \, x + 18 \, \log \left (x - 3\right )\right )} \log \left (-x + 3\right ) - 54 \, {\left (x + 3 \, \log \left (x - 3\right )\right )} \log \left (-x + 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.84, size = 22, normalized size = 1.05 \begin {gather*} 9\,x^2\,\left (-{\ln \left (x^2\right )}^2+\mathrm {e}+\ln \left (3-x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.51, size = 37, normalized size = 1.76 \begin {gather*} - 9 x^{2} \log {\left (x^{2} \right )}^{2} + 9 e x^{2} + \left (9 x^{2} - 27\right ) \log {\left (3 - x \right )} + 27 \log {\left (x - 3 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________