3.68.18 \(\int \frac {-2+2 x+x^3-2 x^2 \log (x)+x \log ^2(x)}{x^3-2 x^2 \log (x)+x \log ^2(x)} \, dx\)

Optimal. Leaf size=13 \[ -4+x-\frac {2}{x-\log (x)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.30, antiderivative size = 12, normalized size of antiderivative = 0.92, number of steps used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {6688, 6742, 6686} \begin {gather*} x-\frac {2}{x-\log (x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - 2/(x - Log[x])

Rule 6686

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[(q*y^(m + 1))/(m + 1), x] /;  !F
alseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]

Rule 6688

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 12, normalized size = 0.92 \begin {gather*} x+\frac {2}{-x+\log (x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x + 2/(-x + Log[x])

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 19, normalized size = 1.46 \begin {gather*} \frac {x^{2} - x \log \relax (x) - 2}{x - \log \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 12, normalized size = 0.92 \begin {gather*} x - \frac {2}{x - \log \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2/(x - log(x))

________________________________________________________________________________________

maple [A]  time = 0.02, size = 13, normalized size = 1.00




method result size



risch \(x -\frac {2}{x -\ln \relax (x )}\) \(13\)
norman \(\frac {-2+x^{2}-x \ln \relax (x )}{x -\ln \relax (x )}\) \(20\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-2/(x-ln(x))

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 19, normalized size = 1.46 \begin {gather*} \frac {x^{2} - x \log \relax (x) - 2}{x - \log \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.19, size = 12, normalized size = 0.92 \begin {gather*} x-\frac {2}{x-\ln \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2/(x - log(x))

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 7, normalized size = 0.54 \begin {gather*} x + \frac {2}{- x + \log {\relax (x )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + 2/(-x + log(x))

________________________________________________________________________________________