Optimal. Leaf size=32 \[ \frac {2+4 \left (x+\log \left (\frac {3+\frac {x^2}{(2+x)^2}}{3+x}\right )\right )}{1-x} \]
________________________________________________________________________________________
Rubi [A] time = 5.39, antiderivative size = 40, normalized size of antiderivative = 1.25, number of steps used = 40, number of rules used = 8, integrand size = 99, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {6741, 6742, 6728, 634, 618, 204, 628, 2525} \begin {gather*} \frac {4 \log \left (\frac {4 \left (x^2+3 x+3\right )}{(x+2)^2 (x+3)}\right )}{1-x}+\frac {6}{1-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 628
Rule 634
Rule 2525
Rule 6728
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {84+198 x+152 x^2+60 x^3+10 x^4+\left (72+132 x+96 x^2+32 x^3+4 x^4\right ) \log \left (\frac {12+12 x+4 x^2}{12+16 x+7 x^2+x^3}\right )}{(1-x)^2 \left (18+33 x+24 x^2+8 x^3+x^4\right )} \, dx\\ &=\int \left (\frac {84}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )}+\frac {198 x}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )}+\frac {152 x^2}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )}+\frac {60 x^3}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )}+\frac {10 x^4}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )}+\frac {4 \log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{(-1+x)^2}\right ) \, dx\\ &=4 \int \frac {\log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{(-1+x)^2} \, dx+10 \int \frac {x^4}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )} \, dx+60 \int \frac {x^3}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )} \, dx+84 \int \frac {1}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )} \, dx+152 \int \frac {x^2}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )} \, dx+198 \int \frac {x}{(-1+x)^2 (2+x) (3+x) \left (3+3 x+x^2\right )} \, dx\\ &=\frac {4 \log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{1-x}+4 \int \frac {6+6 x+4 x^2+x^3}{(1-x) (2+x) (3+x) \left (3+3 x+x^2\right )} \, dx+10 \int \left (\frac {1}{84 (-1+x)^2}+\frac {227}{7056 (-1+x)}+\frac {16}{9 (2+x)}-\frac {27}{16 (3+x)}-\frac {3 (15+2 x)}{49 \left (3+3 x+x^2\right )}\right ) \, dx+60 \int \left (\frac {1}{84 (-1+x)^2}+\frac {143}{7056 (-1+x)}-\frac {8}{9 (2+x)}+\frac {9}{16 (3+x)}+\frac {3 (13+5 x)}{49 \left (3+3 x+x^2\right )}\right ) \, dx+84 \int \left (\frac {1}{84 (-1+x)^2}-\frac {109}{7056 (-1+x)}+\frac {1}{9 (2+x)}-\frac {1}{48 (3+x)}+\frac {-9-11 x}{147 \left (3+3 x+x^2\right )}\right ) \, dx+152 \int \left (\frac {1}{84 (-1+x)^2}+\frac {59}{7056 (-1+x)}+\frac {4}{9 (2+x)}-\frac {3}{16 (3+x)}+\frac {-24-13 x}{49 \left (3+3 x+x^2\right )}\right ) \, dx+198 \int \left (\frac {1}{84 (-1+x)^2}-\frac {25}{7056 (-1+x)}-\frac {2}{9 (2+x)}+\frac {1}{16 (3+x)}+\frac {11+8 x}{49 \left (3+3 x+x^2\right )}\right ) \, dx\\ &=\frac {6}{1-x}+\frac {17}{21} \log (1-x)-\frac {8}{3} \log (2+x)-\log (3+x)+\frac {4 \log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{1-x}+\frac {4}{7} \int \frac {-9-11 x}{3+3 x+x^2} \, dx-\frac {30}{49} \int \frac {15+2 x}{3+3 x+x^2} \, dx+\frac {152}{49} \int \frac {-24-13 x}{3+3 x+x^2} \, dx+\frac {180}{49} \int \frac {13+5 x}{3+3 x+x^2} \, dx+4 \int \left (-\frac {17}{84 (-1+x)}+\frac {2}{3 (2+x)}+\frac {1}{4 (3+x)}+\frac {-6-5 x}{7 \left (3+3 x+x^2\right )}\right ) \, dx+\frac {198}{49} \int \frac {11+8 x}{3+3 x+x^2} \, dx\\ &=\frac {6}{1-x}+\frac {4 \log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{1-x}+\frac {4}{7} \int \frac {-6-5 x}{3+3 x+x^2} \, dx-\frac {30}{49} \int \frac {3+2 x}{3+3 x+x^2} \, dx-\frac {22}{7} \int \frac {3+2 x}{3+3 x+x^2} \, dx-\frac {198}{49} \int \frac {1}{3+3 x+x^2} \, dx+\frac {30}{7} \int \frac {1}{3+3 x+x^2} \, dx-\frac {360}{49} \int \frac {1}{3+3 x+x^2} \, dx+\frac {450}{49} \int \frac {3+2 x}{3+3 x+x^2} \, dx-\frac {684}{49} \int \frac {1}{3+3 x+x^2} \, dx+\frac {792}{49} \int \frac {3+2 x}{3+3 x+x^2} \, dx-\frac {988}{49} \int \frac {3+2 x}{3+3 x+x^2} \, dx+\frac {990}{49} \int \frac {1}{3+3 x+x^2} \, dx\\ &=\frac {6}{1-x}+\frac {10}{7} \log \left (3+3 x+x^2\right )+\frac {4 \log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{1-x}+\frac {6}{7} \int \frac {1}{3+3 x+x^2} \, dx-\frac {10}{7} \int \frac {3+2 x}{3+3 x+x^2} \, dx+\frac {396}{49} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,3+2 x\right )-\frac {60}{7} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,3+2 x\right )+\frac {720}{49} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,3+2 x\right )+\frac {1368}{49} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,3+2 x\right )-\frac {1980}{49} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,3+2 x\right )\\ &=\frac {6}{1-x}-\frac {4}{7} \sqrt {3} \tan ^{-1}\left (\frac {3+2 x}{\sqrt {3}}\right )+\frac {4 \log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{1-x}-\frac {12}{7} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,3+2 x\right )\\ &=\frac {6}{1-x}+\frac {4 \log \left (\frac {4 \left (3+3 x+x^2\right )}{(2+x)^2 (3+x)}\right )}{1-x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 7.48, size = 8222, normalized size = 256.94 \begin {gather*} \text {Result too large to show} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.35, size = 37, normalized size = 1.16 \begin {gather*} -\frac {2 \, {\left (2 \, \log \left (\frac {4 \, {\left (x^{2} + 3 \, x + 3\right )}}{x^{3} + 7 \, x^{2} + 16 \, x + 12}\right ) + 3\right )}}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.28, size = 41, normalized size = 1.28 \begin {gather*} -\frac {4 \, \log \left (\frac {4 \, {\left (x^{2} + 3 \, x + 3\right )}}{x^{3} + 7 \, x^{2} + 16 \, x + 12}\right )}{x - 1} - \frac {6}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 38, normalized size = 1.19
method | result | size |
norman | \(\frac {-4 \ln \left (\frac {4 x^{2}+12 x +12}{x^{3}+7 x^{2}+16 x +12}\right )-6}{x -1}\) | \(38\) |
risch | \(-\frac {4 \ln \left (\frac {4 x^{2}+12 x +12}{x^{3}+7 x^{2}+16 x +12}\right )}{x -1}-\frac {6}{x -1}\) | \(43\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 2.61, size = 77, normalized size = 2.41 \begin {gather*} -\frac {6 \, {\left (5 \, x + 9\right )} \log \left (x^{2} + 3 \, x + 3\right ) - 21 \, {\left (x + 3\right )} \log \left (x + 3\right ) - 56 \, {\left (x + 2\right )} \log \left (x + 2\right ) + 168 \, \log \relax (2)}{21 \, {\left (x - 1\right )}} - \frac {6}{x - 1} + \frac {10}{7} \, \log \left (x^{2} + 3 \, x + 3\right ) - \log \left (x + 3\right ) - \frac {8}{3} \, \log \left (x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.98, size = 42, normalized size = 1.31 \begin {gather*} -\frac {6}{x-1}-\frac {4\,\ln \left (\frac {4\,x^2+12\,x+12}{x^3+7\,x^2+16\,x+12}\right )}{x-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.27, size = 36, normalized size = 1.12 \begin {gather*} - \frac {4 \log {\left (\frac {4 x^{2} + 12 x + 12}{x^{3} + 7 x^{2} + 16 x + 12} \right )}}{x - 1} - \frac {6}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________