\(\int \frac {-20 x^3-10 x^5+(20 x+10 x^3) \log (x)+(-10+5 x^2) \log ^2(x)+(40 x^2+20 x^4+(-20-10 x^2) \log (x)+(-10-5 x^2) \log ^2(x)) \log (\frac {2+x^2}{x})+(-20 x-10 x^3) \log ^2(\frac {2+x^2}{x})}{2 x^2+x^4+(-4 x-2 x^3) \log (\frac {2+x^2}{x})+(2+x^2) \log ^2(\frac {2+x^2}{x})} \, dx\) [2730]

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [B] (verified)
Fricas [A] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 151, antiderivative size = 29 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=5 \left (-4+x \left (-x+\frac {\log ^2(x)}{x-\log \left (\frac {2}{x}+x\right )}\right )\right ) \] Output:

5*x*(ln(x)^2/(x-ln(x+2/x))-x)-20
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.93 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=-5 x^2-\frac {5 x \log ^2(x)}{-x+\log \left (\frac {2}{x}+x\right )} \] Input:

Integrate[(-20*x^3 - 10*x^5 + (20*x + 10*x^3)*Log[x] + (-10 + 5*x^2)*Log[x 
]^2 + (40*x^2 + 20*x^4 + (-20 - 10*x^2)*Log[x] + (-10 - 5*x^2)*Log[x]^2)*L 
og[(2 + x^2)/x] + (-20*x - 10*x^3)*Log[(2 + x^2)/x]^2)/(2*x^2 + x^4 + (-4* 
x - 2*x^3)*Log[(2 + x^2)/x] + (2 + x^2)*Log[(2 + x^2)/x]^2),x]
 

Output:

-5*x^2 - (5*x*Log[x]^2)/(-x + Log[2/x + 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 {-10 x^5-20 x^3+\left (10 x^3+20 x\right ) \log (x)+\left (5 x^2-10\right ) \log ^2(x)+\left (20 x^4+40 x^2+\left (-5 x^2-10\right ) \log ^2(x)+\left (-10 x^2-20\right ) \log (x)\right ) \log \left (\frac {x^2+2}{x}\right )+\left (-10 x^3-20 x\right ) \log ^2\left (\frac {x^2+2}{x}\right )}{x^4+2 x^2+\left (x^2+2\right ) \log ^2\left (\frac {x^2+2}{x}\right )+\left (-2 x^3-4 x\right ) \log \left (\frac {x^2+2}{x}\right )} \, dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 2009

\(\displaystyle 5 \int \frac {\log ^2(x)}{\left (x-\log \left (x+\frac {2}{x}\right )\right )^2}dx-5 i \sqrt {2} \int \frac {\log ^2(x)}{\left (i \sqrt {2}-x\right ) \left (x-\log \left (x+\frac {2}{x}\right )\right )^2}dx-5 \int \frac {x \log ^2(x)}{\left (x-\log \left (x+\frac {2}{x}\right )\right )^2}dx-5 i \sqrt {2} \int \frac {\log ^2(x)}{\left (x+i \sqrt {2}\right ) \left (x-\log \left (x+\frac {2}{x}\right )\right )^2}dx+5 \int \frac {\log ^2(x)}{x-\log \left (x+\frac {2}{x}\right )}dx+10 \int \frac {\log (x)}{x-\log \left (x+\frac {2}{x}\right )}dx-5 x^2\)

Input:

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

Output:

$Aborted
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(61\) vs. \(2(28)=56\).

Time = 159.33 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.14

method result size
parallelrisch \(-\frac {20 x^{3}-20 \ln \left (\frac {x^{2}+2}{x}\right ) x^{2}-20 x \ln \left (x \right )^{2}-20 x +20 \ln \left (\frac {x^{2}+2}{x}\right )}{4 \left (x -\ln \left (\frac {x^{2}+2}{x}\right )\right )}\) \(62\)
risch \(-5 x^{2}+\frac {10 x \ln \left (x \right )^{2}}{i \pi \,\operatorname {csgn}\left (\frac {i}{x}\right ) \operatorname {csgn}\left (i \left (x^{2}+2\right )\right ) \operatorname {csgn}\left (\frac {i \left (x^{2}+2\right )}{x}\right )-i \pi \,\operatorname {csgn}\left (\frac {i}{x}\right ) {\operatorname {csgn}\left (\frac {i \left (x^{2}+2\right )}{x}\right )}^{2}-i \pi \,\operatorname {csgn}\left (i \left (x^{2}+2\right )\right ) {\operatorname {csgn}\left (\frac {i \left (x^{2}+2\right )}{x}\right )}^{2}+i \pi {\operatorname {csgn}\left (\frac {i \left (x^{2}+2\right )}{x}\right )}^{3}+2 x +2 \ln \left (x \right )-2 \ln \left (x^{2}+2\right )}\) \(134\)

Input:

int(((-10*x^3-20*x)*ln((x^2+2)/x)^2+((-5*x^2-10)*ln(x)^2+(-10*x^2-20)*ln(x 
)+20*x^4+40*x^2)*ln((x^2+2)/x)+(5*x^2-10)*ln(x)^2+(10*x^3+20*x)*ln(x)-10*x 
^5-20*x^3)/((x^2+2)*ln((x^2+2)/x)^2+(-2*x^3-4*x)*ln((x^2+2)/x)+x^4+2*x^2), 
x,method=_RETURNVERBOSE)
 

Output:

-1/4*(20*x^3-20*ln((x^2+2)/x)*x^2-20*x*ln(x)^2-20*x+20*ln((x^2+2)/x))/(x-l 
n((x^2+2)/x))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.52 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=-\frac {5 \, {\left (x^{3} - x \log \left (x\right )^{2} - x^{2} \log \left (\frac {x^{2} + 2}{x}\right )\right )}}{x - \log \left (\frac {x^{2} + 2}{x}\right )} \] Input:

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

Output:

-5*(x^3 - x*log(x)^2 - x^2*log((x^2 + 2)/x))/(x - log((x^2 + 2)/x))
 

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=- 5 x^{2} - \frac {5 x \log {\left (x \right )}^{2}}{- x + \log {\left (\frac {x^{2} + 2}{x} \right )}} \] Input:

integrate(((-10*x**3-20*x)*ln((x**2+2)/x)**2+((-5*x**2-10)*ln(x)**2+(-10*x 
**2-20)*ln(x)+20*x**4+40*x**2)*ln((x**2+2)/x)+(5*x**2-10)*ln(x)**2+(10*x** 
3+20*x)*ln(x)-10*x**5-20*x**3)/((x**2+2)*ln((x**2+2)/x)**2+(-2*x**3-4*x)*l 
n((x**2+2)/x)+x**4+2*x**2),x)
 

Output:

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

Maxima [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.52 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=-\frac {5 \, {\left (x^{3} - x^{2} \log \left (x^{2} + 2\right ) + x^{2} \log \left (x\right ) - x \log \left (x\right )^{2}\right )}}{x - \log \left (x^{2} + 2\right ) + \log \left (x\right )} \] Input:

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

Output:

-5*(x^3 - x^2*log(x^2 + 2) + x^2*log(x) - x*log(x)^2)/(x - log(x^2 + 2) + 
log(x))
 

Giac [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.93 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=-5 \, x^{2} + \frac {5 \, x \log \left (x\right )^{2}}{x - \log \left (x^{2} + 2\right ) + \log \left (x\right )} \] Input:

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

Output:

-5*x^2 + 5*x*log(x)^2/(x - log(x^2 + 2) + log(x))
 

Mupad [B] (verification not implemented)

Time = 2.85 (sec) , antiderivative size = 171, normalized size of antiderivative = 5.90 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=10\,\ln \left (x\right )-\frac {\frac {5\,x\,\left (2\,x^3\,\ln \left (x\right )+x^2\,{\ln \left (x\right )}^2+4\,x\,\ln \left (x\right )-2\,{\ln \left (x\right )}^2\right )}{x^3-x^2+2\,x+2}-\frac {5\,x\,\ln \left (\frac {x^2+2}{x}\right )\,\left (x^2+2\right )\,\left ({\ln \left (x\right )}^2+2\,\ln \left (x\right )\right )}{x^3-x^2+2\,x+2}}{x-\ln \left (\frac {x^2+2}{x}\right )}+{\ln \left (x\right )}^2\,\left (\frac {5\,x^2-10}{x^3-x^2+2\,x+2}+5\right )-5\,x^2+\frac {\ln \left (x\right )\,\left (10\,x^2-20\right )}{x^3-x^2+2\,x+2} \] Input:

int(-(log((x^2 + 2)/x)^2*(20*x + 10*x^3) + log((x^2 + 2)/x)*(log(x)^2*(5*x 
^2 + 10) - 40*x^2 - 20*x^4 + log(x)*(10*x^2 + 20)) - log(x)^2*(5*x^2 - 10) 
 - log(x)*(20*x + 10*x^3) + 20*x^3 + 10*x^5)/(log((x^2 + 2)/x)^2*(x^2 + 2) 
 - log((x^2 + 2)/x)*(4*x + 2*x^3) + 2*x^2 + x^4),x)
 

Output:

10*log(x) - ((5*x*(2*x^3*log(x) - 2*log(x)^2 + x^2*log(x)^2 + 4*x*log(x))) 
/(2*x - x^2 + x^3 + 2) - (5*x*log((x^2 + 2)/x)*(x^2 + 2)*(2*log(x) + log(x 
)^2))/(2*x - x^2 + x^3 + 2))/(x - log((x^2 + 2)/x)) + log(x)^2*((5*x^2 - 1 
0)/(2*x - x^2 + x^3 + 2) + 5) - 5*x^2 + (log(x)*(10*x^2 - 20))/(2*x - x^2 
+ x^3 + 2)
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.45 \[ \int \frac {-20 x^3-10 x^5+\left (20 x+10 x^3\right ) \log (x)+\left (-10+5 x^2\right ) \log ^2(x)+\left (40 x^2+20 x^4+\left (-20-10 x^2\right ) \log (x)+\left (-10-5 x^2\right ) \log ^2(x)\right ) \log \left (\frac {2+x^2}{x}\right )+\left (-20 x-10 x^3\right ) \log ^2\left (\frac {2+x^2}{x}\right )}{2 x^2+x^4+\left (-4 x-2 x^3\right ) \log \left (\frac {2+x^2}{x}\right )+\left (2+x^2\right ) \log ^2\left (\frac {2+x^2}{x}\right )} \, dx=\frac {5 x \left (-\mathrm {log}\left (\frac {x^{2}+2}{x}\right ) x -\mathrm {log}\left (x \right )^{2}+x^{2}\right )}{\mathrm {log}\left (\frac {x^{2}+2}{x}\right )-x} \] Input:

int(((-10*x^3-20*x)*log((x^2+2)/x)^2+((-5*x^2-10)*log(x)^2+(-10*x^2-20)*lo 
g(x)+20*x^4+40*x^2)*log((x^2+2)/x)+(5*x^2-10)*log(x)^2+(10*x^3+20*x)*log(x 
)-10*x^5-20*x^3)/((x^2+2)*log((x^2+2)/x)^2+(-2*x^3-4*x)*log((x^2+2)/x)+x^4 
+2*x^2),x)
 

Output:

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