Optimal. Leaf size=36 \[ x+\frac {5+x+3 \left (-\frac {4 \left (-3+\frac {x}{2}\right )}{x}+x^2 \log ^2(2-x)\right )}{x^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 25, normalized size of antiderivative = 0.69, number of steps used = 7, number of rules used = 5, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {1593, 6742, 14, 2390, 2301} \begin {gather*} \frac {36}{x^3}-\frac {1}{x^2}+x+\frac {1}{x}+3 \log ^2(2-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 1593
Rule 2301
Rule 2390
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{(-2+x) x^4} \, dx\\ &=\int \left (\frac {-108+2 x-x^2+x^4}{x^4}+\frac {6 \log (2-x)}{-2+x}\right ) \, dx\\ &=6 \int \frac {\log (2-x)}{-2+x} \, dx+\int \frac {-108+2 x-x^2+x^4}{x^4} \, dx\\ &=6 \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,2-x\right )+\int \left (1-\frac {108}{x^4}+\frac {2}{x^3}-\frac {1}{x^2}\right ) \, dx\\ &=\frac {36}{x^3}-\frac {1}{x^2}+\frac {1}{x}+x+3 \log ^2(2-x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 25, normalized size = 0.69 \begin {gather*} \frac {36}{x^3}-\frac {1}{x^2}+\frac {1}{x}+x+3 \log ^2(2-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 28, normalized size = 0.78 \begin {gather*} \frac {3 \, x^{3} \log \left (-x + 2\right )^{2} + x^{4} + x^{2} - x + 36}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 24, normalized size = 0.67 \begin {gather*} 3 \, \log \left (-x + 2\right )^{2} + x + \frac {x^{2} - x + 36}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 27, normalized size = 0.75
method | result | size |
derivativedivides | \(-2+x -\frac {1}{x^{2}}+\frac {1}{x}+\frac {36}{x^{3}}+3 \ln \left (2-x \right )^{2}\) | \(27\) |
default | \(-2+x -\frac {1}{x^{2}}+\frac {1}{x}+\frac {36}{x^{3}}+3 \ln \left (2-x \right )^{2}\) | \(27\) |
risch | \(3 \ln \left (2-x \right )^{2}+\frac {x^{4}+x^{2}-x +36}{x^{3}}\) | \(27\) |
norman | \(\frac {36+x^{2}+x^{4}-x +3 x^{3} \ln \left (2-x \right )^{2}}{x^{3}}\) | \(29\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.37, size = 40, normalized size = 1.11 \begin {gather*} 3 \, \log \left (-x + 2\right )^{2} + x - \frac {28 \, {\left (x + 1\right )}}{x^{2}} + \frac {2}{x} + \frac {9 \, {\left (3 \, x^{2} + 3 \, x + 4\right )}}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.35, size = 24, normalized size = 0.67 \begin {gather*} x+3\,{\ln \left (2-x\right )}^2+\frac {x^2-x+36}{x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 19, normalized size = 0.53 \begin {gather*} x + 3 \log {\left (2 - x \right )}^{2} + \frac {x^{2} - x + 36}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________