Optimal. Leaf size=26 \[ \frac {x (7+(-x+\log (x)) \log (2+(-3+x) x))}{\frac {1}{2}+x} \]
________________________________________________________________________________________
Rubi [B] time = 1.55, antiderivative size = 111, normalized size of antiderivative = 4.27, number of steps used = 69, number of rules used = 25, integrand size = 103, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.243, Rules used = {6742, 72, 148, 180, 2357, 2316, 2315, 2317, 2391, 697, 2314, 31, 2525, 2074, 2528, 2523, 773, 632, 2524, 2418, 2394, 2393, 32, 2557, 12} \begin {gather*} -x \log \left (x^2-3 x+2\right )-\frac {\log (x) \log \left (x^2-3 x+2\right )}{2 x+1}+\log (x) \log \left (x^2-3 x+2\right )-\frac {\log \left (x^2-3 x+2\right )}{2 (2 x+1)}-\frac {7}{2 x+1}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (x-2)-\log (2) \log (2 x-4) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 32
Rule 72
Rule 148
Rule 180
Rule 632
Rule 697
Rule 773
Rule 2074
Rule 2314
Rule 2315
Rule 2316
Rule 2317
Rule 2357
Rule 2391
Rule 2393
Rule 2394
Rule 2418
Rule 2523
Rule 2524
Rule 2525
Rule 2528
Rule 2557
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {28}{(-2+x) (-1+x) (1+2 x)^2}-\frac {42 x}{(-2+x) (-1+x) (1+2 x)^2}+\frac {20 x^2}{(-2+x) (-1+x) (1+2 x)^2}+\frac {8 x^3}{(-2+x) (-1+x) (1+2 x)^2}-\frac {8 x^4}{(-2+x) (-1+x) (1+2 x)^2}+\frac {2 x (-3+2 x) \log (x)}{(-2+x) (-1+x) (1+2 x)}-\frac {2 \left (-1+2 x^2-\log (x)\right ) \log \left (2-3 x+x^2\right )}{(1+2 x)^2}\right ) \, dx\\ &=2 \int \frac {x (-3+2 x) \log (x)}{(-2+x) (-1+x) (1+2 x)} \, dx-2 \int \frac {\left (-1+2 x^2-\log (x)\right ) \log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx+8 \int \frac {x^3}{(-2+x) (-1+x) (1+2 x)^2} \, dx-8 \int \frac {x^4}{(-2+x) (-1+x) (1+2 x)^2} \, dx+20 \int \frac {x^2}{(-2+x) (-1+x) (1+2 x)^2} \, dx+28 \int \frac {1}{(-2+x) (-1+x) (1+2 x)^2} \, dx-42 \int \frac {x}{(-2+x) (-1+x) (1+2 x)^2} \, dx\\ &=2 \int \left (\frac {2 \log (x)}{5 (-2+x)}+\frac {\log (x)}{3 (-1+x)}+\frac {8 \log (x)}{15 (1+2 x)}\right ) \, dx-2 \int \left (-\frac {\log \left (2-3 x+x^2\right )}{(1+2 x)^2}+\frac {2 x^2 \log \left (2-3 x+x^2\right )}{(1+2 x)^2}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{(1+2 x)^2}\right ) \, dx-8 \int \left (\frac {1}{4}+\frac {16}{25 (-2+x)}-\frac {1}{9 (-1+x)}+\frac {1}{60 (1+2 x)^2}-\frac {13}{225 (1+2 x)}\right ) \, dx+8 \int \left (\frac {8}{25 (-2+x)}-\frac {1}{9 (-1+x)}-\frac {1}{30 (1+2 x)^2}+\frac {37}{450 (1+2 x)}\right ) \, dx+20 \int \left (\frac {4}{25 (-2+x)}-\frac {1}{9 (-1+x)}+\frac {1}{15 (1+2 x)^2}-\frac {22}{225 (1+2 x)}\right ) \, dx+28 \int \left (\frac {1}{25 (-2+x)}-\frac {1}{9 (-1+x)}+\frac {4}{15 (1+2 x)^2}+\frac {32}{225 (1+2 x)}\right ) \, dx-42 \int \left (\frac {2}{25 (-2+x)}-\frac {1}{9 (-1+x)}-\frac {2}{15 (1+2 x)^2}+\frac {14}{225 (1+2 x)}\right ) \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {2}{3} \log (1-x)-\frac {8}{5} \log (2-x)+\frac {4}{15} \log (1+2 x)+\frac {2}{3} \int \frac {\log (x)}{-1+x} \, dx+\frac {4}{5} \int \frac {\log (x)}{-2+x} \, dx+\frac {16}{15} \int \frac {\log (x)}{1+2 x} \, dx+2 \int \frac {\log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx+2 \int \frac {\log (x) \log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx-4 \int \frac {x^2 \log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {2}{3} \log (1-x)-\frac {8}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)+\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-\frac {\log \left (2-3 x+x^2\right )}{1+2 x}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\frac {2 \text {Li}_2(1-x)}{3}-\frac {8}{15} \int \frac {\log (1+2 x)}{x} \, dx+\frac {4}{5} \int \frac {\log \left (\frac {x}{2}\right )}{-2+x} \, dx-2 \int \frac {(3-2 x) \log (x)}{2 \left (2+x-5 x^2+2 x^3\right )} \, dx-2 \int \frac {\log \left (2-3 x+x^2\right )}{(-2-4 x) x} \, dx-4 \int \left (\frac {1}{4} \log \left (2-3 x+x^2\right )+\frac {\log \left (2-3 x+x^2\right )}{4 (1+2 x)^2}-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}\right ) \, dx+\int \frac {-3+2 x}{2+x-5 x^2+2 x^3} \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {2}{3} \log (1-x)-\frac {8}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)+\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-\frac {\log \left (2-3 x+x^2\right )}{1+2 x}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\frac {2 \text {Li}_2(1-x)}{3}-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}+2 \int \frac {\log \left (2-3 x+x^2\right )}{1+2 x} \, dx-2 \int \left (-\frac {\log \left (2-3 x+x^2\right )}{2 x}+\frac {\log \left (2-3 x+x^2\right )}{1+2 x}\right ) \, dx+\int \left (\frac {1}{5 (-2+x)}+\frac {1}{3 (-1+x)}-\frac {16}{15 (1+2 x)}\right ) \, dx-\int \frac {(3-2 x) \log (x)}{2+x-5 x^2+2 x^3} \, dx-\int \log \left (2-3 x+x^2\right ) \, dx-\int \frac {\log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {1}{3} \log (1-x)-\frac {7}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)-\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}+\log (1+2 x) \log \left (2-3 x+x^2\right )-\frac {2 \text {Li}_2(1-x)}{3}-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}-\frac {1}{2} \int \frac {-3+2 x}{2+x-5 x^2+2 x^3} \, dx-2 \int \frac {\log \left (2-3 x+x^2\right )}{1+2 x} \, dx+\int \frac {x (-3+2 x)}{2-3 x+x^2} \, dx-\int \left (-\frac {\log (x)}{5 (-2+x)}-\frac {\log (x)}{3 (-1+x)}+\frac {16 \log (x)}{15 (1+2 x)}\right ) \, dx-\int \frac {(-3+2 x) \log (1+2 x)}{2-3 x+x^2} \, dx+\int \frac {\log \left (2-3 x+x^2\right )}{x} \, dx\\ &=-\frac {7}{1+2 x}-\frac {1}{3} \log (1-x)-\frac {7}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)-\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\frac {2 \text {Li}_2(1-x)}{3}-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}+\frac {1}{5} \int \frac {\log (x)}{-2+x} \, dx+\frac {1}{3} \int \frac {\log (x)}{-1+x} \, dx-\frac {1}{2} \int \left (\frac {1}{5 (-2+x)}+\frac {1}{3 (-1+x)}-\frac {16}{15 (1+2 x)}\right ) \, dx-\frac {16}{15} \int \frac {\log (x)}{1+2 x} \, dx+\int \frac {-4+3 x}{2-3 x+x^2} \, dx-\int \frac {(-3+2 x) \log (x)}{2-3 x+x^2} \, dx+\int \frac {(-3+2 x) \log (1+2 x)}{2-3 x+x^2} \, dx-\int \left (\frac {2 \log (1+2 x)}{-4+2 x}+\frac {2 \log (1+2 x)}{-2+2 x}\right ) \, dx\\ &=-\frac {7}{1+2 x}-\frac {1}{2} \log (1-x)-\frac {3}{2} \log (2-x)+\log (2) \log (-2+x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2(1-x)-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}+\frac {1}{5} \int \frac {\log \left (\frac {x}{2}\right )}{-2+x} \, dx+\frac {8}{15} \int \frac {\log (1+2 x)}{x} \, dx+2 \int \frac {1}{-2+x} \, dx-2 \int \frac {\log (1+2 x)}{-4+2 x} \, dx-2 \int \frac {\log (1+2 x)}{-2+2 x} \, dx+\int \frac {1}{-1+x} \, dx-\int \left (\frac {2 \log (x)}{-4+2 x}+\frac {2 \log (x)}{-2+2 x}\right ) \, dx+\int \left (\frac {2 \log (1+2 x)}{-4+2 x}+\frac {2 \log (1+2 x)}{-2+2 x}\right ) \, dx\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log \left (\frac {2 (1-x)}{3}\right ) \log (1+2 x)-\log \left (\frac {2 (2-x)}{5}\right ) \log (1+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2(1-x)-\text {Li}_2\left (1-\frac {x}{2}\right )+2 \int \frac {\log \left (\frac {1}{3} (2-2 x)\right )}{1+2 x} \, dx+2 \int \frac {\log \left (\frac {1}{5} (4-2 x)\right )}{1+2 x} \, dx-2 \int \frac {\log (x)}{-4+2 x} \, dx-2 \int \frac {\log (x)}{-2+2 x} \, dx+2 \int \frac {\log (1+2 x)}{-4+2 x} \, dx+2 \int \frac {\log (1+2 x)}{-2+2 x} \, dx\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log (2) \log (-4+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2\left (1-\frac {x}{2}\right )-2 \int \frac {\log \left (\frac {1}{3} (2-2 x)\right )}{1+2 x} \, dx-2 \int \frac {\log \left (\frac {1}{5} (4-2 x)\right )}{1+2 x} \, dx-2 \int \frac {\log \left (\frac {x}{2}\right )}{-4+2 x} \, dx+\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{3}\right )}{x} \, dx,x,1+2 x\right )+\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{5}\right )}{x} \, dx,x,1+2 x\right )\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log (2) \log (-4+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2\left (\frac {1}{5} (1+2 x)\right )-\text {Li}_2\left (\frac {1}{3} (1+2 x)\right )-\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{3}\right )}{x} \, dx,x,1+2 x\right )-\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{5}\right )}{x} \, dx,x,1+2 x\right )\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log (2) \log (-4+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 28, normalized size = 1.08 \begin {gather*} \frac {-7-2 x (x-\log (x)) \log \left (2-3 x+x^2\right )}{1+2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 31, normalized size = 1.19 \begin {gather*} -\frac {2 \, {\left (x^{2} - x \log \relax (x)\right )} \log \left (x^{2} - 3 \, x + 2\right ) + 7}{2 \, x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 58, normalized size = 2.23 \begin {gather*} -\frac {1}{2} \, {\left (2 \, x + \frac {2 \, \log \relax (x)}{2 \, x + 1} + \frac {1}{2 \, x + 1} - 2 \, \log \relax (x)\right )} \log \left (x^{2} - 3 \, x + 2\right ) - \frac {7}{2 \, x + 1} + \frac {1}{2} \, \log \left (x^{2} - 3 \, x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.05, size = 67, normalized size = 2.58
method | result | size |
risch | \(-\frac {\left (4 x^{2}-4 x \ln \relax (x )+2 x +1\right ) \ln \left (x^{2}-3 x +2\right )}{2 \left (2 x +1\right )}+\frac {2 \ln \left (x^{2}-3 x +2\right ) x +\ln \left (x^{2}-3 x +2\right )-14}{4 x +2}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.39, size = 85, normalized size = 3.27 \begin {gather*} -2 \, x + \frac {24 \, x^{2} - 4 \, {\left (3 \, x^{2} - 3 \, x \log \relax (x) - 2 \, x - 1\right )} \log \left (x - 1\right ) - 3 \, {\left (4 \, x^{2} - 4 \, x \log \relax (x) + 2 \, x + 1\right )} \log \left (x - 2\right ) + 12 \, x}{6 \, {\left (2 \, x + 1\right )}} - \frac {7}{2 \, x + 1} - \frac {2}{3} \, \log \left (x - 1\right ) + \frac {1}{2} \, \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.36, size = 61, normalized size = 2.35 \begin {gather*} \ln \left (x^2-3\,x+2\right )\,\ln \relax (x)-\frac {7}{2\,\left (x+\frac {1}{2}\right )}-\frac {x^2\,\ln \left (x^2-3\,x+2\right )}{x+\frac {1}{2}}-\frac {\ln \left (x^2-3\,x+2\right )\,\ln \relax (x)}{2\,\left (x+\frac {1}{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.71, size = 49, normalized size = 1.88 \begin {gather*} \frac {\log {\left (x^{2} - 3 x + 2 \right )}}{2} + \frac {\left (- 4 x^{2} + 4 x \log {\relax (x )} - 2 x - 1\right ) \log {\left (x^{2} - 3 x + 2 \right )}}{4 x + 2} - \frac {7}{2 x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________