\(\int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx\) [7887]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 46, antiderivative size = 36 \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=x+\frac {5+x+3 \left (-\frac {4 \left (-3+\frac {x}{2}\right )}{x}+x^2 \log ^2(2-x)\right )}{x^2} \]

[Out]

(3*x^2*ln(2-x)^2-12*(1/2*x-3)/x+5+x)/x^2+x

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.69, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {1607, 6874, 14, 2437, 2338} \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=\frac {36}{x^3}-\frac {1}{x^2}+x+\frac {1}{x}+3 \log ^2(2-x) \]

[In]

Int[(216 - 112*x + 4*x^2 - x^3 - 2*x^4 + x^5 + 6*x^4*Log[2 - x])/(-2*x^4 + x^5),x]

[Out]

36/x^3 - x^(-2) + x^(-1) + x + 3*Log[2 - x]^2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \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 \text {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{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.69 \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=\frac {36}{x^3}-\frac {1}{x^2}+\frac {1}{x}+x+3 \log ^2(2-x) \]

[In]

Integrate[(216 - 112*x + 4*x^2 - x^3 - 2*x^4 + x^5 + 6*x^4*Log[2 - x])/(-2*x^4 + x^5),x]

[Out]

36/x^3 - x^(-2) + x^(-1) + x + 3*Log[2 - x]^2

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.72

method result size
parts \(x -\frac {1}{x^{2}}+\frac {36}{x^{3}}+\frac {1}{x}+3 \ln \left (2-x \right )^{2}\) \(26\)
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\)
parallelrisch \(\frac {36+3 x^{3} \ln \left (2-x \right )^{2}+x^{4}+4 x^{3}+x^{2}-x}{x^{3}}\) \(34\)

[In]

int((6*x^4*ln(2-x)+x^5-2*x^4-x^3+4*x^2-112*x+216)/(x^5-2*x^4),x,method=_RETURNVERBOSE)

[Out]

x-1/x^2+36/x^3+1/x+3*ln(2-x)^2

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.78 \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=\frac {3 \, x^{3} \log \left (-x + 2\right )^{2} + x^{4} + x^{2} - x + 36}{x^{3}} \]

[In]

integrate((6*x^4*log(2-x)+x^5-2*x^4-x^3+4*x^2-112*x+216)/(x^5-2*x^4),x, algorithm="fricas")

[Out]

(3*x^3*log(-x + 2)^2 + x^4 + x^2 - x + 36)/x^3

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.53 \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=x + 3 \log {\left (2 - x \right )}^{2} + \frac {x^{2} - x + 36}{x^{3}} \]

[In]

integrate((6*x**4*ln(2-x)+x**5-2*x**4-x**3+4*x**2-112*x+216)/(x**5-2*x**4),x)

[Out]

x + 3*log(2 - x)**2 + (x**2 - x + 36)/x**3

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.11 \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=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}} \]

[In]

integrate((6*x^4*log(2-x)+x^5-2*x^4-x^3+4*x^2-112*x+216)/(x^5-2*x^4),x, algorithm="maxima")

[Out]

3*log(-x + 2)^2 + x - 28*(x + 1)/x^2 + 2/x + 9*(3*x^2 + 3*x + 4)/x^3

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.19 \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=3 \, \log \left (-x + 2\right )^{2} + x + \frac {{\left (x - 2\right )}^{2} + 3 \, x + 32}{{\left (x - 2\right )}^{3} + 6 \, {\left (x - 2\right )}^{2} + 12 \, x - 16} - 2 \]

[In]

integrate((6*x^4*log(2-x)+x^5-2*x^4-x^3+4*x^2-112*x+216)/(x^5-2*x^4),x, algorithm="giac")

[Out]

3*log(-x + 2)^2 + x + ((x - 2)^2 + 3*x + 32)/((x - 2)^3 + 6*(x - 2)^2 + 12*x - 16) - 2

Mupad [B] (verification not implemented)

Time = 12.52 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.67 \[ \int \frac {216-112 x+4 x^2-x^3-2 x^4+x^5+6 x^4 \log (2-x)}{-2 x^4+x^5} \, dx=x+3\,{\ln \left (2-x\right )}^2+\frac {x^2-x+36}{x^3} \]

[In]

int(-(4*x^2 - 112*x - x^3 - 2*x^4 + x^5 + 6*x^4*log(2 - x) + 216)/(2*x^4 - x^5),x)

[Out]

x + 3*log(2 - x)^2 + (x^2 - x + 36)/x^3