Optimal. Leaf size=25 \[ \frac {-2-\log (6)+\log (1+2 (-4+x)+x)}{(-1+x)^2+x} \]
________________________________________________________________________________________
Rubi [C] time = 1.22, antiderivative size = 486, normalized size of antiderivative = 19.44, number of steps used = 59, number of rules used = 18, integrand size = 68, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.265, Rules used = {6741, 6742, 740, 800, 634, 618, 204, 628, 822, 1646, 629, 2418, 2395, 36, 31, 2394, 2393, 2391} \begin {gather*} \frac {17 (10-11 x)}{111 \left (x^2-x+1\right )}-\frac {11-x}{3 \left (x^2-x+1\right )}+\frac {5 (10 x+1)}{37 \left (x^2-x+1\right )}-\frac {9}{74} \log \left (x^2-x+1\right )-\frac {\log (6)}{x^2-x+1}+\frac {2 \left (-\sqrt {3}+i\right ) \log (7-3 x)}{3 \sqrt {3}+11 i}+\frac {2 \left (\sqrt {3}+i\right ) \log (7-3 x)}{-3 \sqrt {3}+11 i}-\frac {2 \log (7-3 x)}{11+3 i \sqrt {3}}-\frac {2 \log (7-3 x)}{11-3 i \sqrt {3}}+\frac {9}{37} \log (7-3 x)-\frac {2 \left (\sqrt {3}+i\right ) \log \left (-2 x-i \sqrt {3}+1\right )}{-3 \sqrt {3}+11 i}+\frac {2 \log \left (-2 x-i \sqrt {3}+1\right )}{11+3 i \sqrt {3}}-\frac {2 \left (-\sqrt {3}+i\right ) \log \left (-2 x+i \sqrt {3}+1\right )}{3 \sqrt {3}+11 i}+\frac {2 \log \left (-2 x+i \sqrt {3}+1\right )}{11-3 i \sqrt {3}}+\frac {2 \left (1-i \sqrt {3}\right ) \log (3 x-7)}{3 \left (-2 x-i \sqrt {3}+1\right )}-\frac {2 \log (3 x-7)}{3 \left (-2 x-i \sqrt {3}+1\right )}+\frac {2 \left (1+i \sqrt {3}\right ) \log (3 x-7)}{3 \left (-2 x+i \sqrt {3}+1\right )}-\frac {2 \log (3 x-7)}{3 \left (-2 x+i \sqrt {3}+1\right )}+\frac {11}{37} \sqrt {3} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 204
Rule 618
Rule 628
Rule 629
Rule 634
Rule 740
Rule 800
Rule 822
Rule 1646
Rule 2391
Rule 2393
Rule 2394
Rule 2395
Rule 2418
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-17+37 x-15 x^2-\left (7-17 x+6 x^2\right ) \log (6)-\left (-7+17 x-6 x^2\right ) \log (-7+3 x)}{(7-3 x) \left (1-x+x^2\right )^2} \, dx\\ &=\int \left (\frac {17}{(-7+3 x) \left (1-x+x^2\right )^2}-\frac {37 x}{(-7+3 x) \left (1-x+x^2\right )^2}+\frac {15 x^2}{(-7+3 x) \left (1-x+x^2\right )^2}+\frac {(-1+2 x) \log (6)}{\left (1-x+x^2\right )^2}-\frac {(-1+2 x) \log (-7+3 x)}{\left (1-x+x^2\right )^2}\right ) \, dx\\ &=15 \int \frac {x^2}{(-7+3 x) \left (1-x+x^2\right )^2} \, dx+17 \int \frac {1}{(-7+3 x) \left (1-x+x^2\right )^2} \, dx-37 \int \frac {x}{(-7+3 x) \left (1-x+x^2\right )^2} \, dx+\log (6) \int \frac {-1+2 x}{\left (1-x+x^2\right )^2} \, dx-\int \frac {(-1+2 x) \log (-7+3 x)}{\left (1-x+x^2\right )^2} \, dx\\ &=\frac {17 (10-11 x)}{111 \left (1-x+x^2\right )}-\frac {11-x}{3 \left (1-x+x^2\right )}+\frac {5 (1+10 x)}{37 \left (1-x+x^2\right )}-\frac {\log (6)}{1-x+x^2}+\frac {17}{111} \int \frac {104-33 x}{(-7+3 x) \left (1-x+x^2\right )} \, dx-\frac {1}{3} \int \frac {70-3 x}{(-7+3 x) \left (1-x+x^2\right )} \, dx+5 \int \frac {\frac {77}{37}+\frac {30 x}{37}}{(-7+3 x) \left (1-x+x^2\right )} \, dx-\int \left (-\frac {\log (-7+3 x)}{\left (1-x+x^2\right )^2}+\frac {2 x \log (-7+3 x)}{\left (1-x+x^2\right )^2}\right ) \, dx\\ &=\frac {17 (10-11 x)}{111 \left (1-x+x^2\right )}-\frac {11-x}{3 \left (1-x+x^2\right )}+\frac {5 (1+10 x)}{37 \left (1-x+x^2\right )}-\frac {\log (6)}{1-x+x^2}+\frac {17}{111} \int \left (\frac {243}{37 (-7+3 x)}+\frac {-515-81 x}{37 \left (1-x+x^2\right )}\right ) \, dx-\frac {1}{3} \int \left (\frac {567}{37 (-7+3 x)}+\frac {-289-189 x}{37 \left (1-x+x^2\right )}\right ) \, dx-2 \int \frac {x \log (-7+3 x)}{\left (1-x+x^2\right )^2} \, dx+5 \int \left (\frac {1323}{1369 (-7+3 x)}+\frac {-218-441 x}{1369 \left (1-x+x^2\right )}\right ) \, dx+\int \frac {\log (-7+3 x)}{\left (1-x+x^2\right )^2} \, dx\\ &=\frac {17 (10-11 x)}{111 \left (1-x+x^2\right )}-\frac {11-x}{3 \left (1-x+x^2\right )}+\frac {5 (1+10 x)}{37 \left (1-x+x^2\right )}-\frac {\log (6)}{1-x+x^2}+\frac {9}{37} \log (7-3 x)+\frac {5 \int \frac {-218-441 x}{1-x+x^2} \, dx}{1369}+\frac {17 \int \frac {-515-81 x}{1-x+x^2} \, dx}{4107}-\frac {1}{111} \int \frac {-289-189 x}{1-x+x^2} \, dx-2 \int \left (-\frac {2 \left (1+i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )^2}+\frac {2 i \log (-7+3 x)}{3 \sqrt {3} \left (1+i \sqrt {3}-2 x\right )}-\frac {2 \left (1-i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (-1+i \sqrt {3}+2 x\right )^2}+\frac {2 i \log (-7+3 x)}{3 \sqrt {3} \left (-1+i \sqrt {3}+2 x\right )}\right ) \, dx+\int \left (-\frac {4 \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )^2}+\frac {4 i \log (-7+3 x)}{3 \sqrt {3} \left (1+i \sqrt {3}-2 x\right )}-\frac {4 \log (-7+3 x)}{3 \left (-1+i \sqrt {3}+2 x\right )^2}+\frac {4 i \log (-7+3 x)}{3 \sqrt {3} \left (-1+i \sqrt {3}+2 x\right )}\right ) \, dx\\ &=\frac {17 (10-11 x)}{111 \left (1-x+x^2\right )}-\frac {11-x}{3 \left (1-x+x^2\right )}+\frac {5 (1+10 x)}{37 \left (1-x+x^2\right )}-\frac {\log (6)}{1-x+x^2}+\frac {9}{37} \log (7-3 x)-\frac {459 \int \frac {-1+2 x}{1-x+x^2} \, dx}{2738}-\frac {2205 \int \frac {-1+2 x}{1-x+x^2} \, dx}{2738}+\frac {63}{74} \int \frac {-1+2 x}{1-x+x^2} \, dx-\frac {4}{3} \int \frac {\log (-7+3 x)}{\left (1+i \sqrt {3}-2 x\right )^2} \, dx-\frac {4}{3} \int \frac {\log (-7+3 x)}{\left (-1+i \sqrt {3}+2 x\right )^2} \, dx-\frac {4385 \int \frac {1}{1-x+x^2} \, dx}{2738}-\frac {18887 \int \frac {1}{1-x+x^2} \, dx}{8214}+\frac {767}{222} \int \frac {1}{1-x+x^2} \, dx+\frac {1}{3} \left (4 \left (1-i \sqrt {3}\right )\right ) \int \frac {\log (-7+3 x)}{\left (-1+i \sqrt {3}+2 x\right )^2} \, dx+\frac {1}{3} \left (4 \left (1+i \sqrt {3}\right )\right ) \int \frac {\log (-7+3 x)}{\left (1+i \sqrt {3}-2 x\right )^2} \, dx\\ &=\frac {17 (10-11 x)}{111 \left (1-x+x^2\right )}-\frac {11-x}{3 \left (1-x+x^2\right )}+\frac {5 (1+10 x)}{37 \left (1-x+x^2\right )}-\frac {\log (6)}{1-x+x^2}+\frac {9}{37} \log (7-3 x)-\frac {2 \log (-7+3 x)}{3 \left (1-i \sqrt {3}-2 x\right )}+\frac {2 \left (1-i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (1-i \sqrt {3}-2 x\right )}-\frac {2 \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )}+\frac {2 \left (1+i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )}-\frac {9}{74} \log \left (1-x+x^2\right )+2 \int \frac {1}{\left (1+i \sqrt {3}-2 x\right ) (-7+3 x)} \, dx-2 \int \frac {1}{\left (-1+i \sqrt {3}+2 x\right ) (-7+3 x)} \, dx+\frac {4385 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right )}{1369}+\frac {18887 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right )}{4107}-\frac {767}{111} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right )+\left (2 \left (1-i \sqrt {3}\right )\right ) \int \frac {1}{\left (-1+i \sqrt {3}+2 x\right ) (-7+3 x)} \, dx-\left (2 \left (1+i \sqrt {3}\right )\right ) \int \frac {1}{\left (1+i \sqrt {3}-2 x\right ) (-7+3 x)} \, dx\\ &=\frac {17 (10-11 x)}{111 \left (1-x+x^2\right )}-\frac {11-x}{3 \left (1-x+x^2\right )}+\frac {5 (1+10 x)}{37 \left (1-x+x^2\right )}+\frac {11}{37} \sqrt {3} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )-\frac {\log (6)}{1-x+x^2}+\frac {9}{37} \log (7-3 x)-\frac {2 \log (-7+3 x)}{3 \left (1-i \sqrt {3}-2 x\right )}+\frac {2 \left (1-i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (1-i \sqrt {3}-2 x\right )}-\frac {2 \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )}+\frac {2 \left (1+i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )}-\frac {9}{74} \log \left (1-x+x^2\right )-\frac {4 \int \frac {1}{1+i \sqrt {3}-2 x} \, dx}{11-3 i \sqrt {3}}-\frac {6 \int \frac {1}{-7+3 x} \, dx}{11-3 i \sqrt {3}}+\frac {4 \int \frac {1}{-1+i \sqrt {3}+2 x} \, dx}{11+3 i \sqrt {3}}-\frac {6 \int \frac {1}{-7+3 x} \, dx}{11+3 i \sqrt {3}}-\frac {\left (4 \left (i+\sqrt {3}\right )\right ) \int \frac {1}{-1+i \sqrt {3}+2 x} \, dx}{11 i-3 \sqrt {3}}+\frac {\left (6 \left (i+\sqrt {3}\right )\right ) \int \frac {1}{-7+3 x} \, dx}{11 i-3 \sqrt {3}}+\frac {\left (4 \left (i-\sqrt {3}\right )\right ) \int \frac {1}{1+i \sqrt {3}-2 x} \, dx}{11 i+3 \sqrt {3}}+\frac {\left (6 \left (i-\sqrt {3}\right )\right ) \int \frac {1}{-7+3 x} \, dx}{11 i+3 \sqrt {3}}\\ &=\frac {17 (10-11 x)}{111 \left (1-x+x^2\right )}-\frac {11-x}{3 \left (1-x+x^2\right )}+\frac {5 (1+10 x)}{37 \left (1-x+x^2\right )}+\frac {11}{37} \sqrt {3} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )-\frac {\log (6)}{1-x+x^2}+\frac {9}{37} \log (7-3 x)-\frac {2 \log (7-3 x)}{11-3 i \sqrt {3}}-\frac {2 \log (7-3 x)}{11+3 i \sqrt {3}}+\frac {2 \left (i+\sqrt {3}\right ) \log (7-3 x)}{11 i-3 \sqrt {3}}+\frac {2 \left (i-\sqrt {3}\right ) \log (7-3 x)}{11 i+3 \sqrt {3}}+\frac {2 \log \left (1-i \sqrt {3}-2 x\right )}{11+3 i \sqrt {3}}-\frac {2 \left (i+\sqrt {3}\right ) \log \left (1-i \sqrt {3}-2 x\right )}{11 i-3 \sqrt {3}}+\frac {2 \log \left (1+i \sqrt {3}-2 x\right )}{11-3 i \sqrt {3}}-\frac {2 \left (i-\sqrt {3}\right ) \log \left (1+i \sqrt {3}-2 x\right )}{11 i+3 \sqrt {3}}-\frac {2 \log (-7+3 x)}{3 \left (1-i \sqrt {3}-2 x\right )}+\frac {2 \left (1-i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (1-i \sqrt {3}-2 x\right )}-\frac {2 \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )}+\frac {2 \left (1+i \sqrt {3}\right ) \log (-7+3 x)}{3 \left (1+i \sqrt {3}-2 x\right )}-\frac {9}{74} \log \left (1-x+x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.38, size = 32, normalized size = 1.28 \begin {gather*} \frac {-222-257 \log (6)+73 \log (36)+111 \log (-7+3 x)}{111 \left (1-x+x^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 24, normalized size = 0.96 \begin {gather*} -\frac {\log \relax (6) - \log \left (3 \, x - 7\right ) + 2}{x^{2} - x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 34, normalized size = 1.36 \begin {gather*} -\frac {\log \relax (6) + 2}{x^{2} - x + 1} + \frac {\log \left (3 \, x - 7\right )}{x^{2} - x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 24, normalized size = 0.96
method | result | size |
norman | \(\frac {\ln \left (3 x -7\right )-\ln \relax (6)-2}{x^{2}-x +1}\) | \(24\) |
risch | \(\frac {\ln \left (3 x -7\right )}{x^{2}-x +1}-\frac {\ln \relax (3)}{x^{2}-x +1}-\frac {\ln \relax (2)}{x^{2}-x +1}-\frac {2}{x^{2}-x +1}\) | \(59\) |
derivativedivides | \(-\frac {9 \ln \relax (6)}{\left (3 x -7\right )^{2}+33 x -40}-\frac {9 \ln \left (3 x -7\right ) \left (3 x -7\right ) \left (4+3 x \right )}{37 \left (\left (3 x -7\right )^{2}+33 x -40\right )}-\frac {18}{\left (3 x -7\right )^{2}+33 x -40}+\frac {9 \ln \left (3 x -7\right )}{37}\) | \(76\) |
default | \(-\frac {9 \ln \relax (6)}{\left (3 x -7\right )^{2}+33 x -40}-\frac {9 \ln \left (3 x -7\right ) \left (3 x -7\right ) \left (4+3 x \right )}{37 \left (\left (3 x -7\right )^{2}+33 x -40\right )}-\frac {18}{\left (3 x -7\right )^{2}+33 x -40}+\frac {9 \ln \left (3 x -7\right )}{37}\) | \(76\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.65, size = 255, normalized size = 10.20 \begin {gather*} -\frac {7}{24642} \, {\left (2222 \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {222 \, {\left (11 \, x - 10\right )}}{x^{2} - x + 1} + 243 \, \log \left (x^{2} - x + 1\right ) - 486 \, \log \left (3 \, x - 7\right )\right )} \log \relax (6) - \frac {1}{4107} \, {\left (1754 \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) - \frac {222 \, {\left (10 \, x + 1\right )}}{x^{2} - x + 1} + 1323 \, \log \left (x^{2} - x + 1\right ) - 2646 \, \log \left (3 \, x - 7\right )\right )} \log \relax (6) + \frac {17}{24642} \, {\left (1534 \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {222 \, {\left (x - 11\right )}}{x^{2} - x + 1} + 567 \, \log \left (x^{2} - x + 1\right ) - 1134 \, \log \left (3 \, x - 7\right )\right )} \log \relax (6) - \frac {{\left (9 \, x^{2} - 9 \, x - 28\right )} \log \left (3 \, x - 7\right )}{37 \, {\left (x^{2} - x + 1\right )}} - \frac {17 \, {\left (11 \, x - 10\right )}}{111 \, {\left (x^{2} - x + 1\right )}} + \frac {5 \, {\left (10 \, x + 1\right )}}{37 \, {\left (x^{2} - x + 1\right )}} + \frac {x - 11}{3 \, {\left (x^{2} - x + 1\right )}} + \frac {9}{37} \, \log \left (3 \, x - 7\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.28, size = 19, normalized size = 0.76 \begin {gather*} \frac {\ln \left (\frac {x}{2}-\frac {7}{6}\right )-2}{x^2-x+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.31, size = 26, normalized size = 1.04 \begin {gather*} \frac {\log {\left (3 x - 7 \right )}}{x^{2} - x + 1} + \frac {-2 - \log {\relax (6 )}}{x^{2} - x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________