Optimal. Leaf size=21 \[ 9 x^2 \left (e+\log (3-x)-\log ^2\left (x^2\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.55, 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 = {6873, 12,
6820, 6874, 14, 78, 2442, 45, 2341, 2342} \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 45
Rule 78
Rule 2341
Rule 2342
Rule 2442
Rule 6820
Rule 6873
Rule 6874
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.07, 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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(54\) vs.
\(2(22)=44\).
time = 1.02, 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 \left (x \right )^{2}+18 i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right ) \ln \left (x \right )-36 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2} \ln \left (x \right )+18 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3} \ln \left (x \right )+\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] Leaf count of result is larger than twice the leaf count of optimal. 76 vs.
\(2 (24) = 48\).
time = 0.30, size = 76, normalized size = 3.62 \begin {gather*} -36 \, x^{2} \log \left (x\right )^{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]
________________________________________________________________________________________
Fricas [A]
time = 0.37, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.25, 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]
________________________________________________________________________________________
Giac [A]
time = 0.40, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________