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

Optimal. Leaf size=16 \[ 6-x+3 \log (x+\log (1-x)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 15, normalized size of antiderivative = 0.94, 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 = {6741, 6742, 6684} \begin {gather*} 3 \log (x+\log (1-x))-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + 3*Log[x + Log[1 - x]]

Rule 6684

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

Rule 6741

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 15, normalized size = 0.94 \begin {gather*} -x+3 \log (x+\log (1-x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + 3*Log[x + Log[1 - x]]

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 15, normalized size = 0.94 \begin {gather*} -x + 3 \, \log \left (x + \log \left (-x + 1\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 1.26, size = 19, normalized size = 1.19 \begin {gather*} -x + 3 \, \log \left (-x - \log \left (-x + 1\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 16, normalized size = 1.00




method result size



norman \(-x +3 \ln \left (\ln \left (1-x \right )+x \right )\) \(16\)
risch \(-x +3 \ln \left (\ln \left (1-x \right )+x \right )\) \(16\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x+3*ln(ln(1-x)+x)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 15, normalized size = 0.94 \begin {gather*} -x + 3 \, \log \left (x + \log \left (-x + 1\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 15, normalized size = 0.94 \begin {gather*} 3\,\ln \left (x+\ln \left (1-x\right )\right )-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 10, normalized size = 0.62 \begin {gather*} - x + 3 \log {\left (x + \log {\left (1 - x \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________