Optimal. Leaf size=36 \[ \frac{2}{2-x}+\frac{2}{(2-x)^2}-\frac{7}{3 (2-x)^3}+\log (2-x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0219846, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {1850} \[ \frac{2}{2-x}+\frac{2}{(2-x)^2}-\frac{7}{3 (2-x)^3}+\log (2-x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1850
Rubi steps
\begin{align*} \int \frac{1-4 x^2+x^3}{(-2+x)^4} \, dx &=\int \left (-\frac{7}{(-2+x)^4}-\frac{4}{(-2+x)^3}+\frac{2}{(-2+x)^2}+\frac{1}{-2+x}\right ) \, dx\\ &=-\frac{7}{3 (2-x)^3}+\frac{2}{(2-x)^2}+\frac{2}{2-x}+\log (2-x)\\ \end{align*}
Mathematica [A] time = 0.0141903, size = 24, normalized size = 0.67 \[ \frac{-6 x^2+30 x-29}{3 (x-2)^3}+\log (x-2) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 27, normalized size = 0.8 \begin{align*} 2\, \left ( -2+x \right ) ^{-2}+{\frac{7}{3\, \left ( -2+x \right ) ^{3}}}-2\, \left ( -2+x \right ) ^{-1}+\ln \left ( -2+x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.927856, size = 43, normalized size = 1.19 \begin{align*} -\frac{6 \, x^{2} - 30 \, x + 29}{3 \,{\left (x^{3} - 6 \, x^{2} + 12 \, x - 8\right )}} + \log \left (x - 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.99107, size = 123, normalized size = 3.42 \begin{align*} -\frac{6 \, x^{2} - 3 \,{\left (x^{3} - 6 \, x^{2} + 12 \, x - 8\right )} \log \left (x - 2\right ) - 30 \, x + 29}{3 \,{\left (x^{3} - 6 \, x^{2} + 12 \, x - 8\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.108621, size = 29, normalized size = 0.81 \begin{align*} - \frac{6 x^{2} - 30 x + 29}{3 x^{3} - 18 x^{2} + 36 x - 24} + \log{\left (x - 2 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.05217, size = 31, normalized size = 0.86 \begin{align*} -\frac{6 \, x^{2} - 30 \, x + 29}{3 \,{\left (x - 2\right )}^{3}} + \log \left ({\left | x - 2 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]