3.52.73 \(\int \frac {-4+2 x+(-x+x^2) \log (x)}{(-2 x+x^2) \log (x)} \, dx\)

Optimal. Leaf size=15 \[ \log \left (4 e^x (4-2 x) \log ^2(x)\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 13, normalized size of antiderivative = 0.87, number of steps used = 7, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {1593, 6688, 43, 2302, 29} \begin {gather*} x+\log (2-x)+2 \log (\log (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x + Log[2 - x] + 2*Log[Log[x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 1593

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 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 6688

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-4+2 x+\left (-x+x^2\right ) \log (x)}{(-2+x) x \log (x)} \, dx\\ &=\int \left (\frac {-1+x}{-2+x}+\frac {2}{x \log (x)}\right ) \, dx\\ &=2 \int \frac {1}{x \log (x)} \, dx+\int \frac {-1+x}{-2+x} \, dx\\ &=2 \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\log (x)\right )+\int \left (1+\frac {1}{-2+x}\right ) \, dx\\ &=x+\log (2-x)+2 \log (\log (x))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 11, normalized size = 0.73 \begin {gather*} x+\log (-2+x)+2 \log (\log (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x + Log[-2 + x] + 2*Log[Log[x]]

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 11, normalized size = 0.73 \begin {gather*} x + \log \left (x - 2\right ) + 2 \, \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x - 2) + 2*log(log(x))

________________________________________________________________________________________

giac [A]  time = 0.20, size = 11, normalized size = 0.73 \begin {gather*} x + \log \left (x - 2\right ) + 2 \, \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x - 2) + 2*log(log(x))

________________________________________________________________________________________

maple [A]  time = 0.17, size = 12, normalized size = 0.80




method result size



default \(x +\ln \left (x -2\right )+2 \ln \left (\ln \relax (x )\right )\) \(12\)
norman \(x +\ln \left (x -2\right )+2 \ln \left (\ln \relax (x )\right )\) \(12\)
risch \(x +\ln \left (x -2\right )+2 \ln \left (\ln \relax (x )\right )\) \(12\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x+ln(x-2)+2*ln(ln(x))

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 11, normalized size = 0.73 \begin {gather*} x + \log \left (x - 2\right ) + 2 \, \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x - 2) + 2*log(log(x))

________________________________________________________________________________________

mupad [B]  time = 3.29, size = 11, normalized size = 0.73 \begin {gather*} x+\ln \left (x-2\right )+2\,\ln \left (\ln \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x - 2) + 2*log(log(x))

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 12, normalized size = 0.80 \begin {gather*} x + \log {\left (x - 2 \right )} + 2 \log {\left (\log {\relax (x )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((ln(x)*(x**2-x)+2*x-4)/(x**2-2*x)/ln(x),x)

[Out]

x + log(x - 2) + 2*log(log(x))

________________________________________________________________________________________