\(\int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx\) [9361]

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

Optimal result

Integrand size = 31, antiderivative size = 13 \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=\frac {8 \log (-1+x)}{4-x} \]

[Out]

8*ln(-1+x)/(-x+4)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {6874, 630, 31, 2442, 36} \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=\frac {8 \log (x-1)}{4-x} \]

[In]

Int[(32 - 8*x + (-8 + 8*x)*Log[-1 + x])/(-16 + 24*x - 9*x^2 + x^3),x]

[Out]

(8*Log[-1 + x])/(4 - x)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 630

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 2442

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {8}{4-5 x+x^2}+\frac {8 \log (-1+x)}{(-4+x)^2}\right ) \, dx \\ & = -\left (8 \int \frac {1}{4-5 x+x^2} \, dx\right )+8 \int \frac {\log (-1+x)}{(-4+x)^2} \, dx \\ & = \frac {8 \log (-1+x)}{4-x}-\frac {8}{3} \int \frac {1}{-4+x} \, dx+\frac {8}{3} \int \frac {1}{-1+x} \, dx+8 \int \frac {1}{(-4+x) (-1+x)} \, dx \\ & = \frac {8}{3} \log (1-x)-\frac {8}{3} \log (4-x)+\frac {8 \log (-1+x)}{4-x}+\frac {8}{3} \int \frac {1}{-4+x} \, dx-\frac {8}{3} \int \frac {1}{-1+x} \, dx \\ & = \frac {8 \log (-1+x)}{4-x} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(42\) vs. \(2(13)=26\).

Time = 0.05 (sec) , antiderivative size = 42, normalized size of antiderivative = 3.23 \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=\frac {8}{3} \left (2 \text {arctanh}\left (\frac {5}{3}-\frac {2 x}{3}\right )+\log (1-x)-\log (4-x)-\frac {3 \log (-1+x)}{-4+x}\right ) \]

[In]

Integrate[(32 - 8*x + (-8 + 8*x)*Log[-1 + x])/(-16 + 24*x - 9*x^2 + x^3),x]

[Out]

(8*(2*ArcTanh[5/3 - (2*x)/3] + Log[1 - x] - Log[4 - x] - (3*Log[-1 + x])/(-4 + x)))/3

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92

method result size
norman \(-\frac {8 \ln \left (-1+x \right )}{x -4}\) \(12\)
risch \(-\frac {8 \ln \left (-1+x \right )}{x -4}\) \(12\)
parallelrisch \(-\frac {8 \ln \left (-1+x \right )}{x -4}\) \(12\)
derivativedivides \(-\frac {8 \ln \left (-1+x \right ) \left (-1+x \right )}{3 \left (x -4\right )}+\frac {8 \ln \left (-1+x \right )}{3}\) \(22\)
default \(-\frac {8 \ln \left (-1+x \right ) \left (-1+x \right )}{3 \left (x -4\right )}+\frac {8 \ln \left (-1+x \right )}{3}\) \(22\)
parts \(-\frac {8 \ln \left (-1+x \right ) \left (-1+x \right )}{3 \left (x -4\right )}+\frac {8 \ln \left (-1+x \right )}{3}\) \(22\)

[In]

int(((8*x-8)*ln(-1+x)-8*x+32)/(x^3-9*x^2+24*x-16),x,method=_RETURNVERBOSE)

[Out]

-8*ln(-1+x)/(x-4)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=-\frac {8 \, \log \left (x - 1\right )}{x - 4} \]

[In]

integrate(((8*x-8)*log(-1+x)-8*x+32)/(x^3-9*x^2+24*x-16),x, algorithm="fricas")

[Out]

-8*log(x - 1)/(x - 4)

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.77 \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=- \frac {8 \log {\left (x - 1 \right )}}{x - 4} \]

[In]

integrate(((8*x-8)*ln(-1+x)-8*x+32)/(x**3-9*x**2+24*x-16),x)

[Out]

-8*log(x - 1)/(x - 4)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (11) = 22\).

Time = 0.25 (sec) , antiderivative size = 33, normalized size of antiderivative = 2.54 \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=-\frac {8 \, {\left ({\left (4 \, x - 7\right )} \log \left (x - 1\right ) - 12\right )}}{9 \, {\left (x - 4\right )}} - \frac {32}{3 \, {\left (x - 4\right )}} + \frac {32}{9} \, \log \left (x - 1\right ) \]

[In]

integrate(((8*x-8)*log(-1+x)-8*x+32)/(x^3-9*x^2+24*x-16),x, algorithm="maxima")

[Out]

-8/9*((4*x - 7)*log(x - 1) - 12)/(x - 4) - 32/3/(x - 4) + 32/9*log(x - 1)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=-\frac {8 \, \log \left (x - 1\right )}{x - 4} \]

[In]

integrate(((8*x-8)*log(-1+x)-8*x+32)/(x^3-9*x^2+24*x-16),x, algorithm="giac")

[Out]

-8*log(x - 1)/(x - 4)

Mupad [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \frac {32-8 x+(-8+8 x) \log (-1+x)}{-16+24 x-9 x^2+x^3} \, dx=-\frac {8\,\ln \left (x-1\right )}{x-4} \]

[In]

int((log(x - 1)*(8*x - 8) - 8*x + 32)/(24*x - 9*x^2 + x^3 - 16),x)

[Out]

-(8*log(x - 1))/(x - 4)