3.18.21 \(\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\)

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

________________________________________________________________________________________

Rubi [F]  time = 73.41, 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 {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 \end {gather*}

Verification is not applicable to the result.

[In]

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)
*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 + (1
2*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])*L
og[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]

[Out]

x^2 + 4/Log[(-1 + x)^2] - 8*Defer[Int][1/(Log[(-1 + x)^2]^2*(-x + Log[x] + Log[(-1 + x)^2]*Log[x] - Log[(-1 +
x)^2]*Log[3 + x])^2), x] - 8*Defer[Int][x/(Log[(-1 + x)^2]^2*(-x + Log[x] + Log[(-1 + x)^2]*Log[x] - Log[(-1 +
 x)^2]*Log[3 + x])^2), x] - 4*Defer[Int][1/(Log[(-1 + x)^2]*(-x + Log[x] + Log[(-1 + x)^2]*Log[x] - Log[(-1 +
x)^2]*Log[3 + x])^2), x] + 4*Defer[Int][x/(Log[(-1 + x)^2]*(-x + Log[x] + Log[(-1 + x)^2]*Log[x] - Log[(-1 + x
)^2]*Log[3 + x])^2), x] + 16*Defer[Int][Log[x]/(Log[(-1 + x)^2]^2*(-x + Log[x] + Log[(-1 + x)^2]*Log[x] - Log[
(-1 + x)^2]*Log[3 + x])^2), x] - 4*Defer[Int][Log[x]/(Log[(-1 + x)^2]*(-x + Log[x] + Log[(-1 + x)^2]*Log[x] -
Log[(-1 + x)^2]*Log[3 + x])^2), x] - 16*Defer[Int][1/(Log[(-1 + x)^2]^2*(-x + Log[x] + Log[(-1 + x)^2]*Log[x]
- Log[(-1 + x)^2]*Log[3 + x])), x] + 4*Defer[Int][1/(Log[(-1 + x)^2]*(-x + Log[x] + Log[(-1 + x)^2]*Log[x] - L
og[(-1 + x)^2]*Log[3 + x])), x] - 12*Defer[Int][1/((3 + x)*(x - Log[x] - Log[(-1 + x)^2]*Log[x] + Log[(-1 + x)
^2]*Log[3 + x])^2), x] - 8*Defer[Int][1/((-1 + x)*Log[(-1 + x)^2]^2*(x - Log[x] - Log[(-1 + x)^2]*Log[x] + Log
[(-1 + x)^2]*Log[3 + x])^2), x] + 4*Defer[Int][Log[x]/(x*(x - Log[x] - Log[(-1 + x)^2]*Log[x] + Log[(-1 + x)^2
]*Log[3 + x])^2), x] - 4*Defer[Int][Log[x]/((3 + x)*(x - Log[x] - Log[(-1 + x)^2]*Log[x] + Log[(-1 + x)^2]*Log
[3 + x])^2), x] + 16*Defer[Int][Log[x]/((-1 + x)*Log[(-1 + x)^2]^2*(x - Log[x] - Log[(-1 + x)^2]*Log[x] + Log[
(-1 + x)^2]*Log[3 + x])^2), x] + 4*Defer[Int][Log[x]/(x*Log[(-1 + x)^2]*(x - Log[x] - Log[(-1 + x)^2]*Log[x] +
 Log[(-1 + x)^2]*Log[3 + x])^2), x] - 8*Defer[Int][Log[x]^2/((-1 + x)*Log[(-1 + x)^2]^2*(x - Log[x] - Log[(-1
+ x)^2]*Log[x] + Log[(-1 + x)^2]*Log[3 + x])^2), x] + 16*Defer[Int][1/((-1 + x)*Log[(-1 + x)^2]^2*(x - Log[x]
- Log[(-1 + x)^2]*Log[x] + Log[(-1 + x)^2]*Log[3 + x])), x] + 4*Defer[Int][1/(x*Log[(-1 + x)^2]*(x - Log[x] -
Log[(-1 + x)^2]*Log[x] + Log[(-1 + x)^2]*Log[3 + x])), x] - 16*Defer[Int][Log[x]/((-1 + x)*Log[(-1 + x)^2]^2*(
x - Log[x] - Log[(-1 + x)^2]*Log[x] + Log[(-1 + x)^2]*Log[3 + x])), x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2 \left (-x \left (6-6 x-3 x^3+2 x^4+x^5\right )-x (3+x) \left (-4-x+x^2+2 (-1+x) x \log \left ((-1+x)^2\right )+(-1+x) x \log ^2\left ((-1+x)^2\right )\right ) \log ^2(x)-2 \left (-3+2 x+x^2\right ) \left (1-x+x^3 \log \left ((-1+x)^2\right )\right ) \log (3+x)-x (3+x) \left (-4+(-1+x) x \log ^2\left ((-1+x)^2\right )\right ) \log ^2(3+x)+2 x \log (x) \left (2-x-4 x^2+2 x^3+x^4-12 \log (3+x)-4 x \log (3+x)+x \left (-3+2 x+x^2\right ) \log ^2\left ((-1+x)^2\right ) \log (3+x)+x \left (-3+2 x+x^2\right ) \log \left ((-1+x)^2\right ) (x+\log (3+x))\right )\right )}{x \left (3-2 x-x^2\right ) \left (x-\left (1+\log \left ((-1+x)^2\right )\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2} \, dx\\ &=2 \int \frac {-x \left (6-6 x-3 x^3+2 x^4+x^5\right )-x (3+x) \left (-4-x+x^2+2 (-1+x) x \log \left ((-1+x)^2\right )+(-1+x) x \log ^2\left ((-1+x)^2\right )\right ) \log ^2(x)-2 \left (-3+2 x+x^2\right ) \left (1-x+x^3 \log \left ((-1+x)^2\right )\right ) \log (3+x)-x (3+x) \left (-4+(-1+x) x \log ^2\left ((-1+x)^2\right )\right ) \log ^2(3+x)+2 x \log (x) \left (2-x-4 x^2+2 x^3+x^4-12 \log (3+x)-4 x \log (3+x)+x \left (-3+2 x+x^2\right ) \log ^2\left ((-1+x)^2\right ) \log (3+x)+x \left (-3+2 x+x^2\right ) \log \left ((-1+x)^2\right ) (x+\log (3+x))\right )}{x \left (3-2 x-x^2\right ) \left (x-\left (1+\log \left ((-1+x)^2\right )\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2} \, dx\\ &=2 \int \left (\frac {-4-x \log ^2\left ((-1+x)^2\right )+x^2 \log ^2\left ((-1+x)^2\right )}{(-1+x) \log ^2\left ((-1+x)^2\right )}+\frac {2 (x-\log (x)) \left (-6 x^2-2 x^3+3 \log \left ((-1+x)^2\right )-5 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+x^3 \log \left ((-1+x)^2\right )+3 \log ^2\left ((-1+x)^2\right )-3 x \log ^2\left ((-1+x)^2\right )+6 x \log (x)+2 x^2 \log (x)\right )}{(-1+x) x (3+x) \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2}-\frac {2 \left (-4 x^2+\log \left ((-1+x)^2\right )-2 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+4 x \log (x)\right )}{(-1+x) x \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )}\right ) \, dx\\ &=2 \int \frac {-4-x \log ^2\left ((-1+x)^2\right )+x^2 \log ^2\left ((-1+x)^2\right )}{(-1+x) \log ^2\left ((-1+x)^2\right )} \, dx+4 \int \frac {(x-\log (x)) \left (-6 x^2-2 x^3+3 \log \left ((-1+x)^2\right )-5 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+x^3 \log \left ((-1+x)^2\right )+3 \log ^2\left ((-1+x)^2\right )-3 x \log ^2\left ((-1+x)^2\right )+6 x \log (x)+2 x^2 \log (x)\right )}{(-1+x) x (3+x) \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2} \, dx-4 \int \frac {-4 x^2+\log \left ((-1+x)^2\right )-2 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+4 x \log (x)}{(-1+x) x \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )} \, dx\\ &=2 \int \left (x-\frac {4}{(-1+x) \log ^2\left ((-1+x)^2\right )}\right ) \, dx+4 \int \frac {\left ((-1+x)^2 (3+x) \log \left ((-1+x)^2\right )-3 (-1+x) \log ^2\left ((-1+x)^2\right )-2 x (3+x) (x-\log (x))\right ) (-x+\log (x))}{(1-x) x (3+x) \log ^2\left ((-1+x)^2\right ) \left (x-\left (1+\log \left ((-1+x)^2\right )\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2} \, dx-4 \int \left (\frac {4 x^2-\log \left ((-1+x)^2\right )+2 x \log \left ((-1+x)^2\right )-x^2 \log \left ((-1+x)^2\right )-4 x \log (x)}{x \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )}+\frac {-4 x^2+\log \left ((-1+x)^2\right )-2 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+4 x \log (x)}{(-1+x) \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )}\right ) \, dx\\ &=x^2-4 \int \frac {4 x^2-\log \left ((-1+x)^2\right )+2 x \log \left ((-1+x)^2\right )-x^2 \log \left ((-1+x)^2\right )-4 x \log (x)}{x \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )} \, dx-4 \int \frac {-4 x^2+\log \left ((-1+x)^2\right )-2 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+4 x \log (x)}{(-1+x) \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )} \, dx+4 \int \left (\frac {(x-\log (x)) \left (-6 x^2-2 x^3+3 \log \left ((-1+x)^2\right )-5 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+x^3 \log \left ((-1+x)^2\right )+3 \log ^2\left ((-1+x)^2\right )-3 x \log ^2\left ((-1+x)^2\right )+6 x \log (x)+2 x^2 \log (x)\right )}{4 (-1+x) \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2}-\frac {(x-\log (x)) \left (-6 x^2-2 x^3+3 \log \left ((-1+x)^2\right )-5 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+x^3 \log \left ((-1+x)^2\right )+3 \log ^2\left ((-1+x)^2\right )-3 x \log ^2\left ((-1+x)^2\right )+6 x \log (x)+2 x^2 \log (x)\right )}{3 x \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2}+\frac {(x-\log (x)) \left (-6 x^2-2 x^3+3 \log \left ((-1+x)^2\right )-5 x \log \left ((-1+x)^2\right )+x^2 \log \left ((-1+x)^2\right )+x^3 \log \left ((-1+x)^2\right )+3 \log ^2\left ((-1+x)^2\right )-3 x \log ^2\left ((-1+x)^2\right )+6 x \log (x)+2 x^2 \log (x)\right )}{12 (3+x) \log ^2\left ((-1+x)^2\right ) \left (x-\log (x)-\log \left ((-1+x)^2\right ) \log (x)+\log \left ((-1+x)^2\right ) \log (3+x)\right )^2}\right ) \, dx-8 \int \frac {1}{(-1+x) \log ^2\left ((-1+x)^2\right )} \, dx\\ &=\text {Rest of rules removed due to large latex content} \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.32, size = 49, normalized size = 1.48 \begin {gather*} 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 ) \end {gather*}

Antiderivative was successfully verified.

[In]

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 - 1
4*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)*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)*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]

[Out]

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]))

________________________________________________________________________________________

fricas [B]  time = 0.73, size = 73, normalized size = 2.21 \begin {gather*} \frac {x^{3} + {\left (x^{2} \log \left (x + 3\right ) - x^{2} \log \relax (x)\right )} \log \left (x^{2} - 2 \, x + 1\right ) - {\left (x^{2} + 4\right )} \log \relax (x) + 4 \, \log \left (x + 3\right )}{{\left (\log \left (x + 3\right ) - \log \relax (x)\right )} \log \left (x^{2} - 2 \, x + 1\right ) + x - \log \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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)*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)*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+1
2*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, algorithm="fricas"
)

[Out]

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

________________________________________________________________________________________

giac [A]  time = 3.71, size = 50, normalized size = 1.52 \begin {gather*} x^{2} + \frac {4 \, {\left (\log \left (x + 3\right ) - \log \relax (x)\right )}}{\log \left (x^{2} - 2 \, x + 1\right ) \log \left (x + 3\right ) - \log \left (x^{2} - 2 \, x + 1\right ) \log \relax (x) + x - \log \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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)*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)*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+1
2*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, algorithm="giac")

[Out]

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))

________________________________________________________________________________________

maple [C]  time = 0.15, size = 177, normalized size = 5.36




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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+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)*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,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.68, size = 69, normalized size = 2.09 \begin {gather*} -\frac {2 \, x^{2} \log \left (x - 1\right ) \log \relax (x) - x^{3} - 2 \, {\left (x^{2} \log \left (x - 1\right ) + 2\right )} \log \left (x + 3\right ) + {\left (x^{2} + 4\right )} \log \relax (x)}{2 \, \log \left (x + 3\right ) \log \left (x - 1\right ) - 2 \, \log \left (x - 1\right ) \log \relax (x) + x - \log \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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)*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)*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+1
2*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, algorithm="maxima"
)

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.19, size = 51, normalized size = 1.55 \begin {gather*} x^2+\frac {4\,\ln \left (x+3\right )-4\,\ln \relax (x)}{x-\ln \relax (x)+\ln \left (x+3\right )\,\ln \left (x^2-2\,x+1\right )-\ln \left (x^2-2\,x+1\right )\,\ln \relax (x)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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)*(lo
g(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)) + 1
2*x^2 + 6*x^4 - 4*x^5 - 2*x^6 + log(x + 3)*(4*x^2 - log(x)*(48*x + 16*x^2) - 20*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)*lo
g(x)*(4*x^2 - 6*x + 2*x^3))),x)

[Out]

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))

________________________________________________________________________________________

sympy [A]  time = 0.90, size = 37, normalized size = 1.12 \begin {gather*} x^{2} + \frac {4 \log {\relax (x )} - 4 \log {\left (x + 3 \right )}}{- x + \left (\log {\relax (x )} - \log {\left (x + 3 \right )}\right ) \log {\left (x^{2} - 2 x + 1 \right )} + \log {\relax (x )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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)*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+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)*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)

[Out]

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

________________________________________________________________________________________