Optimal. Leaf size=27 \[ -x-\frac {1}{3} x \log ^2\left (\frac {\log (3)}{\left (-\frac {1}{x}+x+x^2\right )^2}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 22.90, antiderivative size = 32, normalized size of antiderivative = 1.19, number of steps used = 38, number of rules used = 18, integrand size = 119, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.151, Rules used = {6688, 2528, 2523, 12, 6742, 2100, 2081, 2079, 800, 634, 618, 204, 628, 2067, 2065, 705, 31, 1628} \begin {gather*} -\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (-x^3-x^2+1\right )^2}\right )-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 204
Rule 618
Rule 628
Rule 634
Rule 705
Rule 800
Rule 1628
Rule 2065
Rule 2067
Rule 2079
Rule 2081
Rule 2100
Rule 2523
Rule 2528
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-1+\frac {4 \left (1+x^2+2 x^3\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{3 \left (-1+x^2+x^3\right )}-\frac {1}{3} \log ^2\left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )\right ) \, dx\\ &=-x-\frac {1}{3} \int \log ^2\left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right ) \, dx+\frac {4}{3} \int \frac {\left (1+x^2+2 x^3\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3} \, dx\\ &=-x-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )+\frac {2}{3} \int \frac {2 \left (1+x^2+2 x^3\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{1-x^2-x^3} \, dx+\frac {4}{3} \int \left (2 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )+\frac {\left (3-x^2\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3}\right ) \, dx\\ &=-x-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )+\frac {4}{3} \int \frac {\left (3-x^2\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3} \, dx+\frac {4}{3} \int \frac {\left (1+x^2+2 x^3\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{1-x^2-x^3} \, dx+\frac {8}{3} \int \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right ) \, dx\\ &=-x+\frac {8}{3} x \log \left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )+\frac {4}{3} \int \left (-2 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )+\frac {\left (3-x^2\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{1-x^2-x^3}\right ) \, dx+\frac {4}{3} \int \left (\frac {3 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3}-\frac {x^2 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3}\right ) \, dx-\frac {8}{3} \int \frac {2 \left (1+x^2+2 x^3\right )}{1-x^2-x^3} \, dx\\ &=-x+\frac {8}{3} x \log \left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )+\frac {4}{3} \int \frac {\left (3-x^2\right ) \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{1-x^2-x^3} \, dx-\frac {4}{3} \int \frac {x^2 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3} \, dx-\frac {8}{3} \int \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right ) \, dx+4 \int \frac {\log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3} \, dx-\frac {16}{3} \int \frac {1+x^2+2 x^3}{1-x^2-x^3} \, dx\\ &=-x-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )-\frac {4}{3} \int \frac {x^2 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3} \, dx+\frac {4}{3} \int \left (-\frac {3 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3}+\frac {x^2 \log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3}\right ) \, dx+\frac {8}{3} \int \frac {2 \left (1+x^2+2 x^3\right )}{1-x^2-x^3} \, dx+4 \int \frac {\log \left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )}{-1+x^2+x^3} \, dx-\frac {16}{3} \int \left (-2+\frac {3-x^2}{1-x^2-x^3}\right ) \, dx\\ &=\frac {29 x}{3}-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )-\frac {16}{3} \int \frac {3-x^2}{1-x^2-x^3} \, dx+\frac {16}{3} \int \frac {1+x^2+2 x^3}{1-x^2-x^3} \, dx\\ &=\frac {29 x}{3}-\frac {16}{9} \log \left (1-x^2-x^3\right )-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )+\frac {16}{9} \int \frac {-9-2 x}{1-x^2-x^3} \, dx+\frac {16}{3} \int \left (-2+\frac {3-x^2}{1-x^2-x^3}\right ) \, dx\\ &=-x-\frac {16}{9} \log \left (1-x^2-x^3\right )-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )+\frac {16}{9} \operatorname {Subst}\left (\int \frac {-\frac {25}{3}-2 x}{\frac {25}{27}+\frac {x}{3}-x^3} \, dx,x,\frac {1}{3}+x\right )+\frac {16}{3} \int \frac {3-x^2}{1-x^2-x^3} \, dx\\ &=-x-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )-\frac {16}{9} \int \frac {-9-2 x}{1-x^2-x^3} \, dx+\frac {16}{9} \operatorname {Subst}\left (\int \frac {-\frac {25}{3}-2 x}{\left (\frac {\frac {2}{\sqrt [3]{25+3 \sqrt {69}}}+\sqrt [3]{50+6 \sqrt {69}}}{3\ 2^{2/3}}-x\right ) \left (\frac {1}{18} \left (-2+2 \left (\frac {2}{25+3 \sqrt {69}}\right )^{2/3}+\sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{2/3}\right )+\frac {1}{3} \left (\sqrt [3]{\frac {2}{25+3 \sqrt {69}}}+\sqrt [3]{\frac {1}{2} \left (25+3 \sqrt {69}\right )}\right ) x+x^2\right )} \, dx,x,\frac {1}{3}+x\right )\\ &=-x-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )-\frac {16}{9} \operatorname {Subst}\left (\int \frac {-\frac {25}{3}-2 x}{\frac {25}{27}+\frac {x}{3}-x^3} \, dx,x,\frac {1}{3}+x\right )+\frac {16}{9} \operatorname {Subst}\left (\int \left (\frac {36 \left (-2 \sqrt [3]{2}-25 \sqrt [3]{25+3 \sqrt {69}}-\left (50+6 \sqrt {69}\right )^{2/3}\right )}{\left (6+6 \left (\frac {2}{25+3 \sqrt {69}}\right )^{2/3}+2 \sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{2/3}+2^{2/3} \sqrt [3]{623+75 \sqrt {69}}\right ) \left (2 \sqrt [3]{2}+\left (2 \left (25+3 \sqrt {69}\right )\right )^{2/3}-6 \sqrt [3]{25+3 \sqrt {69}} x\right )}+\frac {36 \left (-2 \left (25+3 \sqrt {69}\right )^{2/3}-\left (25-3 \sqrt {69}\right ) \sqrt [3]{50+6 \sqrt {69}}-2^{2/3} \left (623+75 \sqrt {69}\right )-3 \left (25 \left (25+3 \sqrt {69}\right )^{2/3}+2^{2/3} \left (25+3 \sqrt {69}\right )+2 \sqrt [3]{50+6 \sqrt {69}}\right ) x\right )}{\left (6+6 \left (\frac {2}{25+3 \sqrt {69}}\right )^{2/3}+2 \sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{2/3}+2^{2/3} \sqrt [3]{623+75 \sqrt {69}}\right ) \left (2\ 2^{2/3}-2 \left (25+3 \sqrt {69}\right )^{2/3}+\sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{4/3}+3\ 2^{2/3} \left (25+3 \sqrt {69}+2^{2/3} \sqrt [3]{25+3 \sqrt {69}}\right ) x+18 \left (25+3 \sqrt {69}\right )^{2/3} x^2\right )}\right ) \, dx,x,\frac {1}{3}+x\right )\\ &=-x+\frac {32 \left (25+2 \sqrt [3]{\frac {2}{25+3 \sqrt {69}}}+2^{2/3} \sqrt [3]{25+3 \sqrt {69}}\right ) \log \left (2 \sqrt [3]{2}+\left (50+6 \sqrt {69}\right )^{2/3}-2 \sqrt [3]{25+3 \sqrt {69}} (1+3 x)\right )}{3 \left (6+6 \left (\frac {2}{25+3 \sqrt {69}}\right )^{2/3}+2 \sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{2/3}+2^{2/3} \sqrt [3]{623+75 \sqrt {69}}\right )}-\frac {1}{3} x \log ^2\left (\frac {x^2 \log (3)}{\left (1-x^2-x^3\right )^2}\right )-\frac {16}{9} \operatorname {Subst}\left (\int \frac {-\frac {25}{3}-2 x}{\left (\frac {\frac {2}{\sqrt [3]{25+3 \sqrt {69}}}+\sqrt [3]{50+6 \sqrt {69}}}{3\ 2^{2/3}}-x\right ) \left (\frac {1}{18} \left (-2+2 \left (\frac {2}{25+3 \sqrt {69}}\right )^{2/3}+\sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{2/3}\right )+\frac {1}{3} \left (\sqrt [3]{\frac {2}{25+3 \sqrt {69}}}+\sqrt [3]{\frac {1}{2} \left (25+3 \sqrt {69}\right )}\right ) x+x^2\right )} \, dx,x,\frac {1}{3}+x\right )+\frac {64 \operatorname {Subst}\left (\int \frac {-2 \left (25+3 \sqrt {69}\right )^{2/3}-\left (25-3 \sqrt {69}\right ) \sqrt [3]{50+6 \sqrt {69}}-2^{2/3} \left (623+75 \sqrt {69}\right )-3 \left (25 \left (25+3 \sqrt {69}\right )^{2/3}+2^{2/3} \left (25+3 \sqrt {69}\right )+2 \sqrt [3]{50+6 \sqrt {69}}\right ) x}{2\ 2^{2/3}-2 \left (25+3 \sqrt {69}\right )^{2/3}+\sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{4/3}+3\ 2^{2/3} \left (25+3 \sqrt {69}+2^{2/3} \sqrt [3]{25+3 \sqrt {69}}\right ) x+18 \left (25+3 \sqrt {69}\right )^{2/3} x^2} \, dx,x,\frac {1}{3}+x\right )}{6+6 \left (\frac {2}{25+3 \sqrt {69}}\right )^{2/3}+2 \sqrt [3]{2} \left (25+3 \sqrt {69}\right )^{2/3}+2^{2/3} \sqrt [3]{623+75 \sqrt {69}}}\\ &=\text {Rest of rules removed due to large latex content} \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 2.67, size = 223, normalized size = 8.26 \begin {gather*} \frac {x \left (3+\log ^2\left (\frac {x^2 \log (3)}{\left (-1+x^2+x^3\right )^2}\right )\right ) \left (3+2 \text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,1\right ] \text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,2\right ]^2+2 \text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,1\right ]^2 \text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,3\right ]+2 \text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,2\right ] \text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,3\right ]^2\right )}{3 \left (\text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,1\right ]-\text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,2\right ]\right ) \left (\text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,1\right ]-\text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,3\right ]\right ) \left (\text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,2\right ]-\text {Root}\left [\text {$\#$1}^3+\text {$\#$1}^2-1\&,3\right ]\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 41, normalized size = 1.52 \begin {gather*} -\frac {1}{3} \, x \log \left (\frac {x^{2} \log \relax (3)}{x^{6} + 2 \, x^{5} + x^{4} - 2 \, x^{3} - 2 \, x^{2} + 1}\right )^{2} - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.12, size = 79, normalized size = 2.93 \begin {gather*} -\frac {1}{3} \, x \log \left (x^{6} + 2 \, x^{5} + x^{4} - 2 \, x^{3} - 2 \, x^{2} + 1\right )^{2} + \frac {2}{3} \, x \log \left (x^{6} + 2 \, x^{5} + x^{4} - 2 \, x^{3} - 2 \, x^{2} + 1\right ) \log \left (x^{2} \log \relax (3)\right ) - \frac {1}{3} \, x \log \left (x^{2} \log \relax (3)\right )^{2} - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.29, size = 42, normalized size = 1.56
method | result | size |
norman | \(-x -\frac {x \ln \left (\frac {x^{2} \ln \relax (3)}{x^{6}+2 x^{5}+x^{4}-2 x^{3}-2 x^{2}+1}\right )^{2}}{3}\) | \(42\) |
risch | \(-x -\frac {x \ln \left (\frac {x^{2} \ln \relax (3)}{x^{6}+2 x^{5}+x^{4}-2 x^{3}-2 x^{2}+1}\right )^{2}}{3}\) | \(42\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 62, normalized size = 2.30 \begin {gather*} -\frac {4}{3} \, x \log \left (x^{3} + x^{2} - 1\right )^{2} - \frac {4}{3} \, x \log \relax (x)^{2} - \frac {4}{3} \, x \log \relax (x) \log \left (\log \relax (3)\right ) - \frac {1}{3} \, {\left (\log \left (\log \relax (3)\right )^{2} + 3\right )} x + \frac {4}{3} \, {\left (2 \, x \log \relax (x) + x \log \left (\log \relax (3)\right )\right )} \log \left (x^{3} + x^{2} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.73, size = 39, normalized size = 1.44 \begin {gather*} -\frac {x\,\left ({\ln \left (\frac {x^2\,\ln \relax (3)}{x^6+2\,x^5+x^4-2\,x^3-2\,x^2+1}\right )}^2+3\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.22, size = 39, normalized size = 1.44 \begin {gather*} - \frac {x \log {\left (\frac {x^{2} \log {\relax (3 )}}{x^{6} + 2 x^{5} + x^{4} - 2 x^{3} - 2 x^{2} + 1} \right )}^{2}}{3} - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________