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

Optimal. Leaf size=29 \[ -x+x^2-\log (2)+\log \left (\frac {4}{-x+\frac {-3+x+\log (x)}{x}}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.21, antiderivative size = 24, normalized size of antiderivative = 0.83, number of steps used = 5, number of rules used = 3, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.058, Rules used = {6742, 14, 6684} \begin {gather*} x^2-\log \left (x^2-x-\log (x)+3\right )-x+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + x^2 + Log[x] - Log[3 - x + x^2 - Log[x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 6684

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.21, size = 24, normalized size = 0.83 \begin {gather*} -x+x^2+\log (x)-\log \left (3-x+x^2-\log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + x^2 + Log[x] - Log[3 - x + x^2 - Log[x]]

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 22, normalized size = 0.76 \begin {gather*} x^{2} - x - \log \left (-x^{2} + x + \log \relax (x) - 3\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - x - log(-x^2 + x + log(x) - 3) + log(x)

________________________________________________________________________________________

giac [A]  time = 0.21, size = 24, normalized size = 0.83 \begin {gather*} x^{2} - x - \log \left (x^{2} - x - \log \relax (x) + 3\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - x - log(x^2 - x - log(x) + 3) + log(x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 23, normalized size = 0.79




method result size



risch \(x^{2}-x +\ln \relax (x )-\ln \left (-x^{2}+\ln \relax (x )+x -3\right )\) \(23\)
norman \(x^{2}+\ln \relax (x )-x -\ln \left (x^{2}-x -\ln \relax (x )+3\right )\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2-x+ln(x)-ln(-x^2+ln(x)+x-3)

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 22, normalized size = 0.76 \begin {gather*} x^{2} - x - \log \left (-x^{2} + x + \log \relax (x) - 3\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - x - log(-x^2 + x + log(x) - 3) + log(x)

________________________________________________________________________________________

mupad [B]  time = 1.49, size = 35, normalized size = 1.21 \begin {gather*} \frac {x^2\,\ln \relax (x)-x^3+x^4}{x^2}-\ln \left (x^2-\ln \relax (x)-x+3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 19, normalized size = 0.66 \begin {gather*} x^{2} - x + \log {\relax (x )} - \log {\left (- x^{2} + x + \log {\relax (x )} - 3 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________