Optimal. Leaf size=24 \[ \left (\frac {24}{-2+x}-x\right ) \left (\frac {x^2}{4}+\log (-3+x)\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.34, antiderivative size = 51, normalized size of antiderivative = 2.12, number of steps used = 22, number of rules used = 10, integrand size = 63, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.159, Rules used = {6742, 44, 77, 88, 2418, 2389, 2295, 2395, 36, 31} \begin {gather*} -\frac {x^3}{4}+6 x-\frac {24}{2-x}-3 \log (3-x)+(3-x) \log (x-3)-\frac {24 \log (x-3)}{2-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 44
Rule 77
Rule 88
Rule 2295
Rule 2389
Rule 2395
Rule 2418
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {48}{(-3+x) (-2+x)^2}+\frac {92 x}{(-3+x) (-2+x)^2}-\frac {29 x^2}{(-3+x) (-2+x)^2}-\frac {7 x^3}{(-3+x) (-2+x)^2}+\frac {21 x^4}{4 (-3+x) (-2+x)^2}-\frac {3 x^5}{4 (-3+x) (-2+x)^2}-\frac {\left (28-4 x+x^2\right ) \log (-3+x)}{(-2+x)^2}\right ) \, dx\\ &=-\left (\frac {3}{4} \int \frac {x^5}{(-3+x) (-2+x)^2} \, dx\right )+\frac {21}{4} \int \frac {x^4}{(-3+x) (-2+x)^2} \, dx-7 \int \frac {x^3}{(-3+x) (-2+x)^2} \, dx-29 \int \frac {x^2}{(-3+x) (-2+x)^2} \, dx-48 \int \frac {1}{(-3+x) (-2+x)^2} \, dx+92 \int \frac {x}{(-3+x) (-2+x)^2} \, dx-\int \frac {\left (28-4 x+x^2\right ) \log (-3+x)}{(-2+x)^2} \, dx\\ &=-\left (\frac {3}{4} \int \left (33+\frac {243}{-3+x}-\frac {32}{(-2+x)^2}-\frac {112}{-2+x}+7 x+x^2\right ) \, dx\right )+\frac {21}{4} \int \left (7+\frac {81}{-3+x}-\frac {16}{(-2+x)^2}-\frac {48}{-2+x}+x\right ) \, dx-7 \int \left (1+\frac {27}{-3+x}-\frac {8}{(-2+x)^2}-\frac {20}{-2+x}\right ) \, dx-29 \int \left (\frac {9}{-3+x}-\frac {4}{(-2+x)^2}-\frac {8}{-2+x}\right ) \, dx-48 \int \left (\frac {1}{2-x}+\frac {1}{-3+x}-\frac {1}{(-2+x)^2}\right ) \, dx+92 \int \left (\frac {3}{-3+x}-\frac {2}{(-2+x)^2}-\frac {3}{-2+x}\right ) \, dx-\int \left (\log (-3+x)+\frac {24 \log (-3+x)}{(-2+x)^2}\right ) \, dx\\ &=-\frac {24}{2-x}+5 x-\frac {x^3}{4}-24 \log (2-x)+21 \log (3-x)-24 \int \frac {\log (-3+x)}{(-2+x)^2} \, dx-\int \log (-3+x) \, dx\\ &=-\frac {24}{2-x}+5 x-\frac {x^3}{4}-24 \log (2-x)+21 \log (3-x)-\frac {24 \log (-3+x)}{2-x}-24 \int \frac {1}{(-3+x) (-2+x)} \, dx-\operatorname {Subst}(\int \log (x) \, dx,x,-3+x)\\ &=-\frac {24}{2-x}+6 x-\frac {x^3}{4}-24 \log (2-x)+21 \log (3-x)-\frac {24 \log (-3+x)}{2-x}-(-3+x) \log (-3+x)-24 \int \frac {1}{-3+x} \, dx+24 \int \frac {1}{-2+x} \, dx\\ &=-\frac {24}{2-x}+6 x-\frac {x^3}{4}-3 \log (3-x)-\frac {24 \log (-3+x)}{2-x}-(-3+x) \log (-3+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.08, size = 59, normalized size = 2.46 \begin {gather*} \frac {1}{4} \left (24 x-x^3-192 \tanh ^{-1}(5-2 x)-96 \log (2-x)+84 \log (3-x)-4 (-3+x) \log (-3+x)+\frac {96 (1+\log (-3+x))}{-2+x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 39, normalized size = 1.62 \begin {gather*} -\frac {x^{4} - 2 \, x^{3} - 24 \, x^{2} + 4 \, {\left (x^{2} - 2 \, x - 24\right )} \log \left (x - 3\right ) + 48 \, x - 96}{4 \, {\left (x - 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.29, size = 31, normalized size = 1.29 \begin {gather*} -\frac {1}{4} \, x^{3} - {\left (x - \frac {24}{x - 2}\right )} \log \left (x - 3\right ) + 6 \, x + \frac {24}{x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 45, normalized size = 1.88
method | result | size |
norman | \(\frac {28 \ln \left (x -3\right )+6 x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{4}-\ln \left (x -3\right ) x^{2}}{x -2}+2 \ln \left (x -3\right )\) | \(45\) |
risch | \(-\frac {\left (x^{2}-2 x -24\right ) \ln \left (x -3\right )}{x -2}-\frac {x^{4}-2 x^{3}-24 x^{2}+48 x -96}{4 \left (x -2\right )}\) | \(46\) |
derivativedivides | \(-\left (x -3\right ) \ln \left (x -3\right )-\frac {3 x}{4}+\frac {9}{4}-\frac {24 \ln \left (x -3\right ) \left (x -3\right )}{x -2}-\frac {\left (x -3\right )^{3}}{4}-\frac {9 \left (x -3\right )^{2}}{4}+21 \ln \left (x -3\right )+\frac {24}{x -2}\) | \(56\) |
default | \(-\left (x -3\right ) \ln \left (x -3\right )-\frac {3 x}{4}+\frac {9}{4}-\frac {24 \ln \left (x -3\right ) \left (x -3\right )}{x -2}-\frac {\left (x -3\right )^{3}}{4}-\frac {9 \left (x -3\right )^{2}}{4}+21 \ln \left (x -3\right )+\frac {24}{x -2}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.86, size = 53, normalized size = 2.21 \begin {gather*} -\frac {x^{4} - 2 \, x^{3} - 24 \, x^{2} + 4 \, {\left (x^{2} - 50 \, x + 72\right )} \log \left (x - 3\right ) + 48 \, x - 288}{4 \, {\left (x - 2\right )}} - \frac {48}{x - 2} - 48 \, \log \left (x - 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.76, size = 28, normalized size = 1.17 \begin {gather*} \frac {\left (4\,\ln \left (x-3\right )+x^2\right )\,\left (-x^2+2\,x+24\right )}{4\,\left (x-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.20, size = 29, normalized size = 1.21 \begin {gather*} - \frac {x^{3}}{4} + 6 x + \frac {\left (- x^{2} + 2 x + 24\right ) \log {\left (x - 3 \right )}}{x - 2} + \frac {24}{x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________