3.47.95 \(\int \frac {2-5 x+2 x^2+(2-7 x+5 x^2+3 x^3-4 x^4+x^5) \log (-1+x)+(2-7 x+5 x^2+3 x^3-4 x^4+x^5) \log (x)+((3 x-4 x^2+x^3) \log (-1+x)+(3 x-4 x^2+x^3) \log (x)) \log (x \log (-1+x)+x \log (x))}{(-4 x^2+8 x^3-5 x^4+x^5) \log (-1+x)+(-4 x^2+8 x^3-5 x^4+x^5) \log (x)+((2 x-3 x^2+x^3) \log (-1+x)+(2 x-3 x^2+x^3) \log (x)) \log (x \log (-1+x)+x \log (x))} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 2.43, antiderivative size = 32, normalized size of antiderivative = 1.03, number of steps used = 6, number of rules used = 4, integrand size = 206, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.019, Rules used = {6688, 6728, 43, 6684} \begin {gather*} \log \left (-x^2+2 x-\log (x (\log (x-1)+\log (x)))\right )+x-\log (2-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - Log[2 - x] + Log[2*x - x^2 - Log[x*(Log[-1 + x] + Log[x])]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 6684

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

Rule 6688

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

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.25, size = 28, normalized size = 0.90 \begin {gather*} x-\log (2-x)+\log \left (-2 x+x^2+\log (x (\log (-1+x)+\log (x)))\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - Log[2 - x] + Log[-2*x + x^2 + Log[x*(Log[-1 + x] + Log[x])]]

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 28, normalized size = 0.90 \begin {gather*} x + \log \left (x^{2} - 2 \, x + \log \left (x \log \left (x - 1\right ) + x \log \relax (x)\right )\right ) - \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x^2 - 2*x + log(x*log(x - 1) + x*log(x))) - log(x - 2)

________________________________________________________________________________________

giac [A]  time = 0.42, size = 26, normalized size = 0.84 \begin {gather*} x + \log \left (x^{2} - 2 \, x + \log \relax (x) + \log \left (\log \left (x - 1\right ) + \log \relax (x)\right )\right ) - \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x^2 - 2*x + log(x) + log(log(x - 1) + log(x))) - log(x - 2)

________________________________________________________________________________________

maple [C]  time = 0.11, size = 134, normalized size = 4.32




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 26, normalized size = 0.84 \begin {gather*} x + \log \left (x^{2} - 2 \, x + \log \relax (x) + \log \left (\log \left (x - 1\right ) + \log \relax (x)\right )\right ) - \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x^2 - 2*x + log(x) + log(log(x - 1) + log(x))) - log(x - 2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} -\int \frac {\ln \left (x-1\right )\,\left (x^5-4\,x^4+3\,x^3+5\,x^2-7\,x+2\right )-5\,x+\ln \left (x\,\ln \left (x-1\right )+x\,\ln \relax (x)\right )\,\left (\ln \relax (x)\,\left (x^3-4\,x^2+3\,x\right )+\ln \left (x-1\right )\,\left (x^3-4\,x^2+3\,x\right )\right )+2\,x^2+\ln \relax (x)\,\left (x^5-4\,x^4+3\,x^3+5\,x^2-7\,x+2\right )+2}{\ln \relax (x)\,\left (-x^5+5\,x^4-8\,x^3+4\,x^2\right )-\ln \left (x\,\ln \left (x-1\right )+x\,\ln \relax (x)\right )\,\left (\ln \relax (x)\,\left (x^3-3\,x^2+2\,x\right )+\ln \left (x-1\right )\,\left (x^3-3\,x^2+2\,x\right )\right )+\ln \left (x-1\right )\,\left (-x^5+5\,x^4-8\,x^3+4\,x^2\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x - 1)*(5*x^2 - 7*x + 3*x^3 - 4*x^4 + x^5 + 2) - 5*x + log(x*log(x - 1) + x*log(x))*(log(x)*(3*x - 4
*x^2 + x^3) + log(x - 1)*(3*x - 4*x^2 + x^3)) + 2*x^2 + log(x)*(5*x^2 - 7*x + 3*x^3 - 4*x^4 + x^5 + 2) + 2)/(l
og(x)*(4*x^2 - 8*x^3 + 5*x^4 - x^5) - log(x*log(x - 1) + x*log(x))*(log(x)*(2*x - 3*x^2 + x^3) + log(x - 1)*(2
*x - 3*x^2 + x^3)) + log(x - 1)*(4*x^2 - 8*x^3 + 5*x^4 - x^5)),x)

[Out]

-int((log(x - 1)*(5*x^2 - 7*x + 3*x^3 - 4*x^4 + x^5 + 2) - 5*x + log(x*log(x - 1) + x*log(x))*(log(x)*(3*x - 4
*x^2 + x^3) + log(x - 1)*(3*x - 4*x^2 + x^3)) + 2*x^2 + log(x)*(5*x^2 - 7*x + 3*x^3 - 4*x^4 + x^5 + 2) + 2)/(l
og(x)*(4*x^2 - 8*x^3 + 5*x^4 - x^5) - log(x*log(x - 1) + x*log(x))*(log(x)*(2*x - 3*x^2 + x^3) + log(x - 1)*(2
*x - 3*x^2 + x^3)) + log(x - 1)*(4*x^2 - 8*x^3 + 5*x^4 - x^5)), x)

________________________________________________________________________________________

sympy [A]  time = 1.77, size = 27, normalized size = 0.87 \begin {gather*} x - \log {\left (x - 2 \right )} + \log {\left (x^{2} - 2 x + \log {\left (x \log {\relax (x )} + x \log {\left (x - 1 \right )} \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x**3-4*x**2+3*x)*ln(x)+(x**3-4*x**2+3*x)*ln(x-1))*ln(x*ln(x)+ln(x-1)*x)+(x**5-4*x**4+3*x**3+5*x**
2-7*x+2)*ln(x)+(x**5-4*x**4+3*x**3+5*x**2-7*x+2)*ln(x-1)+2*x**2-5*x+2)/(((x**3-3*x**2+2*x)*ln(x)+(x**3-3*x**2+
2*x)*ln(x-1))*ln(x*ln(x)+ln(x-1)*x)+(x**5-5*x**4+8*x**3-4*x**2)*ln(x)+(x**5-5*x**4+8*x**3-4*x**2)*ln(x-1)),x)

[Out]

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

________________________________________________________________________________________