3.18.39 \(\int \frac {1-6 x+2 x^2+(-2+2 x^2) \log (-\frac {x}{-6+6 x})}{-1+x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 36, normalized size of antiderivative = 1.64, number of steps used = 7, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {6742, 698, 2492, 72} \begin {gather*} x^2-3 x+\log (1-x)-\log (x)+(x+1)^2 \log \left (\frac {x}{6 (1-x)}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 - 6*x + 2*x^2 + (-2 + 2*x^2)*Log[-(x/(-6 + 6*x))])/(-1 + x),x]

[Out]

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

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 698

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rule 2492

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*((g_.) + (h_.)*(x_))^
(m_.), x_Symbol] :> Simp[((g + h*x)^(m + 1)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/(h*(m + 1)), x] - Dist[(p*
r*s*(b*c - a*d))/(h*(m + 1)), Int[((g + h*x)^(m + 1)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1))/((a + b*x)*
(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && EqQ[p + q, 0]
&& IGtQ[s, 0] && NeQ[m, -1]

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 \left (\frac {1-6 x+2 x^2}{-1+x}+2 (1+x) \log \left (\frac {x}{6-6 x}\right )\right ) \, dx\\ &=2 \int (1+x) \log \left (\frac {x}{6-6 x}\right ) \, dx+\int \frac {1-6 x+2 x^2}{-1+x} \, dx\\ &=(1+x)^2 \log \left (\frac {x}{6 (1-x)}\right )-6 \int \frac {(1+x)^2}{(6-6 x) x} \, dx+\int \left (-4-\frac {3}{-1+x}+2 x\right ) \, dx\\ &=-4 x+x^2-3 \log (1-x)+(1+x)^2 \log \left (\frac {x}{6 (1-x)}\right )-6 \int \left (-\frac {1}{6}-\frac {2}{3 (-1+x)}+\frac {1}{6 x}\right ) \, dx\\ &=-3 x+x^2+\log (1-x)-\log (x)+(1+x)^2 \log \left (\frac {x}{6 (1-x)}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 19, normalized size = 0.86 \begin {gather*} x \left (-3+x+(2+x) \log \left (\frac {x}{6-6 x}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 - 6*x + 2*x^2 + (-2 + 2*x^2)*Log[-(x/(-6 + 6*x))])/(-1 + x),x]

[Out]

x*(-3 + x + (2 + x)*Log[x/(6 - 6*x)])

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 24, normalized size = 1.09 \begin {gather*} x^{2} + {\left (x^{2} + 2 \, x\right )} \log \left (-\frac {x}{6 \, {\left (x - 1\right )}}\right ) - 3 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-2)*log(-x/(6*x-6))+2*x^2-6*x+1)/(x-1),x, algorithm="fricas")

[Out]

x^2 + (x^2 + 2*x)*log(-1/6*x/(x - 1)) - 3*x

________________________________________________________________________________________

giac [B]  time = 0.23, size = 87, normalized size = 3.95 \begin {gather*} -\frac {{\left (\frac {4 \, x}{x - 1} - 3\right )} \log \left (-\frac {x}{6 \, {\left (x - 1\right )}}\right )}{\frac {2 \, x}{x - 1} - \frac {x^{2}}{{\left (x - 1\right )}^{2}} - 1} + \frac {\frac {x}{x - 1} - 2}{\frac {2 \, x}{x - 1} - \frac {x^{2}}{{\left (x - 1\right )}^{2}} - 1} + 3 \, \log \left (-\frac {x}{6 \, {\left (x - 1\right )}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-2)*log(-x/(6*x-6))+2*x^2-6*x+1)/(x-1),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.31, size = 27, normalized size = 1.23




method result size



risch \(\left (x^{2}+2 x \right ) \ln \left (-\frac {x}{6 x -6}\right )+x^{2}-3 x\) \(27\)
norman \(x^{2}+x^{2} \ln \left (-\frac {x}{6 x -6}\right )-3 x +2 x \ln \left (-\frac {x}{6 x -6}\right )\) \(37\)
derivativedivides \(-x +1+\left (x -1\right )^{2}-24 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (x -1\right )-12 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{2 \left (x -1\right )}+\frac {1}{2}\right ) \left (x -1\right )^{2}\) \(70\)
default \(-x +1+\left (x -1\right )^{2}-24 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (x -1\right )-12 \ln \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{6}-\frac {1}{6 \left (x -1\right )}\right ) \left (-\frac {1}{2 \left (x -1\right )}+\frac {1}{2}\right ) \left (x -1\right )^{2}\) \(70\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^2-2)*ln(-x/(6*x-6))+2*x^2-6*x+1)/(x-1),x,method=_RETURNVERBOSE)

[Out]

(x^2+2*x)*ln(-x/(6*x-6))+x^2-3*x

________________________________________________________________________________________

maxima [B]  time = 0.78, size = 62, normalized size = 2.82 \begin {gather*} -x^{2} {\left (\log \relax (3) + \log \relax (2)\right )} + x^{2} - x {\left (2 \, \log \relax (3) + 2 \, \log \relax (2) - 1\right )} + {\left (x^{2} + 2 \, x\right )} \log \relax (x) - {\left (x^{2} + 2 \, x - 3\right )} \log \left (-x + 1\right ) - 4 \, x - 3 \, \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-2)*log(-x/(6*x-6))+2*x^2-6*x+1)/(x-1),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.20, size = 35, normalized size = 1.59 \begin {gather*} x\,\left (2\,\ln \left (-\frac {x}{6\,x-6}\right )-3\right )+x^2\,\left (\ln \left (-\frac {x}{6\,x-6}\right )+1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(-x/(6*x - 6))*(2*x^2 - 2) - 6*x + 2*x^2 + 1)/(x - 1),x)

[Out]

x*(2*log(-x/(6*x - 6)) - 3) + x^2*(log(-x/(6*x - 6)) + 1)

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 22, normalized size = 1.00 \begin {gather*} x^{2} - 3 x + \left (x^{2} + 2 x\right ) \log {\left (- \frac {x}{6 x - 6} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**2-2)*ln(-x/(6*x-6))+2*x**2-6*x+1)/(x-1),x)

[Out]

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

________________________________________________________________________________________