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

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

[Out]

((ln(x/(6-6*x))+1)*x-5)*(2+x)-1

________________________________________________________________________________________

Rubi [A]
time = 0.06, 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 = {6874, 712, 2547, 84} \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 84

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 712

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 2547

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))*((f_.) + (g_.)*(x_))^(m_.), x
_Symbol] :> Simp[(f + g*x)^(m + 1)*((A + B*Log[e*((a + b*x)/(c + d*x))^n])/(g*(m + 1))), x] - Dist[B*n*((b*c -
 a*d)/(g*(m + 1))), Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, m
, n}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, -2]

Rule 6874

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.03, 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)])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(69\) vs. \(2(22)=44\).
time = 0.33, size = 70, normalized size = 3.18

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+1+(x-1)^2-24*ln(-1/6-1/6/(x-1))*(-1/6-1/6/(x-1))*(x-1)-12*ln(-1/6-1/6/(x-1))*(-1/6-1/6/(x-1))*(-1/2/(x-1)+1
/2)*(x-1)^2

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (21) = 42\).
time = 0.51, size = 62, normalized size = 2.82 \begin {gather*} -x^{2} {\left (\log \left (3\right ) + \log \left (2\right )\right )} + x^{2} - x {\left (2 \, \log \left (3\right ) + 2 \, \log \left (2\right ) - 1\right )} + {\left (x^{2} + 2 \, x\right )} \log \left (x\right ) - {\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)/(-1+x),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)

________________________________________________________________________________________

Fricas [A]
time = 0.37, 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)/(-1+x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.05, 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)/(-1+x),x)

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (21) = 42\).
time = 0.40, 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)/(-1+x),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))

________________________________________________________________________________________

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)

________________________________________________________________________________________