Optimal. Leaf size=28 \[ x^2 \left (1-x+\frac {1}{9} \left (\log (x)-\log \left (\left (3+e^4\right ) x\right )\right )^2\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.10, antiderivative size = 80, normalized size of antiderivative = 2.86, number of steps used = 11, number of rules used = 6, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {12, 2305, 2304, 2380, 2366, 2421} \begin {gather*} -x^3+\frac {19 x^2}{18}+\frac {1}{9} x^2 \log ^2(x)+\frac {1}{9} x^2 \log ^2\left (\left (3+e^4\right ) x\right )-\frac {1}{18} x^2 (1-2 \log (x))-\frac {1}{9} x^2 \log (x)-\frac {2}{9} x^2 \log (x) \log \left (\left (3+e^4\right ) x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2304
Rule 2305
Rule 2366
Rule 2380
Rule 2421
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{9} \int \left (18 x-27 x^2+2 x \log ^2(x)-4 x \log (x) \log \left (3 x+e^4 x\right )+2 x \log ^2\left (3 x+e^4 x\right )\right ) \, dx\\ &=x^2-x^3+\frac {2}{9} \int x \log ^2(x) \, dx+\frac {2}{9} \int x \log ^2\left (3 x+e^4 x\right ) \, dx-\frac {4}{9} \int x \log (x) \log \left (3 x+e^4 x\right ) \, dx\\ &=x^2-x^3+\frac {1}{9} x^2 \log ^2(x)-\frac {2}{9} \int x \log (x) \, dx+\frac {2}{9} \int x \log ^2\left (\left (3+e^4\right ) x\right ) \, dx-\frac {4}{9} \int x \log (x) \log \left (\left (3+e^4\right ) x\right ) \, dx\\ &=\frac {19 x^2}{18}-x^3-\frac {1}{9} x^2 \log (x)+\frac {1}{9} x^2 \log ^2(x)+\frac {1}{9} x^2 \log \left (\left (3+e^4\right ) x\right )-\frac {2}{9} x^2 \log (x) \log \left (\left (3+e^4\right ) x\right )+\frac {1}{9} x^2 \log ^2\left (\left (3+e^4\right ) x\right )-\frac {2}{9} \int x \log \left (\left (3+e^4\right ) x\right ) \, dx+\frac {4}{9} \int \frac {1}{4} x (-1+2 \log (x)) \, dx\\ &=\frac {10 x^2}{9}-x^3-\frac {1}{9} x^2 \log (x)+\frac {1}{9} x^2 \log ^2(x)-\frac {2}{9} x^2 \log (x) \log \left (\left (3+e^4\right ) x\right )+\frac {1}{9} x^2 \log ^2\left (\left (3+e^4\right ) x\right )+\frac {1}{9} \int x (-1+2 \log (x)) \, dx\\ &=\frac {19 x^2}{18}-x^3-\frac {1}{18} x^2 (1-2 \log (x))-\frac {1}{9} x^2 \log (x)+\frac {1}{9} x^2 \log ^2(x)-\frac {2}{9} x^2 \log (x) \log \left (\left (3+e^4\right ) x\right )+\frac {1}{9} x^2 \log ^2\left (\left (3+e^4\right ) x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 23, normalized size = 0.82 \begin {gather*} -x^3+\frac {1}{9} x^2 \left (9+\log ^2\left (3+e^4\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 21, normalized size = 0.75 \begin {gather*} \frac {1}{9} \, x^{2} \log \left (e^{4} + 3\right )^{2} - x^{3} + x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.23, size = 135, normalized size = 4.82 \begin {gather*} -\frac {1}{9} \, x^{2} \log \relax (x)^{2} - \frac {2}{9} \, x^{2} \log \relax (x) \log \left (e^{4} + 3\right ) - x^{3} + \frac {{\left (x e^{4} + 3 \, x\right )}^{2} \log \left (x e^{4} + 3 \, x\right )^{2}}{9 \, {\left (e^{8} + 6 \, e^{4} + 9\right )}} + \frac {1}{9} \, x^{2} \log \relax (x) + \frac {1}{9} \, x^{2} \log \left (e^{4} + 3\right ) + \frac {17}{18} \, x^{2} - \frac {{\left (x e^{4} + 3 \, x\right )}^{2} \log \left (x e^{4} + 3 \, x\right )}{9 \, {\left (e^{8} + 6 \, e^{4} + 9\right )}} + \frac {{\left (x e^{4} + 3 \, x\right )}^{2}}{18 \, {\left (e^{8} + 6 \, e^{4} + 9\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 56, normalized size = 2.00
method | result | size |
risch | \(\frac {x^{2} \ln \left (x \,{\mathrm e}^{4}+3 x \right )^{2}}{9}-\frac {x^{2} \ln \left (x \,{\mathrm e}^{4}+3 x \right )}{9}-\frac {x^{2} \ln \relax (x )^{2}}{9}+\frac {x^{2} \ln \relax (x )}{9}-x^{3}+x^{2}\) | \(56\) |
default | \(-x^{3}+\frac {17 x^{2}}{18}+\frac {x^{2} \ln \relax (x )^{2}}{9}+\frac {{\mathrm e}^{8} \ln \left (\left ({\mathrm e}^{4}+3\right ) x \right )^{2} x^{2}}{9 \left ({\mathrm e}^{4}+3\right )^{2}}+\frac {2 \,{\mathrm e}^{4} \ln \left (\left ({\mathrm e}^{4}+3\right ) x \right )^{2} x^{2}}{3 \left ({\mathrm e}^{4}+3\right )^{2}}+\frac {\ln \left (\left ({\mathrm e}^{4}+3\right ) x \right )^{2} x^{2}}{\left ({\mathrm e}^{4}+3\right )^{2}}-\frac {{\mathrm e}^{8} \ln \left (\left ({\mathrm e}^{4}+3\right ) x \right ) x^{2}}{9 \left ({\mathrm e}^{4}+3\right )^{2}}-\frac {2 \,{\mathrm e}^{4} \ln \left (\left ({\mathrm e}^{4}+3\right ) x \right ) x^{2}}{3 \left ({\mathrm e}^{4}+3\right )^{2}}-\frac {\ln \left (\left ({\mathrm e}^{4}+3\right ) x \right ) x^{2}}{\left ({\mathrm e}^{4}+3\right )^{2}}+\frac {{\mathrm e}^{8} x^{2}}{18 \left ({\mathrm e}^{4}+3\right )^{2}}+\frac {{\mathrm e}^{4} x^{2}}{3 \left ({\mathrm e}^{4}+3\right )^{2}}+\frac {x^{2}}{2 \left ({\mathrm e}^{4}+3\right )^{2}}+\frac {x^{2} \ln \left (x \,{\mathrm e}^{4}+3 x \right )}{9}-\frac {2 x^{2} \ln \relax (x ) \ln \left (x \,{\mathrm e}^{4}+3 x \right )}{9}\) | \(215\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.47, size = 113, normalized size = 4.04 \begin {gather*} \frac {1}{18} \, {\left (2 \, \log \relax (x)^{2} - 2 \, \log \relax (x) + 1\right )} x^{2} - x^{3} + \frac {1}{9} \, x^{2} {\left (\log \left (e^{4} + 3\right ) - 1\right )} + \frac {1}{9} \, x^{2} \log \relax (x) + x^{2} - \frac {1}{9} \, {\left (2 \, x^{2} \log \left (x e^{4} + 3 \, x\right ) - x^{2}\right )} \log \relax (x) + \frac {{\left (x e^{4} + 3 \, x\right )}^{2} {\left (2 \, \log \left (x e^{4} + 3 \, x\right )^{2} - 2 \, \log \left (x e^{4} + 3 \, x\right ) + 1\right )}}{18 \, {\left (e^{4} + 3\right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.74, size = 17, normalized size = 0.61 \begin {gather*} \frac {x^2\,\left ({\ln \left ({\mathrm {e}}^4+3\right )}^2-9\,x+9\right )}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.22, size = 17, normalized size = 0.61 \begin {gather*} - x^{3} + x^{2} \left (1 + \frac {\log {\left (3 + e^{4} \right )}^{2}}{9}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________