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

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

________________________________________________________________________________________

Rubi [F]  time = 0.96, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {-10+4 x+\left (-2+2 x-x^2\right ) \log (x)+(2-x) \log \left (-\frac {x}{-2+x}\right )}{-2 x+x^2+\left (-4 x+2 x^2\right ) \log (x)+\left (-2 x+x^2\right ) \log ^2(x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 22, normalized size = 1.00 \begin {gather*} -\frac {4+x-\log \left (-\frac {x}{-2+x}\right )}{1+\log (x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 22, normalized size = 1.00 \begin {gather*} -\frac {x - \log \left (-\frac {x}{x - 2}\right ) + 4}{\log \relax (x) + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [C]  time = 0.40, size = 27, normalized size = 1.23 \begin {gather*} -\frac {-i \, \pi + x + 5}{\log \relax (x) + 1} - \frac {\log \left (x - 2\right )}{\log \relax (x) + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(-I*pi + x + 5)/(log(x) + 1) - log(x - 2)/(log(x) + 1)

________________________________________________________________________________________

maple [C]  time = 0.11, size = 137, normalized size = 6.23




method result size



risch \(-\frac {\ln \left (x -2\right )}{\ln \relax (x )+1}-\frac {i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{x -2}\right ) \mathrm {csgn}\left (\frac {i x}{x -2}\right )-i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i x}{x -2}\right )^{2}+2 i \pi \mathrm {csgn}\left (\frac {i x}{x -2}\right )^{2}-i \pi \,\mathrm {csgn}\left (\frac {i}{x -2}\right ) \mathrm {csgn}\left (\frac {i x}{x -2}\right )^{2}-i \pi \mathrm {csgn}\left (\frac {i x}{x -2}\right )^{3}-2 i \pi +2 x +10}{2 \left (\ln \relax (x )+1\right )}\) \(137\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x^2+2*x-2)*ln(x)+(2-x)*ln(-x/(x-2))+4*x-10)/((x^2-2*x)*ln(x)^2+(2*x^2-4*x)*ln(x)+x^2-2*x),x,method=_RET
URNVERBOSE)

[Out]

-1/(ln(x)+1)*ln(x-2)-1/2*(I*Pi*csgn(I*x)*csgn(I/(x-2))*csgn(I*x/(x-2))-I*Pi*csgn(I*x)*csgn(I*x/(x-2))^2+2*I*Pi
*csgn(I*x/(x-2))^2-I*Pi*csgn(I/(x-2))*csgn(I*x/(x-2))^2-I*Pi*csgn(I*x/(x-2))^3-2*I*Pi+2*x+10)/(ln(x)+1)

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 17, normalized size = 0.77 \begin {gather*} -\frac {x + \log \left (-x + 2\right ) + 5}{\log \relax (x) + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.05, size = 22, normalized size = 1.00 \begin {gather*} -\frac {x-\ln \left (-\frac {x}{x-2}\right )+4}{\ln \relax (x)+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.37, size = 22, normalized size = 1.00 \begin {gather*} \frac {- x - 4}{\log {\relax (x )} + 1} + \frac {\log {\left (- \frac {x}{x - 2} \right )}}{\log {\relax (x )} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________