Optimal. Leaf size=21 \[ \left (4-x+x^2 \log (2)\right ) \log \left (-12+x-x^2\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.31, antiderivative size = 162, normalized size of antiderivative = 7.71, number of steps used = 15, number of rules used = 8, integrand size = 70, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {6728, 1628, 634, 618, 204, 628, 2525, 800} \begin {gather*} -\frac {\left (2-23 \log ^2(4)-\log (16)\right ) \log \left (x^2-x+12\right )}{4 \log (4)}-\frac {1}{2} x^2 \log (4)+x^2 \log (2)+\frac {(1-x \log (4))^2 \log \left (-x^2+x-12\right )}{2 \log (4)}+\frac {1}{2} (7-23 \log (2)) \log \left (x^2-x+12\right )+\frac {1}{2} x (4-\log (4))-x (2-\log (2))+\frac {1}{2} \sqrt {47} (2-\log (4)) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {47}}\right )-\sqrt {47} (1-\log (2)) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {47}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 628
Rule 634
Rule 800
Rule 1628
Rule 2525
Rule 6728
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {(-1+2 x) \left (4-x+x^2 \log (2)\right )}{12-x+x^2}+(-1+x \log (4)) \log \left (-12+x-x^2\right )\right ) \, dx\\ &=\int \frac {(-1+2 x) \left (4-x+x^2 \log (2)\right )}{12-x+x^2} \, dx+\int (-1+x \log (4)) \log \left (-12+x-x^2\right ) \, dx\\ &=\frac {(1-x \log (4))^2 \log \left (-12+x-x^2\right )}{2 \log (4)}-\frac {\int \frac {(1-2 x) (-1+x \log (4))^2}{-12+x-x^2} \, dx}{2 \log (4)}+\int \left (-2+\frac {x (7-23 \log (2))+4 (5-3 \log (2))}{12-x+x^2}+\log (2)+2 x \log (2)\right ) \, dx\\ &=-x (2-\log (2))+x^2 \log (2)+\frac {(1-x \log (4))^2 \log \left (-12+x-x^2\right )}{2 \log (4)}-\frac {\int \left (-((4-\log (4)) \log (4))+2 x \log ^2(4)-\frac {-1+48 \log (4)-12 \log ^2(4)+x \left (2-2 \log (4)-23 \log ^2(4)\right )}{-12+x-x^2}\right ) \, dx}{2 \log (4)}+\int \frac {x (7-23 \log (2))+4 (5-3 \log (2))}{12-x+x^2} \, dx\\ &=-x (2-\log (2))+x^2 \log (2)+\frac {1}{2} x (4-\log (4))-\frac {1}{2} x^2 \log (4)+\frac {(1-x \log (4))^2 \log \left (-12+x-x^2\right )}{2 \log (4)}+\frac {1}{2} (7-23 \log (2)) \int \frac {-1+2 x}{12-x+x^2} \, dx+\frac {1}{2} (47 (1-\log (2))) \int \frac {1}{12-x+x^2} \, dx+\frac {\int \frac {-1+48 \log (4)-12 \log ^2(4)+x \left (2-2 \log (4)-23 \log ^2(4)\right )}{-12+x-x^2} \, dx}{2 \log (4)}\\ &=-x (2-\log (2))+x^2 \log (2)+\frac {1}{2} x (4-\log (4))-\frac {1}{2} x^2 \log (4)+\frac {(1-x \log (4))^2 \log \left (-12+x-x^2\right )}{2 \log (4)}+\frac {1}{2} (7-23 \log (2)) \log \left (12-x+x^2\right )-(47 (1-\log (2))) \operatorname {Subst}\left (\int \frac {1}{-47-x^2} \, dx,x,-1+2 x\right )+\frac {1}{4} (47 (2-\log (4))) \int \frac {1}{-12+x-x^2} \, dx+\frac {\left (-2+23 \log ^2(4)+\log (16)\right ) \int \frac {1-2 x}{-12+x-x^2} \, dx}{4 \log (4)}\\ &=-\sqrt {47} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {47}}\right ) (1-\log (2))-x (2-\log (2))+x^2 \log (2)+\frac {1}{2} x (4-\log (4))-\frac {1}{2} x^2 \log (4)+\frac {(1-x \log (4))^2 \log \left (-12+x-x^2\right )}{2 \log (4)}+\frac {1}{2} (7-23 \log (2)) \log \left (12-x+x^2\right )-\frac {\left (2-23 \log ^2(4)-\log (16)\right ) \log \left (12-x+x^2\right )}{4 \log (4)}-\frac {1}{2} (47 (2-\log (4))) \operatorname {Subst}\left (\int \frac {1}{-47-x^2} \, dx,x,1-2 x\right )\\ &=-\sqrt {47} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {47}}\right ) (1-\log (2))-x (2-\log (2))+x^2 \log (2)+\frac {1}{2} \sqrt {47} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {47}}\right ) (2-\log (4))+\frac {1}{2} x (4-\log (4))-\frac {1}{2} x^2 \log (4)+\frac {(1-x \log (4))^2 \log \left (-12+x-x^2\right )}{2 \log (4)}+\frac {1}{2} (7-23 \log (2)) \log \left (12-x+x^2\right )-\frac {\left (2-23 \log ^2(4)-\log (16)\right ) \log \left (12-x+x^2\right )}{4 \log (4)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 29, normalized size = 1.38 \begin {gather*} x (-1+x \log (2)) \log \left (-12+x-x^2\right )+4 \log \left (12-x+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 21, normalized size = 1.00 \begin {gather*} {\left (x^{2} \log \relax (2) - x + 4\right )} \log \left (-x^{2} + x - 12\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 32, normalized size = 1.52 \begin {gather*} {\left (x^{2} \log \relax (2) - x\right )} \log \left (-x^{2} + x - 12\right ) + 4 \, \log \left (x^{2} - x + 12\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.96, size = 33, normalized size = 1.57
method | result | size |
risch | \(\left (x^{2} \ln \relax (2)-x \right ) \ln \left (-x^{2}+x -12\right )+4 \ln \left (x^{2}-x +12\right )\) | \(33\) |
default | \(\ln \relax (2) \ln \left (-x^{2}+x -12\right ) x^{2}+4 \ln \left (x^{2}-x +12\right )-\ln \left (-x^{2}+x -12\right ) x\) | \(40\) |
norman | \(4 \ln \left (-x^{2}+x -12\right )+\ln \relax (2) \ln \left (-x^{2}+x -12\right ) x^{2}-\ln \left (-x^{2}+x -12\right ) x\) | \(40\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.65, size = 165, normalized size = 7.86 \begin {gather*} -x^{2} \log \relax (2) + \sqrt {47} {\left (\log \relax (2) - 1\right )} \arctan \left (\frac {1}{47} \, \sqrt {47} {\left (2 \, x - 1\right )}\right ) - x {\left (\log \relax (2) - 2\right )} + \frac {1}{47} \, {\left (47 \, x^{2} - 70 \, \sqrt {47} \arctan \left (\frac {1}{47} \, \sqrt {47} {\left (2 \, x - 1\right )}\right ) + 94 \, x - 517 \, \log \left (x^{2} - x + 12\right )\right )} \log \relax (2) + \frac {1}{94} \, {\left (46 \, \sqrt {47} \arctan \left (\frac {1}{47} \, \sqrt {47} {\left (2 \, x - 1\right )}\right ) - 94 \, x - 47 \, \log \left (x^{2} - x + 12\right )\right )} \log \relax (2) + \frac {1}{2} \, {\left (2 \, x^{2} \log \relax (2) - 2 \, x + 23 \, \log \relax (2) + 1\right )} \log \left (-x^{2} + x - 12\right ) + \sqrt {47} \arctan \left (\frac {1}{47} \, \sqrt {47} {\left (2 \, x - 1\right )}\right ) - 2 \, x + \frac {7}{2} \, \log \left (x^{2} - x + 12\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.33, size = 21, normalized size = 1.00 \begin {gather*} \ln \left (-x^2+x-12\right )\,\left (\ln \relax (2)\,x^2-x+4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.20, size = 26, normalized size = 1.24 \begin {gather*} \left (x^{2} \log {\relax (2 )} - x\right ) \log {\left (- x^{2} + x - 12 \right )} + 4 \log {\left (x^{2} - x + 12 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________