Optimal. Leaf size=33 \[ -\frac {(2+x)^2 \left (3+x^2\right )}{x}+\frac {x-\frac {\log (x)}{x}}{4-x} \]
________________________________________________________________________________________
Rubi [A] time = 0.48, antiderivative size = 57, normalized size of antiderivative = 1.73, number of steps used = 21, number of rules used = 9, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.164, Rules used = {1594, 27, 6742, 44, 43, 2357, 2314, 31, 2304} \begin {gather*} -x^3-4 x^2-7 x+\frac {4}{4-x}-\frac {12}{x}-\frac {x \log (x)}{16 (4-x)}-\frac {\log (x)}{16}-\frac {\log (x)}{4 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 31
Rule 43
Rule 44
Rule 1594
Rule 2304
Rule 2314
Rule 2357
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {188-95 x-96 x^2-72 x^3+9 x^4+16 x^5-3 x^6+(4-2 x) \log (x)}{x^2 \left (16-8 x+x^2\right )} \, dx\\ &=\int \frac {188-95 x-96 x^2-72 x^3+9 x^4+16 x^5-3 x^6+(4-2 x) \log (x)}{(-4+x)^2 x^2} \, dx\\ &=\int \left (-\frac {96}{(-4+x)^2}+\frac {188}{(-4+x)^2 x^2}-\frac {95}{(-4+x)^2 x}-\frac {72 x}{(-4+x)^2}+\frac {9 x^2}{(-4+x)^2}+\frac {16 x^3}{(-4+x)^2}-\frac {3 x^4}{(-4+x)^2}-\frac {2 (-2+x) \log (x)}{(-4+x)^2 x^2}\right ) \, dx\\ &=-\frac {96}{4-x}-2 \int \frac {(-2+x) \log (x)}{(-4+x)^2 x^2} \, dx-3 \int \frac {x^4}{(-4+x)^2} \, dx+9 \int \frac {x^2}{(-4+x)^2} \, dx+16 \int \frac {x^3}{(-4+x)^2} \, dx-72 \int \frac {x}{(-4+x)^2} \, dx-95 \int \frac {1}{(-4+x)^2 x} \, dx+188 \int \frac {1}{(-4+x)^2 x^2} \, dx\\ &=-\frac {96}{4-x}-2 \int \left (\frac {\log (x)}{8 (-4+x)^2}-\frac {\log (x)}{8 x^2}\right ) \, dx-3 \int \left (48+\frac {256}{(-4+x)^2}+\frac {256}{-4+x}+8 x+x^2\right ) \, dx+9 \int \left (1+\frac {16}{(-4+x)^2}+\frac {8}{-4+x}\right ) \, dx+16 \int \left (8+\frac {64}{(-4+x)^2}+\frac {48}{-4+x}+x\right ) \, dx-72 \int \left (\frac {4}{(-4+x)^2}+\frac {1}{-4+x}\right ) \, dx-95 \int \left (\frac {1}{4 (-4+x)^2}-\frac {1}{16 (-4+x)}+\frac {1}{16 x}\right ) \, dx+188 \int \left (\frac {1}{16 (-4+x)^2}-\frac {1}{32 (-4+x)}+\frac {1}{16 x^2}+\frac {1}{32 x}\right ) \, dx\\ &=\frac {4}{4-x}-\frac {47}{4 x}-7 x-4 x^2-x^3+\frac {1}{16} \log (4-x)-\frac {\log (x)}{16}-\frac {1}{4} \int \frac {\log (x)}{(-4+x)^2} \, dx+\frac {1}{4} \int \frac {\log (x)}{x^2} \, dx\\ &=\frac {4}{4-x}-\frac {12}{x}-7 x-4 x^2-x^3+\frac {1}{16} \log (4-x)-\frac {\log (x)}{16}-\frac {\log (x)}{4 x}-\frac {x \log (x)}{16 (4-x)}-\frac {1}{16} \int \frac {1}{-4+x} \, dx\\ &=\frac {4}{4-x}-\frac {12}{x}-7 x-4 x^2-x^3-\frac {\log (x)}{16}-\frac {\log (x)}{4 x}-\frac {x \log (x)}{16 (4-x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 31, normalized size = 0.94 \begin {gather*} \frac {48-16 x+28 x^2+9 x^3-x^5+\log (x)}{(-4+x) x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 33, normalized size = 1.00 \begin {gather*} -\frac {x^{5} - 9 \, x^{3} - 28 \, x^{2} + 16 \, x - \log \relax (x) - 48}{x^{2} - 4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 41, normalized size = 1.24 \begin {gather*} -x^{3} - 4 \, x^{2} + \frac {1}{4} \, {\left (\frac {1}{x - 4} - \frac {1}{x}\right )} \log \relax (x) - 7 \, x - \frac {4}{x - 4} - \frac {12}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 27, normalized size = 0.82
method | result | size |
norman | \(\frac {48+96 x +9 x^{3}-x^{5}+\ln \relax (x )}{\left (x -4\right ) x}\) | \(27\) |
risch | \(\frac {\ln \relax (x )}{\left (x -4\right ) x}-\frac {x^{5}-9 x^{3}-28 x^{2}+16 x -48}{\left (x -4\right ) x}\) | \(41\) |
default | \(-x^{3}-4 x^{2}-7 x -\frac {4}{x -4}-\frac {12}{x}-\frac {\ln \relax (x )}{16}-\frac {\ln \relax (x )}{4 x}+\frac {x \ln \relax (x )}{16 x -64}\) | \(48\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.46, size = 66, normalized size = 2.00 \begin {gather*} -x^{3} - 4 \, x^{2} - 7 \, x + \frac {{\left (x^{2} - 4 \, x + 16\right )} \log \relax (x) - 4 \, x + 16}{16 \, {\left (x^{2} - 4 \, x\right )}} - \frac {47 \, {\left (x - 2\right )}}{2 \, {\left (x^{2} - 4 \, x\right )}} + \frac {31}{4 \, {\left (x - 4\right )}} - \frac {1}{16} \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.29, size = 38, normalized size = 1.15 \begin {gather*} -\frac {48\,x+x\,\ln \relax (x)+24\,x^3+9\,x^4-x^6}{4\,x^2-x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 32, normalized size = 0.97 \begin {gather*} - x^{3} - 4 x^{2} - 7 x - \frac {16 x - 48}{x^{2} - 4 x} + \frac {\log {\relax (x )}}{x^{2} - 4 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________