\(\int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+(-8 x+4 x^2+16 x^3-8 x^4-4 x^5) \log (x)+(-24 x-14 x^2+4 x^3+2 x^4) \log ^2(x)+(-12+20 x-4 x^2-4 x^3+(48 x+16 x^2) \log (x)) \log (3+x)+(-24 x-8 x^2) \log ^2(3+x)+((12 x^3-8 x^4-4 x^5) \log (x)+(-12 x^2+8 x^3+4 x^4) \log ^2(x)+(-12 x^3+8 x^4+4 x^5+(12 x^2-8 x^3-4 x^4) \log (x)) \log (3+x)) \log (1-2 x+x^2)+((-6 x^2+4 x^3+2 x^4) \log ^2(x)+(12 x^2-8 x^3-4 x^4) \log (x) \log (3+x)+(-6 x^2+4 x^3+2 x^4) \log ^2(3+x)) \log ^2(1-2 x+x^2)}{-3 x^3+2 x^4+x^5+(6 x^2-4 x^3-2 x^4) \log (x)+(-3 x+2 x^2+x^3) \log ^2(x)+((6 x^2-4 x^3-2 x^4) \log (x)+(-6 x+4 x^2+2 x^3) \log ^2(x)+(-6 x^2+4 x^3+2 x^4+(6 x-4 x^2-2 x^3) \log (x)) \log (3+x)) \log (1-2 x+x^2)+((-3 x+2 x^2+x^3) \log ^2(x)+(6 x-4 x^2-2 x^3) \log (x) \log (3+x)+(-3 x+2 x^2+x^3) \log ^2(3+x)) \log ^2(1-2 x+x^2)} \, dx\) [1721]

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [C] (warning: unable to verify)
Fricas [B] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 504, antiderivative size = 33 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=x^2+\frac {4}{\log \left ((-1+x)^2\right )+\frac {-x+\log (x)}{\log (x)-\log (3+x)}} \] Output:

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

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.48 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=2 \left (\frac {x^2}{2}+\frac {-2 \log (x)+2 \log (3+x)}{x-\left (1+\log \left ((-1+x)^2\right )\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)}\right ) \] Input:

Integrate[(12*x - 12*x^2 - 6*x^4 + 4*x^5 + 2*x^6 + (-8*x + 4*x^2 + 16*x^3 
- 8*x^4 - 4*x^5)*Log[x] + (-24*x - 14*x^2 + 4*x^3 + 2*x^4)*Log[x]^2 + (-12 
 + 20*x - 4*x^2 - 4*x^3 + (48*x + 16*x^2)*Log[x])*Log[3 + x] + (-24*x - 8* 
x^2)*Log[3 + x]^2 + ((12*x^3 - 8*x^4 - 4*x^5)*Log[x] + (-12*x^2 + 8*x^3 + 
4*x^4)*Log[x]^2 + (-12*x^3 + 8*x^4 + 4*x^5 + (12*x^2 - 8*x^3 - 4*x^4)*Log[ 
x])*Log[3 + x])*Log[1 - 2*x + x^2] + ((-6*x^2 + 4*x^3 + 2*x^4)*Log[x]^2 + 
(12*x^2 - 8*x^3 - 4*x^4)*Log[x]*Log[3 + x] + (-6*x^2 + 4*x^3 + 2*x^4)*Log[ 
3 + x]^2)*Log[1 - 2*x + x^2]^2)/(-3*x^3 + 2*x^4 + x^5 + (6*x^2 - 4*x^3 - 2 
*x^4)*Log[x] + (-3*x + 2*x^2 + x^3)*Log[x]^2 + ((6*x^2 - 4*x^3 - 2*x^4)*Lo 
g[x] + (-6*x + 4*x^2 + 2*x^3)*Log[x]^2 + (-6*x^2 + 4*x^3 + 2*x^4 + (6*x - 
4*x^2 - 2*x^3)*Log[x])*Log[3 + x])*Log[1 - 2*x + x^2] + ((-3*x + 2*x^2 + x 
^3)*Log[x]^2 + (6*x - 4*x^2 - 2*x^3)*Log[x]*Log[3 + x] + (-3*x + 2*x^2 + x 
^3)*Log[3 + x]^2)*Log[1 - 2*x + x^2]^2),x]
 

Output:

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

Rubi [F]

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^6+4 x^5-6 x^4-12 x^2+\left (-8 x^2-24 x\right ) \log ^2(x+3)+\left (-4 x^3-4 x^2+\left (16 x^2+48 x\right ) \log (x)+20 x-12\right ) \log (x+3)+\left (2 x^4+4 x^3-14 x^2-24 x\right ) \log ^2(x)+\left (\left (2 x^4+4 x^3-6 x^2\right ) \log ^2(x)+\left (2 x^4+4 x^3-6 x^2\right ) \log ^2(x+3)+\left (-4 x^4-8 x^3+12 x^2\right ) \log (x+3) \log (x)\right ) \log ^2\left (x^2-2 x+1\right )+\left (\left (-4 x^5-8 x^4+12 x^3\right ) \log (x)+\left (4 x^4+8 x^3-12 x^2\right ) \log ^2(x)+\left (4 x^5+8 x^4-12 x^3+\left (-4 x^4-8 x^3+12 x^2\right ) \log (x)\right ) \log (x+3)\right ) \log \left (x^2-2 x+1\right )+\left (-4 x^5-8 x^4+16 x^3+4 x^2-8 x\right ) \log (x)+12 x}{x^5+2 x^4-3 x^3+\left (x^3+2 x^2-3 x\right ) \log ^2(x)+\left (\left (x^3+2 x^2-3 x\right ) \log ^2(x)+\left (x^3+2 x^2-3 x\right ) \log ^2(x+3)+\left (-2 x^3-4 x^2+6 x\right ) \log (x+3) \log (x)\right ) \log ^2\left (x^2-2 x+1\right )+\left (\left (2 x^3+4 x^2-6 x\right ) \log ^2(x)+\left (-2 x^4-4 x^3+6 x^2\right ) \log (x)+\left (2 x^4+4 x^3-6 x^2+\left (-2 x^3-4 x^2+6 x\right ) \log (x)\right ) \log (x+3)\right ) \log \left (x^2-2 x+1\right )+\left (-2 x^4-4 x^3+6 x^2\right ) \log (x)} \, dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 7279

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

\(\Big \downarrow \) 7299

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

Input:

Int[(12*x - 12*x^2 - 6*x^4 + 4*x^5 + 2*x^6 + (-8*x + 4*x^2 + 16*x^3 - 8*x^ 
4 - 4*x^5)*Log[x] + (-24*x - 14*x^2 + 4*x^3 + 2*x^4)*Log[x]^2 + (-12 + 20* 
x - 4*x^2 - 4*x^3 + (48*x + 16*x^2)*Log[x])*Log[3 + x] + (-24*x - 8*x^2)*L 
og[3 + x]^2 + ((12*x^3 - 8*x^4 - 4*x^5)*Log[x] + (-12*x^2 + 8*x^3 + 4*x^4) 
*Log[x]^2 + (-12*x^3 + 8*x^4 + 4*x^5 + (12*x^2 - 8*x^3 - 4*x^4)*Log[x])*Lo 
g[3 + x])*Log[1 - 2*x + x^2] + ((-6*x^2 + 4*x^3 + 2*x^4)*Log[x]^2 + (12*x^ 
2 - 8*x^3 - 4*x^4)*Log[x]*Log[3 + x] + (-6*x^2 + 4*x^3 + 2*x^4)*Log[3 + x] 
^2)*Log[1 - 2*x + x^2]^2)/(-3*x^3 + 2*x^4 + x^5 + (6*x^2 - 4*x^3 - 2*x^4)* 
Log[x] + (-3*x + 2*x^2 + x^3)*Log[x]^2 + ((6*x^2 - 4*x^3 - 2*x^4)*Log[x] + 
 (-6*x + 4*x^2 + 2*x^3)*Log[x]^2 + (-6*x^2 + 4*x^3 + 2*x^4 + (6*x - 4*x^2 
- 2*x^3)*Log[x])*Log[3 + x])*Log[1 - 2*x + x^2] + ((-3*x + 2*x^2 + x^3)*Lo 
g[x]^2 + (6*x - 4*x^2 - 2*x^3)*Log[x]*Log[3 + x] + (-3*x + 2*x^2 + x^3)*Lo 
g[3 + x]^2)*Log[1 - 2*x + x^2]^2),x]
 

Output:

$Aborted
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.60 (sec) , antiderivative size = 177, normalized size of antiderivative = 5.36

\[x^{2}+\frac {8 i \left (\ln \left (x \right )-\ln \left (3+x \right )\right )}{\pi \ln \left (x \right ) \operatorname {csgn}\left (i \left (-1+x \right )\right )^{2} \operatorname {csgn}\left (i \left (-1+x \right )^{2}\right )-2 \pi \ln \left (x \right ) \operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i \left (-1+x \right )^{2}\right )^{2}+\pi \ln \left (x \right ) \operatorname {csgn}\left (i \left (-1+x \right )^{2}\right )^{3}-\pi \operatorname {csgn}\left (i \left (-1+x \right )\right )^{2} \operatorname {csgn}\left (i \left (-1+x \right )^{2}\right ) \ln \left (3+x \right )+2 \pi \,\operatorname {csgn}\left (i \left (-1+x \right )\right ) \operatorname {csgn}\left (i \left (-1+x \right )^{2}\right )^{2} \ln \left (3+x \right )-\pi \operatorname {csgn}\left (i \left (-1+x \right )^{2}\right )^{3} \ln \left (3+x \right )+4 i \ln \left (x \right ) \ln \left (-1+x \right )-4 i \ln \left (3+x \right ) \ln \left (-1+x \right )+2 i \ln \left (x \right )-2 i x}\]

Input:

int((((2*x^4+4*x^3-6*x^2)*ln(3+x)^2+(-4*x^4-8*x^3+12*x^2)*ln(x)*ln(3+x)+(2 
*x^4+4*x^3-6*x^2)*ln(x)^2)*ln(x^2-2*x+1)^2+(((-4*x^4-8*x^3+12*x^2)*ln(x)+4 
*x^5+8*x^4-12*x^3)*ln(3+x)+(4*x^4+8*x^3-12*x^2)*ln(x)^2+(-4*x^5-8*x^4+12*x 
^3)*ln(x))*ln(x^2-2*x+1)+(-8*x^2-24*x)*ln(3+x)^2+((16*x^2+48*x)*ln(x)-4*x^ 
3-4*x^2+20*x-12)*ln(3+x)+(2*x^4+4*x^3-14*x^2-24*x)*ln(x)^2+(-4*x^5-8*x^4+1 
6*x^3+4*x^2-8*x)*ln(x)+2*x^6+4*x^5-6*x^4-12*x^2+12*x)/(((x^3+2*x^2-3*x)*ln 
(3+x)^2+(-2*x^3-4*x^2+6*x)*ln(x)*ln(3+x)+(x^3+2*x^2-3*x)*ln(x)^2)*ln(x^2-2 
*x+1)^2+(((-2*x^3-4*x^2+6*x)*ln(x)+2*x^4+4*x^3-6*x^2)*ln(3+x)+(2*x^3+4*x^2 
-6*x)*ln(x)^2+(-2*x^4-4*x^3+6*x^2)*ln(x))*ln(x^2-2*x+1)+(x^3+2*x^2-3*x)*ln 
(x)^2+(-2*x^4-4*x^3+6*x^2)*ln(x)+x^5+2*x^4-3*x^3),x)
 

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (33) = 66\).

Time = 0.08 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.21 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=\frac {x^{3} + {\left (x^{2} \log \left (x + 3\right ) - x^{2} \log \left (x\right )\right )} \log \left (x^{2} - 2 \, x + 1\right ) - {\left (x^{2} + 4\right )} \log \left (x\right ) + 4 \, \log \left (x + 3\right )}{{\left (\log \left (x + 3\right ) - \log \left (x\right )\right )} \log \left (x^{2} - 2 \, x + 1\right ) + x - \log \left (x\right )} \] Input:

integrate((((2*x^4+4*x^3-6*x^2)*log(3+x)^2+(-4*x^4-8*x^3+12*x^2)*log(x)*lo 
g(3+x)+(2*x^4+4*x^3-6*x^2)*log(x)^2)*log(x^2-2*x+1)^2+(((-4*x^4-8*x^3+12*x 
^2)*log(x)+4*x^5+8*x^4-12*x^3)*log(3+x)+(4*x^4+8*x^3-12*x^2)*log(x)^2+(-4* 
x^5-8*x^4+12*x^3)*log(x))*log(x^2-2*x+1)+(-8*x^2-24*x)*log(3+x)^2+((16*x^2 
+48*x)*log(x)-4*x^3-4*x^2+20*x-12)*log(3+x)+(2*x^4+4*x^3-14*x^2-24*x)*log( 
x)^2+(-4*x^5-8*x^4+16*x^3+4*x^2-8*x)*log(x)+2*x^6+4*x^5-6*x^4-12*x^2+12*x) 
/(((x^3+2*x^2-3*x)*log(3+x)^2+(-2*x^3-4*x^2+6*x)*log(x)*log(3+x)+(x^3+2*x^ 
2-3*x)*log(x)^2)*log(x^2-2*x+1)^2+(((-2*x^3-4*x^2+6*x)*log(x)+2*x^4+4*x^3- 
6*x^2)*log(3+x)+(2*x^3+4*x^2-6*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x))*lo 
g(x^2-2*x+1)+(x^3+2*x^2-3*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x)+x^5+2*x^ 
4-3*x^3),x, algorithm="fricas")
 

Output:

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

Sympy [A] (verification not implemented)

Time = 0.43 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.12 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=x^{2} + \frac {4 \log {\left (x \right )} - 4 \log {\left (x + 3 \right )}}{- x + \left (\log {\left (x \right )} - \log {\left (x + 3 \right )}\right ) \log {\left (x^{2} - 2 x + 1 \right )} + \log {\left (x \right )}} \] Input:

integrate((((2*x**4+4*x**3-6*x**2)*ln(3+x)**2+(-4*x**4-8*x**3+12*x**2)*ln( 
x)*ln(3+x)+(2*x**4+4*x**3-6*x**2)*ln(x)**2)*ln(x**2-2*x+1)**2+(((-4*x**4-8 
*x**3+12*x**2)*ln(x)+4*x**5+8*x**4-12*x**3)*ln(3+x)+(4*x**4+8*x**3-12*x**2 
)*ln(x)**2+(-4*x**5-8*x**4+12*x**3)*ln(x))*ln(x**2-2*x+1)+(-8*x**2-24*x)*l 
n(3+x)**2+((16*x**2+48*x)*ln(x)-4*x**3-4*x**2+20*x-12)*ln(3+x)+(2*x**4+4*x 
**3-14*x**2-24*x)*ln(x)**2+(-4*x**5-8*x**4+16*x**3+4*x**2-8*x)*ln(x)+2*x** 
6+4*x**5-6*x**4-12*x**2+12*x)/(((x**3+2*x**2-3*x)*ln(3+x)**2+(-2*x**3-4*x* 
*2+6*x)*ln(x)*ln(3+x)+(x**3+2*x**2-3*x)*ln(x)**2)*ln(x**2-2*x+1)**2+(((-2* 
x**3-4*x**2+6*x)*ln(x)+2*x**4+4*x**3-6*x**2)*ln(3+x)+(2*x**3+4*x**2-6*x)*l 
n(x)**2+(-2*x**4-4*x**3+6*x**2)*ln(x))*ln(x**2-2*x+1)+(x**3+2*x**2-3*x)*ln 
(x)**2+(-2*x**4-4*x**3+6*x**2)*ln(x)+x**5+2*x**4-3*x**3),x)
 

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 69 vs. \(2 (33) = 66\).

Time = 0.16 (sec) , antiderivative size = 69, normalized size of antiderivative = 2.09 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=-\frac {2 \, x^{2} \log \left (x - 1\right ) \log \left (x\right ) - x^{3} - 2 \, {\left (x^{2} \log \left (x - 1\right ) + 2\right )} \log \left (x + 3\right ) + {\left (x^{2} + 4\right )} \log \left (x\right )}{2 \, \log \left (x + 3\right ) \log \left (x - 1\right ) - 2 \, \log \left (x - 1\right ) \log \left (x\right ) + x - \log \left (x\right )} \] Input:

integrate((((2*x^4+4*x^3-6*x^2)*log(3+x)^2+(-4*x^4-8*x^3+12*x^2)*log(x)*lo 
g(3+x)+(2*x^4+4*x^3-6*x^2)*log(x)^2)*log(x^2-2*x+1)^2+(((-4*x^4-8*x^3+12*x 
^2)*log(x)+4*x^5+8*x^4-12*x^3)*log(3+x)+(4*x^4+8*x^3-12*x^2)*log(x)^2+(-4* 
x^5-8*x^4+12*x^3)*log(x))*log(x^2-2*x+1)+(-8*x^2-24*x)*log(3+x)^2+((16*x^2 
+48*x)*log(x)-4*x^3-4*x^2+20*x-12)*log(3+x)+(2*x^4+4*x^3-14*x^2-24*x)*log( 
x)^2+(-4*x^5-8*x^4+16*x^3+4*x^2-8*x)*log(x)+2*x^6+4*x^5-6*x^4-12*x^2+12*x) 
/(((x^3+2*x^2-3*x)*log(3+x)^2+(-2*x^3-4*x^2+6*x)*log(x)*log(3+x)+(x^3+2*x^ 
2-3*x)*log(x)^2)*log(x^2-2*x+1)^2+(((-2*x^3-4*x^2+6*x)*log(x)+2*x^4+4*x^3- 
6*x^2)*log(3+x)+(2*x^3+4*x^2-6*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x))*lo 
g(x^2-2*x+1)+(x^3+2*x^2-3*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x)+x^5+2*x^ 
4-3*x^3),x, algorithm="maxima")
 

Output:

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

Giac [A] (verification not implemented)

Time = 2.13 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.52 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=x^{2} + \frac {4 \, {\left (\log \left (x + 3\right ) - \log \left (x\right )\right )}}{\log \left (x^{2} - 2 \, x + 1\right ) \log \left (x + 3\right ) - \log \left (x^{2} - 2 \, x + 1\right ) \log \left (x\right ) + x - \log \left (x\right )} \] Input:

integrate((((2*x^4+4*x^3-6*x^2)*log(3+x)^2+(-4*x^4-8*x^3+12*x^2)*log(x)*lo 
g(3+x)+(2*x^4+4*x^3-6*x^2)*log(x)^2)*log(x^2-2*x+1)^2+(((-4*x^4-8*x^3+12*x 
^2)*log(x)+4*x^5+8*x^4-12*x^3)*log(3+x)+(4*x^4+8*x^3-12*x^2)*log(x)^2+(-4* 
x^5-8*x^4+12*x^3)*log(x))*log(x^2-2*x+1)+(-8*x^2-24*x)*log(3+x)^2+((16*x^2 
+48*x)*log(x)-4*x^3-4*x^2+20*x-12)*log(3+x)+(2*x^4+4*x^3-14*x^2-24*x)*log( 
x)^2+(-4*x^5-8*x^4+16*x^3+4*x^2-8*x)*log(x)+2*x^6+4*x^5-6*x^4-12*x^2+12*x) 
/(((x^3+2*x^2-3*x)*log(3+x)^2+(-2*x^3-4*x^2+6*x)*log(x)*log(3+x)+(x^3+2*x^ 
2-3*x)*log(x)^2)*log(x^2-2*x+1)^2+(((-2*x^3-4*x^2+6*x)*log(x)+2*x^4+4*x^3- 
6*x^2)*log(3+x)+(2*x^3+4*x^2-6*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x))*lo 
g(x^2-2*x+1)+(x^3+2*x^2-3*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x)+x^5+2*x^ 
4-3*x^3),x, algorithm="giac")
 

Output:

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

Mupad [B] (verification not implemented)

Time = 2.67 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.55 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=x^2+\frac {4\,\ln \left (x+3\right )-4\,\ln \left (x\right )}{x-\ln \left (x\right )+\ln \left (x+3\right )\,\ln \left (x^2-2\,x+1\right )-\ln \left (x^2-2\,x+1\right )\,\ln \left (x\right )} \] Input:

int(-(log(x^2 - 2*x + 1)*(log(x)*(8*x^4 - 12*x^3 + 4*x^5) - log(x)^2*(8*x^ 
3 - 12*x^2 + 4*x^4) + log(x + 3)*(log(x)*(8*x^3 - 12*x^2 + 4*x^4) + 12*x^3 
 - 8*x^4 - 4*x^5)) - 12*x + log(x)*(8*x - 4*x^2 - 16*x^3 + 8*x^4 + 4*x^5) 
+ log(x + 3)^2*(24*x + 8*x^2) + log(x)^2*(24*x + 14*x^2 - 4*x^3 - 2*x^4) - 
 log(x^2 - 2*x + 1)^2*(log(x + 3)^2*(4*x^3 - 6*x^2 + 2*x^4) + log(x)^2*(4* 
x^3 - 6*x^2 + 2*x^4) - log(x + 3)*log(x)*(8*x^3 - 12*x^2 + 4*x^4)) + 12*x^ 
2 + 6*x^4 - 4*x^5 - 2*x^6 + log(x + 3)*(4*x^2 - log(x)*(48*x + 16*x^2) - 2 
0*x + 4*x^3 + 12))/(2*x^4 - log(x^2 - 2*x + 1)*(log(x)*(4*x^3 - 6*x^2 + 2* 
x^4) - log(x)^2*(4*x^2 - 6*x + 2*x^3) + log(x + 3)*(6*x^2 - 4*x^3 - 2*x^4 
+ log(x)*(4*x^2 - 6*x + 2*x^3))) - 3*x^3 - log(x)*(4*x^3 - 6*x^2 + 2*x^4) 
+ x^5 + log(x)^2*(2*x^2 - 3*x + x^3) + log(x^2 - 2*x + 1)^2*(log(x + 3)^2* 
(2*x^2 - 3*x + x^3) + log(x)^2*(2*x^2 - 3*x + x^3) - log(x + 3)*log(x)*(4* 
x^2 - 6*x + 2*x^3))),x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 199, normalized size of antiderivative = 6.03 \[ \int \frac {12 x-12 x^2-6 x^4+4 x^5+2 x^6+\left (-8 x+4 x^2+16 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-24 x-14 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (-12+20 x-4 x^2-4 x^3+\left (48 x+16 x^2\right ) \log (x)\right ) \log (3+x)+\left (-24 x-8 x^2\right ) \log ^2(3+x)+\left (\left (12 x^3-8 x^4-4 x^5\right ) \log (x)+\left (-12 x^2+8 x^3+4 x^4\right ) \log ^2(x)+\left (-12 x^3+8 x^4+4 x^5+\left (12 x^2-8 x^3-4 x^4\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(x)+\left (12 x^2-8 x^3-4 x^4\right ) \log (x) \log (3+x)+\left (-6 x^2+4 x^3+2 x^4\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )}{-3 x^3+2 x^4+x^5+\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (\left (6 x^2-4 x^3-2 x^4\right ) \log (x)+\left (-6 x+4 x^2+2 x^3\right ) \log ^2(x)+\left (-6 x^2+4 x^3+2 x^4+\left (6 x-4 x^2-2 x^3\right ) \log (x)\right ) \log (3+x)\right ) \log \left (1-2 x+x^2\right )+\left (\left (-3 x+2 x^2+x^3\right ) \log ^2(x)+\left (6 x-4 x^2-2 x^3\right ) \log (x) \log (3+x)+\left (-3 x+2 x^2+x^3\right ) \log ^2(3+x)\right ) \log ^2\left (1-2 x+x^2\right )} \, dx=\frac {4 \mathrm {log}\left (x^{2}-2 x +1\right )^{2} \mathrm {log}\left (x +3\right )-4 \mathrm {log}\left (x^{2}-2 x +1\right )^{2} \mathrm {log}\left (x \right )-8 \,\mathrm {log}\left (x^{2}-2 x +1\right ) \mathrm {log}\left (x -1\right ) \mathrm {log}\left (x +3\right )+8 \,\mathrm {log}\left (x^{2}-2 x +1\right ) \mathrm {log}\left (x -1\right ) \mathrm {log}\left (x \right )+\mathrm {log}\left (x^{2}-2 x +1\right ) \mathrm {log}\left (x +3\right ) x^{2}-4 \,\mathrm {log}\left (x^{2}-2 x +1\right ) \mathrm {log}\left (x +3\right )-\mathrm {log}\left (x^{2}-2 x +1\right ) \mathrm {log}\left (x \right ) x^{2}+4 \,\mathrm {log}\left (x^{2}-2 x +1\right ) x +8 \,\mathrm {log}\left (x -1\right ) \mathrm {log}\left (x \right )-8 \,\mathrm {log}\left (x -1\right ) x +4 \,\mathrm {log}\left (x +3\right )-\mathrm {log}\left (x \right ) x^{2}+x^{3}-4 x}{\mathrm {log}\left (x^{2}-2 x +1\right ) \mathrm {log}\left (x +3\right )-\mathrm {log}\left (x^{2}-2 x +1\right ) \mathrm {log}\left (x \right )-\mathrm {log}\left (x \right )+x} \] Input:

int((((2*x^4+4*x^3-6*x^2)*log(3+x)^2+(-4*x^4-8*x^3+12*x^2)*log(x)*log(3+x) 
+(2*x^4+4*x^3-6*x^2)*log(x)^2)*log(x^2-2*x+1)^2+(((-4*x^4-8*x^3+12*x^2)*lo 
g(x)+4*x^5+8*x^4-12*x^3)*log(3+x)+(4*x^4+8*x^3-12*x^2)*log(x)^2+(-4*x^5-8* 
x^4+12*x^3)*log(x))*log(x^2-2*x+1)+(-8*x^2-24*x)*log(3+x)^2+((16*x^2+48*x) 
*log(x)-4*x^3-4*x^2+20*x-12)*log(3+x)+(2*x^4+4*x^3-14*x^2-24*x)*log(x)^2+( 
-4*x^5-8*x^4+16*x^3+4*x^2-8*x)*log(x)+2*x^6+4*x^5-6*x^4-12*x^2+12*x)/(((x^ 
3+2*x^2-3*x)*log(3+x)^2+(-2*x^3-4*x^2+6*x)*log(x)*log(3+x)+(x^3+2*x^2-3*x) 
*log(x)^2)*log(x^2-2*x+1)^2+(((-2*x^3-4*x^2+6*x)*log(x)+2*x^4+4*x^3-6*x^2) 
*log(3+x)+(2*x^3+4*x^2-6*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x))*log(x^2- 
2*x+1)+(x^3+2*x^2-3*x)*log(x)^2+(-2*x^4-4*x^3+6*x^2)*log(x)+x^5+2*x^4-3*x^ 
3),x)
 

Output:

(4*log(x**2 - 2*x + 1)**2*log(x + 3) - 4*log(x**2 - 2*x + 1)**2*log(x) - 8 
*log(x**2 - 2*x + 1)*log(x - 1)*log(x + 3) + 8*log(x**2 - 2*x + 1)*log(x - 
 1)*log(x) + log(x**2 - 2*x + 1)*log(x + 3)*x**2 - 4*log(x**2 - 2*x + 1)*l 
og(x + 3) - log(x**2 - 2*x + 1)*log(x)*x**2 + 4*log(x**2 - 2*x + 1)*x + 8* 
log(x - 1)*log(x) - 8*log(x - 1)*x + 4*log(x + 3) - log(x)*x**2 + x**3 - 4 
*x)/(log(x**2 - 2*x + 1)*log(x + 3) - log(x**2 - 2*x + 1)*log(x) - log(x) 
+ x)