Optimal. Leaf size=58 \[ -\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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, 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 = {1642, 648, 631,
210, 642} \begin {gather*} -\frac {3}{16} \text {ArcTan}\left (1-\frac {x}{2}\right )+\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) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 631
Rule 642
Rule 648
Rule 1642
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} \text {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.02, size = 46, normalized size = 0.79 \begin {gather*} \frac {1}{32} \left (-\frac {664}{(-4+x)^2}-\frac {328}{-4+x}+6 \tan ^{-1}\left (\frac {1}{2} (-2+x)\right )-90 \log (-4+x)+45 \log \left (8-4 x+x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 41, normalized size = 0.71
method | result | size |
risch | \(\frac {-\frac {41 x}{4}+\frac {81}{4}}{\left (x -4\right )^{2}}-\frac {45 \ln \left (x -4\right )}{16}+\frac {45 \ln \left (x^{2}-4 x +8\right )}{32}+\frac {3 \arctan \left (-1+\frac {x}{2}\right )}{16}\) | \(38\) |
default | \(-\frac {83}{4 \left (x -4\right )^{2}}-\frac {41}{4 \left (x -4\right )}-\frac {45 \ln \left (x -4\right )}{16}+\frac {45 \ln \left (x^{2}-4 x +8\right )}{32}+\frac {3 \arctan \left (-1+\frac {x}{2}\right )}{16}\) | \(41\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.71, size = 43, normalized size = 0.74 \begin {gather*} -\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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.48, size = 66, normalized size = 1.14 \begin {gather*} \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 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 46, normalized size = 0.79 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.94, size = 39, normalized size = 0.67 \begin {gather*} -\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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.20, size = 44, normalized size = 0.76 \begin {gather*} -\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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________