Optimal. Leaf size=23 \[ \frac {-x+(-4+x) (3-2 x-\log (-3+x))}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 26, normalized size of antiderivative = 1.13, number of steps used = 9, number of rules used = 7, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.189, Rules used = {1593, 6742, 1620, 2395, 36, 31, 29} \begin {gather*} -2 x-\frac {12}{x}-\log (3-x)+\frac {4 \log (x-3)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 1593
Rule 1620
Rule 2395
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-36+16 x+5 x^2-2 x^3+(12-4 x) \log (-3+x)}{(-3+x) x^2} \, dx\\ &=\int \left (\frac {-36+16 x+5 x^2-2 x^3}{(-3+x) x^2}-\frac {4 \log (-3+x)}{x^2}\right ) \, dx\\ &=-\left (4 \int \frac {\log (-3+x)}{x^2} \, dx\right )+\int \frac {-36+16 x+5 x^2-2 x^3}{(-3+x) x^2} \, dx\\ &=\frac {4 \log (-3+x)}{x}-4 \int \frac {1}{(-3+x) x} \, dx+\int \left (-2+\frac {1}{3 (-3+x)}+\frac {12}{x^2}-\frac {4}{3 x}\right ) \, dx\\ &=-\frac {12}{x}-2 x+\frac {1}{3} \log (3-x)+\frac {4 \log (-3+x)}{x}-\frac {4 \log (x)}{3}-\frac {4}{3} \int \frac {1}{-3+x} \, dx+\frac {4}{3} \int \frac {1}{x} \, dx\\ &=-\frac {12}{x}-2 x-\log (3-x)+\frac {4 \log (-3+x)}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 25, normalized size = 1.09 \begin {gather*} -2 x-\log (3-x)-\frac {4 (3-\log (-3+x))}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 20, normalized size = 0.87 \begin {gather*} -\frac {2 \, x^{2} + {\left (x - 4\right )} \log \left (x - 3\right ) + 12}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.56, size = 24, normalized size = 1.04 \begin {gather*} -2 \, x + \frac {4 \, \log \left (x - 3\right )}{x} - \frac {12}{x} - \log \left (x - 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.29, size = 25, normalized size = 1.09
method | result | size |
norman | \(\frac {-12-\ln \left (x -3\right ) x -2 x^{2}+4 \ln \left (x -3\right )}{x}\) | \(25\) |
derivativedivides | \(-\frac {4 \ln \left (x -3\right ) \left (x -3\right )}{3 x}-2 x +6-\frac {12}{x}+\frac {\ln \left (x -3\right )}{3}\) | \(29\) |
default | \(-\frac {4 \ln \left (x -3\right ) \left (x -3\right )}{3 x}-2 x +6-\frac {12}{x}+\frac {\ln \left (x -3\right )}{3}\) | \(29\) |
risch | \(\frac {4 \ln \left (x -3\right )}{x}-\frac {\ln \left (x -3\right ) x +2 x^{2}+12}{x}\) | \(29\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.90, size = 34, normalized size = 1.48 \begin {gather*} -\frac {2 \, x^{2} - {\left (3 \, x + 4\right )} \log \left (x - 3\right )}{x} - \frac {12}{x} - 4 \, \log \left (x - 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.54, size = 22, normalized size = 0.96 \begin {gather*} \frac {4\,\ln \left (x-3\right )-12}{x}-\ln \left (x-3\right )-2\,x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 19, normalized size = 0.83 \begin {gather*} - 2 x - \log {\left (x - 3 \right )} + \frac {4 \log {\left (x - 3 \right )}}{x} - \frac {12}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________