3.81.65 \(\int \frac {8-42 x+36 x^2+(-2+10 x-8 x^2) \log (-1+x)}{-16+16 x+(8-8 x) \log (-1+x)+(-1+x) \log ^2(-1+x)} \, dx\)

Optimal. Leaf size=19 \[ 2 \left (5+\frac {(1-2 x) x}{-4+\log (-1+x)}\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.58, antiderivative size = 48, normalized size of antiderivative = 2.53, number of steps used = 32, number of rules used = 13, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.245, Rules used = {6741, 6742, 2418, 2389, 2297, 2299, 2178, 2390, 2302, 30, 2400, 2399, 2309} \begin {gather*} -\frac {4 x (1-x)}{4-\log (x-1)}-\frac {2 (1-x)}{4-\log (x-1)}+\frac {2}{4-\log (x-1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(8 - 42*x + 36*x^2 + (-2 + 10*x - 8*x^2)*Log[-1 + x])/(-16 + 16*x + (8 - 8*x)*Log[-1 + x] + (-1 + x)*Log[-
1 + x]^2),x]

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2297

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Simp[(x*(a + b*Log[c*x^n])^(p + 1))/(b*n*(p + 1))
, x] - Dist[1/(b*n*(p + 1)), Int[(a + b*Log[c*x^n])^(p + 1), x], x] /; FreeQ[{a, b, c, n}, x] && LtQ[p, -1] &&
 IntegerQ[2*p]

Rule 2299

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[1/(n*c^(1/n)), Subst[Int[E^(x/n)*(a + b*x)^p
, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[1/n]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2309

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))^(p_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[E^((m + 1)*x)*(a
 + b*x)^p, x], x, Log[c*x]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[m]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2390

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 2399

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

Rule 2400

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

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 6741

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

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-8+42 x-36 x^2-\left (-2+10 x-8 x^2\right ) \log (-1+x)}{(1-x) (4-\log (-1+x))^2} \, dx\\ &=\int \left (\frac {2 x (-1+2 x)}{(-1+x) (-4+\log (-1+x))^2}-\frac {2 (-1+4 x)}{-4+\log (-1+x)}\right ) \, dx\\ &=2 \int \frac {x (-1+2 x)}{(-1+x) (-4+\log (-1+x))^2} \, dx-2 \int \frac {-1+4 x}{-4+\log (-1+x)} \, dx\\ &=2 \int \left (\frac {1}{(-4+\log (-1+x))^2}+\frac {1}{(-1+x) (-4+\log (-1+x))^2}+\frac {2 x}{(-4+\log (-1+x))^2}\right ) \, dx-2 \int \left (\frac {3}{-4+\log (-1+x)}+\frac {4 (-1+x)}{-4+\log (-1+x)}\right ) \, dx\\ &=2 \int \frac {1}{(-4+\log (-1+x))^2} \, dx+2 \int \frac {1}{(-1+x) (-4+\log (-1+x))^2} \, dx+4 \int \frac {x}{(-4+\log (-1+x))^2} \, dx-6 \int \frac {1}{-4+\log (-1+x)} \, dx-8 \int \frac {-1+x}{-4+\log (-1+x)} \, dx\\ &=-\frac {4 (1-x) x}{4-\log (-1+x)}+2 \operatorname {Subst}\left (\int \frac {1}{(-4+\log (x))^2} \, dx,x,-1+x\right )+2 \operatorname {Subst}\left (\int \frac {1}{x (-4+\log (x))^2} \, dx,x,-1+x\right )-4 \int \frac {1}{-4+\log (-1+x)} \, dx-6 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )+8 \int \frac {x}{-4+\log (-1+x)} \, dx-8 \operatorname {Subst}\left (\int \frac {x}{-4+\log (x)} \, dx,x,-1+x\right )\\ &=-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+2 \operatorname {Subst}\left (\int \frac {1}{x^2} \, dx,x,-4+\log (-1+x)\right )+2 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )-4 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )-6 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )+8 \int \left (\frac {1}{-4+\log (-1+x)}+\frac {-1+x}{-4+\log (-1+x)}\right ) \, dx-8 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-4+x} \, dx,x,\log (-1+x)\right )\\ &=-8 e^8 \text {Ei}(-2 (4-\log (-1+x)))-6 e^4 \text {Ei}(-4+\log (-1+x))+\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+2 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )-4 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )+8 \int \frac {1}{-4+\log (-1+x)} \, dx+8 \int \frac {-1+x}{-4+\log (-1+x)} \, dx\\ &=-8 e^8 \text {Ei}(-2 (4-\log (-1+x)))-8 e^4 \text {Ei}(-4+\log (-1+x))+\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+8 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )+8 \operatorname {Subst}\left (\int \frac {x}{-4+\log (x)} \, dx,x,-1+x\right )\\ &=-8 e^8 \text {Ei}(-2 (4-\log (-1+x)))-8 e^4 \text {Ei}(-4+\log (-1+x))+\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+8 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )+8 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-4+x} \, dx,x,\log (-1+x)\right )\\ &=\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 16, normalized size = 0.84 \begin {gather*} \frac {2 (1-2 x) x}{-4+\log (-1+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(8 - 42*x + 36*x^2 + (-2 + 10*x - 8*x^2)*Log[-1 + x])/(-16 + 16*x + (8 - 8*x)*Log[-1 + x] + (-1 + x)
*Log[-1 + x]^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 19, normalized size = 1.00 \begin {gather*} -\frac {2 \, {\left (2 \, x^{2} - x\right )}}{\log \left (x - 1\right ) - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8*x^2+10*x-2)*log(x-1)+36*x^2-42*x+8)/((x-1)*log(x-1)^2+(-8*x+8)*log(x-1)+16*x-16),x, algorithm="
fricas")

[Out]

-2*(2*x^2 - x)/(log(x - 1) - 4)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 19, normalized size = 1.00 \begin {gather*} -\frac {2 \, {\left (2 \, x^{2} - x\right )}}{\log \left (x - 1\right ) - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8*x^2+10*x-2)*log(x-1)+36*x^2-42*x+8)/((x-1)*log(x-1)^2+(-8*x+8)*log(x-1)+16*x-16),x, algorithm="
giac")

[Out]

-2*(2*x^2 - x)/(log(x - 1) - 4)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 17, normalized size = 0.89




method result size



risch \(-\frac {2 x \left (2 x -1\right )}{\ln \left (x -1\right )-4}\) \(17\)
norman \(\frac {-4 x^{2}+2 x}{\ln \left (x -1\right )-4}\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-8*x^2+10*x-2)*ln(x-1)+36*x^2-42*x+8)/((x-1)*ln(x-1)^2+(-8*x+8)*ln(x-1)+16*x-16),x,method=_RETURNVERBOSE
)

[Out]

-2*x*(2*x-1)/(ln(x-1)-4)

________________________________________________________________________________________

maxima [B]  time = 0.39, size = 44, normalized size = 2.32 \begin {gather*} -\frac {2 \, {\left (2 \, x^{2} - x\right )}}{\log \left (x - 1\right ) - 4} + \frac {2 \, \log \left (x - 1\right )}{\log \left (x - 1\right ) - 4} - \frac {8}{\log \left (x - 1\right ) - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8*x^2+10*x-2)*log(x-1)+36*x^2-42*x+8)/((x-1)*log(x-1)^2+(-8*x+8)*log(x-1)+16*x-16),x, algorithm="
maxima")

[Out]

-2*(2*x^2 - x)/(log(x - 1) - 4) + 2*log(x - 1)/(log(x - 1) - 4) - 8/(log(x - 1) - 4)

________________________________________________________________________________________

mupad [B]  time = 5.50, size = 16, normalized size = 0.84 \begin {gather*} -\frac {2\,x\,\left (2\,x-1\right )}{\ln \left (x-1\right )-4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(42*x + log(x - 1)*(8*x^2 - 10*x + 2) - 36*x^2 - 8)/(16*x - log(x - 1)*(8*x - 8) + log(x - 1)^2*(x - 1) -
 16),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 14, normalized size = 0.74 \begin {gather*} \frac {- 4 x^{2} + 2 x}{\log {\left (x - 1 \right )} - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8*x**2+10*x-2)*ln(x-1)+36*x**2-42*x+8)/((x-1)*ln(x-1)**2+(-8*x+8)*ln(x-1)+16*x-16),x)

[Out]

(-4*x**2 + 2*x)/(log(x - 1) - 4)

________________________________________________________________________________________