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

Optimal result
Mathematica [A] (verified)
Rubi [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 [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 206, antiderivative size = 31 \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=3+x+\log \left (-x+\frac {x \log (x (\log (-1+x)+\log (x)))}{2 x-x^2}\right ) \] Output:

x+3+ln(x/(-x^2+2*x)*ln((ln(-1+x)+ln(x))*x)-x)
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90 \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=x-\log (2-x)+\log \left (-2 x+x^2+\log (x (\log (-1+x)+\log (x)))\right ) \] Input:

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]
 

Output:

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

Rubi [A] (verified)

Time = 2.00 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.015, Rules used = {7239, 7279, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 7239

\(\displaystyle \int \frac {2 x^2+(x-1) \log (x-1) \left (x^4-3 x^3+5 x+(x-3) x \log (x (\log (x-1)+\log (x)))-2\right )+(x-1) \log (x) \left (x^4-3 x^3+5 x+(x-3) x \log (x (\log (x-1)+\log (x)))-2\right )-5 x+2}{x \left (x^2-3 x+2\right ) (\log (x-1)+\log (x)) ((x-2) x+\log (x (\log (x-1)+\log (x))))}dx\)

\(\Big \downarrow \) 7279

\(\displaystyle \int \left (\frac {2 x^3 \log (x-1)+2 x^3 \log (x)-4 x^2 \log (x-1)-4 x^2 \log (x)+2 x+3 x \log (x-1)+3 x \log (x)-\log (x-1)-\log (x)-1}{(x-1) x (\log (x-1)+\log (x)) \left (x^2-2 x+\log (x (\log (x-1)+\log (x)))\right )}+\frac {x-3}{x-2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \log \left (-x^2+2 x-\log (x (\log (x-1)+\log (x)))\right )+x-\log (2-x)\)

Input:

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)*L 
og[-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])*L 
og[x*Log[-1 + x] + x*Log[x]]),x]
 

Output:

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

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7239
Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; Simpl 
erIntegrandQ[v, u, x]]
 

rule 7279
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] /; Su 
mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
 
Maple [A] (verified)

Time = 31.84 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90

method result size
parallelrisch \(\frac {1}{2}-\ln \left (-2+x \right )+\ln \left (x^{2}-2 x +\ln \left (\left (\ln \left (-1+x \right )+\ln \left (x \right )\right ) x \right )\right )+x\) \(28\)
default \(x -\ln \left (-2+x \right )+\ln \left (\ln \left (x \right )-\frac {i \left (\pi \,\operatorname {csgn}\left (i \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )-\pi \,\operatorname {csgn}\left (i \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right ) \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )^{2}-\pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )^{2}+\pi \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )^{3}+2 i x^{2}-4 i x +2 i \ln \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )}{2}\right )\) \(134\)
risch \(x -\ln \left (-2+x \right )+\ln \left (\ln \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )-\frac {i \left (-\pi \,\operatorname {csgn}\left (i \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right ) \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )^{2}+\pi \,\operatorname {csgn}\left (i \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )+\pi \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )^{3}-\pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x \left (\ln \left (-1+x \right )+\ln \left (x \right )\right )\right )^{2}+2 i x^{2}-4 i x +2 i \ln \left (x \right )\right )}{2}\right )\) \(134\)

Input:

int((((x^3-4*x^2+3*x)*ln(x)+(x^3-4*x^2+3*x)*ln(-1+x))*ln(x*ln(x)+ln(-1+x)* 
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(-1 
+x)+2*x^2-5*x+2)/(((x^3-3*x^2+2*x)*ln(x)+(x^3-3*x^2+2*x)*ln(-1+x))*ln(x*ln 
(x)+ln(-1+x)*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(- 
1+x)),x,method=_RETURNVERBOSE)
 

Output:

1/2-ln(-2+x)+ln(x^2-2*x+ln((ln(-1+x)+ln(x))*x))+x
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90 \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=x + \log \left (x^{2} - 2 \, x + \log \left (x \log \left (x - 1\right ) + x \log \left (x\right )\right )\right ) - \log \left (x - 2\right ) \] Input:

integrate((((x^3-4*x^2+3*x)*log(x)+(x^3-4*x^2+3*x)*log(-1+x))*log(x*log(x) 
+log(-1+x)*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(-1+x)+2*x^2-5*x+2)/(((x^3-3*x^2+2*x)*log(x)+(x^3-3*x^2+2*x)*log 
(-1+x))*log(x*log(x)+log(-1+x)*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(-1+x)),x, algorithm="fricas")
 

Output:

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

Sympy [A] (verification not implemented)

Time = 0.89 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.87 \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=x - \log {\left (x - 2 \right )} + \log {\left (x^{2} - 2 x + \log {\left (x \log {\left (x \right )} + x \log {\left (x - 1 \right )} \right )} \right )} \] Input:

integrate((((x**3-4*x**2+3*x)*ln(x)+(x**3-4*x**2+3*x)*ln(-1+x))*ln(x*ln(x) 
+ln(-1+x)*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(-1+x)+2*x**2-5*x+2)/(((x**3-3*x**2+2*x)*ln(x)+(x**3-3*x**2 
+2*x)*ln(-1+x))*ln(x*ln(x)+ln(-1+x)*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(-1+x)),x)
 

Output:

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

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.84 \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=x + \log \left (x^{2} - 2 \, x + \log \left (x\right ) + \log \left (\log \left (x - 1\right ) + \log \left (x\right )\right )\right ) - \log \left (x - 2\right ) \] Input:

integrate((((x^3-4*x^2+3*x)*log(x)+(x^3-4*x^2+3*x)*log(-1+x))*log(x*log(x) 
+log(-1+x)*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(-1+x)+2*x^2-5*x+2)/(((x^3-3*x^2+2*x)*log(x)+(x^3-3*x^2+2*x)*log 
(-1+x))*log(x*log(x)+log(-1+x)*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(-1+x)),x, algorithm="maxima")
 

Output:

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

Giac [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.84 \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=x + \log \left (x^{2} - 2 \, x + \log \left (x\right ) + \log \left (\log \left (x - 1\right ) + \log \left (x\right )\right )\right ) - \log \left (x - 2\right ) \] Input:

integrate((((x^3-4*x^2+3*x)*log(x)+(x^3-4*x^2+3*x)*log(-1+x))*log(x*log(x) 
+log(-1+x)*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(-1+x)+2*x^2-5*x+2)/(((x^3-3*x^2+2*x)*log(x)+(x^3-3*x^2+2*x)*log 
(-1+x))*log(x*log(x)+log(-1+x)*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(-1+x)),x, algorithm="giac")
 

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=-\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 \left (x\right )\right )\,\left (\ln \left (x\right )\,\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 \left (x\right )\,\left (x^5-4\,x^4+3\,x^3+5\,x^2-7\,x+2\right )+2}{\ln \left (x\right )\,\left (-x^5+5\,x^4-8\,x^3+4\,x^2\right )-\ln \left (x\,\ln \left (x-1\right )+x\,\ln \left (x\right )\right )\,\left (\ln \left (x\right )\,\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 \] Input:

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)/(log 
(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)
 

Output:

-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)/(log 
(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)
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90 \[ \int \frac {2-5 x+2 x^2+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (-1+x)+\left (2-7 x+5 x^2+3 x^3-4 x^4+x^5\right ) \log (x)+\left (\left (3 x-4 x^2+x^3\right ) \log (-1+x)+\left (3 x-4 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))}{\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (-1+x)+\left (-4 x^2+8 x^3-5 x^4+x^5\right ) \log (x)+\left (\left (2 x-3 x^2+x^3\right ) \log (-1+x)+\left (2 x-3 x^2+x^3\right ) \log (x)\right ) \log (x \log (-1+x)+x \log (x))} \, dx=\mathrm {log}\left (\mathrm {log}\left (\mathrm {log}\left (x -1\right ) x +\mathrm {log}\left (x \right ) x \right )+x^{2}-2 x \right )-\mathrm {log}\left (x -2\right )+x \] Input:

int((((x^3-4*x^2+3*x)*log(x)+(x^3-4*x^2+3*x)*log(-1+x))*log(x*log(x)+log(- 
1+x)*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(-1+x)+2*x^2-5*x+2)/(((x^3-3*x^2+2*x)*log(x)+(x^3-3*x^2+2*x)*log(-1+x) 
)*log(x*log(x)+log(-1+x)*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(-1+x)),x)
 

Output:

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