\(\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\) [6718]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 41, antiderivative size = 13 \[ \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=-4+x-\frac {2}{x-\log (x)} \]

[Out]

-4-2/(x-ln(x))+x

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {6820, 6874, 6818} \[ \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=x-\frac {2}{x-\log (x)} \]

[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 6818

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 6820

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

Rule 6874

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

Rubi steps \begin{align*} \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{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92 \[ \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=x+\frac {2}{-x+\log (x)} \]

[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])

Maple [A] (verified)

Time = 0.57 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00

method result size
risch \(x -\frac {2}{x -\ln \left (x \right )}\) \(13\)
norman \(\frac {-2+x^{2}-x \ln \left (x \right )}{x -\ln \left (x \right )}\) \(20\)
parallelrisch \(\frac {-2+x^{2}-x \ln \left (x \right )}{x -\ln \left (x \right )}\) \(20\)
default \(\frac {2+x \ln \left (x \right )-x^{2}}{\ln \left (x \right )-x}\) \(21\)

[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))

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.46 \[ \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=\frac {x^{2} - x \log \left (x\right ) - 2}{x - \log \left (x\right )} \]

[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))

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.54 \[ \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=x + \frac {2}{- x + \log {\left (x \right )}} \]

[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))

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.46 \[ \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=\frac {x^{2} - x \log \left (x\right ) - 2}{x - \log \left (x\right )} \]

[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))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92 \[ \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=x - \frac {2}{x - \log \left (x\right )} \]

[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))

Mupad [B] (verification not implemented)

Time = 12.57 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92 \[ \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=x-\frac {2}{x-\ln \left (x\right )} \]

[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))