Optimal. Leaf size=22 \[ \frac {2}{3} x^2 \log (x) \left (-3-x+\log ^2\left (-x^2\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.29, antiderivative size = 62, normalized size of antiderivative = 2.82, number of steps used = 22, number of rules used = 9, integrand size = 56, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {12, 2305, 2304, 6741, 14, 43, 6742, 2334, 2366} \begin {gather*} -\frac {2 x^2}{3}+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (x^3+3 x^2\right ) \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 43
Rule 2304
Rule 2305
Rule 2334
Rule 2366
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{3} \int \left (-6 x-2 x^2+2 x \log ^2\left (-x^2\right )+\log (x) \left (-12 x-6 x^2+8 x \log \left (-x^2\right )+4 x \log ^2\left (-x^2\right )\right )\right ) \, dx\\ &=-x^2-\frac {2 x^3}{9}+\frac {1}{3} \int \log (x) \left (-12 x-6 x^2+8 x \log \left (-x^2\right )+4 x \log ^2\left (-x^2\right )\right ) \, dx+\frac {2}{3} \int x \log ^2\left (-x^2\right ) \, dx\\ &=-x^2-\frac {2 x^3}{9}+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {1}{3} \int 2 x \log (x) \left (-6-3 x+4 \log \left (-x^2\right )+2 \log ^2\left (-x^2\right )\right ) \, dx-\frac {4}{3} \int x \log \left (-x^2\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} \int x \log (x) \left (-6-3 x+4 \log \left (-x^2\right )+2 \log ^2\left (-x^2\right )\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} \int \left (-3 x (2+x) \log (x)+4 x \log (x) \log \left (-x^2\right )+2 x \log (x) \log ^2\left (-x^2\right )\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {4}{3} \int x \log (x) \log ^2\left (-x^2\right ) \, dx-2 \int x (2+x) \log (x) \, dx+\frac {8}{3} \int x \log (x) \log \left (-x^2\right ) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )-\frac {4}{3} \int \frac {1}{2} x \left (2-2 \log \left (-x^2\right )+\log ^2\left (-x^2\right )\right ) \, dx+2 \int \frac {1}{3} x (3+x) \, dx-\frac {16}{3} \int \frac {1}{4} x (-1+2 \log (x)) \, dx\\ &=-\frac {x^2}{3}-\frac {2 x^3}{9}+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {2}{3} \int x (3+x) \, dx-\frac {2}{3} \int x \left (2-2 \log \left (-x^2\right )+\log ^2\left (-x^2\right )\right ) \, dx-\frac {4}{3} \int x (-1+2 \log (x)) \, dx\\ &=\frac {x^2}{3}-\frac {2 x^3}{9}+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {2}{3} \int \left (3 x+x^2\right ) \, dx-\frac {2}{3} \int \left (2 x-2 x \log \left (-x^2\right )+x \log ^2\left (-x^2\right )\right ) \, dx\\ &=\frac {2 x^2}{3}+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {4}{3} x^2 \log \left (-x^2\right )+\frac {1}{3} x^2 \log ^2\left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )-\frac {2}{3} \int x \log ^2\left (-x^2\right ) \, dx+\frac {4}{3} \int x \log \left (-x^2\right ) \, dx\\ &=\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)-\frac {2}{3} x^2 \log \left (-x^2\right )+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )+\frac {4}{3} \int x \log \left (-x^2\right ) \, dx\\ &=-\frac {2 x^2}{3}+\frac {2}{3} x^2 (1-2 \log (x))+\frac {4}{3} x^2 \log (x)-\frac {2}{3} \left (3 x^2+x^3\right ) \log (x)+\frac {2}{3} x^2 \log (x) \log ^2\left (-x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 22, normalized size = 1.00 \begin {gather*} -\frac {2}{3} x^2 \log (x) \left (3+x-\log ^2\left (-x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.65, size = 57, normalized size = 2.59 \begin {gather*} \frac {1}{3} i \, \pi x^{2} \log \left (-x^{2}\right )^{2} + \frac {1}{3} \, x^{2} \log \left (-x^{2}\right )^{3} - \frac {1}{3} i \, \pi {\left (x^{3} + 3 \, x^{2}\right )} - \frac {1}{3} \, {\left (x^{3} + 3 \, x^{2}\right )} \log \left (-x^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [C] time = 0.33, size = 92, normalized size = 4.18 \begin {gather*} -\frac {4}{3} \, {\left (-2 i \, \pi + 1\right )} x^{2} \log \relax (x)^{2} + \frac {8}{3} \, x^{2} \log \relax (x)^{3} + \frac {1}{3} \, x^{2} \log \left (-x^{2}\right )^{2} - \frac {1}{3} \, {\left (-2 i \, \pi - \pi ^{2} - 1\right )} x^{2} - \frac {2}{3} \, x^{2} \log \left (-x^{2}\right ) - \frac {1}{3} \, x^{2} + \frac {2}{3} \, {\left ({\left (-2 i \, \pi - \pi ^{2} - 1\right )} x^{2} - x^{3}\right )} \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 31, normalized size = 1.41
method | result | size |
default | \(-2 x^{2} \ln \relax (x )-\frac {2 x^{3} \ln \relax (x )}{3}+\frac {2 x^{2} \ln \left (-x^{2}\right )^{2} \ln \relax (x )}{3}\) | \(31\) |
risch | \(\frac {x^{2} \ln \left (-x^{2}\right )^{2}}{3}+\frac {\pi ^{2} x^{2}}{3}+\frac {i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}-\frac {4 i x^{2} \left (\pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-2 \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-\pi \mathrm {csgn}\left (i x^{2}\right )^{3}+2 \pi \mathrm {csgn}\left (i x^{2}\right )^{2}-2 \pi -i\right ) \ln \relax (x )^{2}}{3}-\frac {2 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{3}+\frac {2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}}{12}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}}{6}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}}{3}+\frac {2 i x^{2} \pi }{3}+\frac {8 x^{2} \ln \relax (x )^{3}}{3}+\frac {\left (-2 \pi ^{2} x^{2}-2 x^{3}-2 x^{2}+2 i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-4 i x^{2} \pi +2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}}{2}+2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}-\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}-4 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{4}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}}{2}-2 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}+2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{5}-2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}\right ) \ln \relax (x )}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}-\frac {2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{4}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}}{12}-\frac {2 \ln \left (-x^{2}\right ) x^{2}}{3}-\frac {i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{3}+\frac {2 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}}{3}-\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{5}}{3}+\frac {\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}}{3}-\frac {2 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{2}}{3}\) | \(839\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.51, size = 91, normalized size = 4.14 \begin {gather*} \frac {1}{3} \, x^{2} \log \left (-x^{2}\right )^{2} + \frac {4}{3} \, {\left (-i \, \pi + 1\right )} x^{2} \log \relax (x) - \frac {4}{3} \, x^{2} \log \relax (x)^{2} + \frac {1}{3} \, {\left (2 i \, \pi + \pi ^{2} + 1\right )} x^{2} - \frac {2}{3} \, x^{2} \log \left (-x^{2}\right ) - \frac {1}{3} \, x^{2} + \frac {2}{3} \, {\left (x^{2} \log \left (-x^{2}\right )^{2} - x^{3} - 3 \, x^{2}\right )} \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.96, size = 29, normalized size = 1.32 \begin {gather*} -\frac {2\,x^2\,\ln \relax (x)\,\left (-{\ln \left (x^2\right )}^2-2{}\mathrm {i}\,\pi \,\ln \left (x^2\right )+x+\pi ^2+3\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 0.35, size = 53, normalized size = 2.41 \begin {gather*} \frac {8 x^{2} \log {\relax (x )}^{3}}{3} + \frac {8 i \pi x^{2} \log {\relax (x )}^{2}}{3} + \left (- \frac {2 x^{3}}{3} - \frac {2 \pi ^{2} x^{2}}{3} - 2 x^{2}\right ) \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________