Optimal. Leaf size=58 \[ \frac {45}{32} \log \left (x^2-4 x+8\right )+\frac {41}{4 (4-x)}-\frac {83}{4 (4-x)^2}-\frac {45}{16} \log (4-x)-\frac {3}{16} \tan ^{-1}\left (1-\frac {x}{2}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1628, 634, 617, 204, 628} \[ \frac {45}{32} \log \left (x^2-4 x+8\right )+\frac {41}{4 (4-x)}-\frac {83}{4 (4-x)^2}-\frac {45}{16} \log (4-x)-\frac {3}{16} \tan ^{-1}\left (1-\frac {x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 617
Rule 628
Rule 634
Rule 1628
Rubi steps
\begin {align*} \int \frac {-20+8 x+5 x^3}{(-4+x)^3 \left (8-4 x+x^2\right )} \, dx &=\int \left (\frac {83}{2 (-4+x)^3}+\frac {41}{4 (-4+x)^2}-\frac {45}{16 (-4+x)}+\frac {3 (-28+15 x)}{16 \left (8-4 x+x^2\right )}\right ) \, dx\\ &=-\frac {83}{4 (4-x)^2}+\frac {41}{4 (4-x)}-\frac {45}{16} \log (4-x)+\frac {3}{16} \int \frac {-28+15 x}{8-4 x+x^2} \, dx\\ &=-\frac {83}{4 (4-x)^2}+\frac {41}{4 (4-x)}-\frac {45}{16} \log (4-x)+\frac {3}{8} \int \frac {1}{8-4 x+x^2} \, dx+\frac {45}{32} \int \frac {-4+2 x}{8-4 x+x^2} \, dx\\ &=-\frac {83}{4 (4-x)^2}+\frac {41}{4 (4-x)}-\frac {45}{16} \log (4-x)+\frac {45}{32} \log \left (8-4 x+x^2\right )+\frac {3}{16} \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {x}{2}\right )\\ &=-\frac {83}{4 (4-x)^2}+\frac {41}{4 (4-x)}-\frac {3}{16} \tan ^{-1}\left (1-\frac {x}{2}\right )-\frac {45}{16} \log (4-x)+\frac {45}{32} \log \left (8-4 x+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 46, normalized size = 0.79 \[ \frac {1}{32} \left (45 \log \left (x^2-4 x+8\right )-\frac {328}{x-4}-\frac {664}{(x-4)^2}-90 \log (x-4)+6 \tan ^{-1}\left (\frac {x-2}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.03, size = 48, normalized size = 0.83 \[ \frac {45}{32} \log \left (x^2-4 x+8\right )+\frac {81-41 x}{4 (x-4)^2}-\frac {45}{16} \log (x-4)-\frac {3}{16} \tan ^{-1}\left (1-\frac {x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.96, size = 66, normalized size = 1.14 \[ \frac {6 \, {\left (x^{2} - 8 \, x + 16\right )} \arctan \left (\frac {1}{2} \, x - 1\right ) + 45 \, {\left (x^{2} - 8 \, x + 16\right )} \log \left (x^{2} - 4 \, x + 8\right ) - 90 \, {\left (x^{2} - 8 \, x + 16\right )} \log \left (x - 4\right ) - 328 \, x + 648}{32 \, {\left (x^{2} - 8 \, x + 16\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.96, size = 39, normalized size = 0.67 \[ -\frac {41 \, x - 81}{4 \, {\left (x - 4\right )}^{2}} + \frac {3}{16} \, \arctan \left (\frac {1}{2} \, x - 1\right ) + \frac {45}{32} \, \log \left (x^{2} - 4 \, x + 8\right ) - \frac {45}{16} \, \log \left ({\left | x - 4 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.43, size = 38, normalized size = 0.66
method | result | size |
risch | \(\frac {-\frac {41 x}{4}+\frac {81}{4}}{\left (-4+x \right )^{2}}+\frac {45 \ln \left (x^{2}-4 x +8\right )}{32}+\frac {3 \arctan \left (-1+\frac {x}{2}\right )}{16}-\frac {45 \ln \left (-4+x \right )}{16}\) | \(38\) |
default | \(\frac {45 \ln \left (x^{2}-4 x +8\right )}{32}+\frac {3 \arctan \left (-1+\frac {x}{2}\right )}{16}-\frac {83}{4 \left (-4+x \right )^{2}}-\frac {41}{4 \left (-4+x \right )}-\frac {45 \ln \left (-4+x \right )}{16}\) | \(41\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.98, size = 43, normalized size = 0.74 \[ -\frac {41 \, x - 81}{4 \, {\left (x^{2} - 8 \, x + 16\right )}} + \frac {3}{16} \, \arctan \left (\frac {1}{2} \, x - 1\right ) + \frac {45}{32} \, \log \left (x^{2} - 4 \, x + 8\right ) - \frac {45}{16} \, \log \left (x - 4\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.20, size = 44, normalized size = 0.76 \[ -\frac {45\,\ln \left (x-4\right )}{16}-\frac {\frac {41\,x}{4}-\frac {81}{4}}{x^2-8\,x+16}+\ln \left (x-2-2{}\mathrm {i}\right )\,\left (\frac {45}{32}-\frac {3}{32}{}\mathrm {i}\right )+\ln \left (x-2+2{}\mathrm {i}\right )\,\left (\frac {45}{32}+\frac {3}{32}{}\mathrm {i}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.20, size = 46, normalized size = 0.79 \[ \frac {81 - 41 x}{4 x^{2} - 32 x + 64} - \frac {45 \log {\left (x - 4 \right )}}{16} + \frac {45 \log {\left (x^{2} - 4 x + 8 \right )}}{32} + \frac {3 \operatorname {atan}{\left (\frac {x}{2} - 1 \right )}}{16} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________