\(\int \frac {-10 x-2 x^3+e^2 (10+2 x^2)+e^5 (10+2 x^2)+(-10 x^2+8 x^3+2 x^4) \log ^2(-1+x)+(10+2 x^2) \log (\frac {-5-x}{x})+\log (-1+x) (10 x+10 x^2-6 x^3-2 x^4+e^2 (-10 x+8 x^2+2 x^3)+e^5 (-10 x+8 x^2+2 x^3)+(-10 x+8 x^2+2 x^3) \log (\frac {-5-x}{x}))}{-5 x+4 x^2+x^3} \, dx\) [1131]

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

Optimal result

Integrand size = 172, antiderivative size = 26 \[ \int \frac {-10 x-2 x^3+e^2 \left (10+2 x^2\right )+e^5 \left (10+2 x^2\right )+\left (-10 x^2+8 x^3+2 x^4\right ) \log ^2(-1+x)+\left (10+2 x^2\right ) \log \left (\frac {-5-x}{x}\right )+\log (-1+x) \left (10 x+10 x^2-6 x^3-2 x^4+e^2 \left (-10 x+8 x^2+2 x^3\right )+e^5 \left (-10 x+8 x^2+2 x^3\right )+\left (-10 x+8 x^2+2 x^3\right ) \log \left (\frac {-5-x}{x}\right )\right )}{-5 x+4 x^2+x^3} \, dx=\left (e^2+e^5-x+\log \left (-1-\frac {5}{x}\right )+x \log (-1+x)\right )^2 \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.98 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.15, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.035, Rules used = {6, 2026, 7239, 27, 25, 7237}

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^3+e^5 \left (2 x^2+10\right )+e^2 \left (2 x^2+10\right )+\left (2 x^2+10\right ) \log \left (\frac {-x-5}{x}\right )+\left (2 x^4+8 x^3-10 x^2\right ) \log ^2(x-1)+\log (x-1) \left (-2 x^4-6 x^3+10 x^2+e^5 \left (2 x^3+8 x^2-10 x\right )+e^2 \left (2 x^3+8 x^2-10 x\right )+\left (2 x^3+8 x^2-10 x\right ) \log \left (\frac {-x-5}{x}\right )+10 x\right )-10 x}{x^3+4 x^2-5 x} \, dx\)

\(\Big \downarrow \) 6

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

\(\Big \downarrow \) 2026

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

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 7237

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 6
Int[(u_.)*((v_.) + (a_.)*(Fx_) + (b_.)*(Fx_))^(p_.), x_Symbol] :> Int[u*(v 
+ (a + b)*Fx)^p, x] /; FreeQ[{a, b}, x] &&  !FreeQ[Fx, x]
 

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2026
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p 
*r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ 
erQ[p] &&  !MonomialQ[Px, x] && (ILtQ[p, 0] ||  !PolyQ[u, x])
 

rule 7237
Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Si 
mp[q*(y^(m + 1)/(m + 1)), x] /;  !FalseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]
 

rule 7239
Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; Simpl 
erIntegrandQ[v, u, x]]
 
Maple [C] (warning: unable to verify)

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

Time = 0.92 (sec) , antiderivative size = 1472, normalized size of antiderivative = 56.62

\[\text {Expression too large to display}\]

Input:

int(((2*x^4+8*x^3-10*x^2)*ln(-1+x)^2+((2*x^3+8*x^2-10*x)*ln((-x-5)/x)+(2*x 
^3+8*x^2-10*x)*exp(5)+(2*x^3+8*x^2-10*x)*exp(2)-2*x^4-6*x^3+10*x^2+10*x)*l 
n(-1+x)+(2*x^2+10)*ln((-x-5)/x)+(2*x^2+10)*exp(5)+(2*x^2+10)*exp(2)-2*x^3- 
10*x)/(x^3+4*x^2-5*x),x)
 

Output:

-3+2*I*Pi+ln(-1+x)^2-2*x*exp(5)-2*exp(5)*ln(x)+2*(-1+x)*ln(-1+x)^2-4*(-1+x 
)*ln(-1+x)+ln(5+x)^2+2*(-1+x)*ln(x)-2*ln(-1+x)-2*exp(2)*ln(x)-2*exp(2)*x-2 
*ln(5+x)+2*exp(5)+2*ln(x)+ln(x)^2+2*exp(2)+x^2+I*Pi*csgn(I/x)*csgn(I*(5+x) 
)*csgn(I/x*(5+x))*ln(x)-I*Pi*csgn(I/x)*csgn(I*(5+x))*csgn(I/x*(5+x))*ln(5+ 
x)-I*Pi*csgn(I/x)*csgn(I*(5+x))*csgn(I/x*(5+x))*ln(-1+x)+6/5*I*Pi*csgn(I/x 
)*csgn(I*(5+x))*csgn(I/x*(5+x))*dilog(x)-6/5*I*Pi*csgn(I/x)*csgn(I*(5+x))* 
csgn(I/x*(5+x))*dilog(5/6+1/6*x)+I*Pi*(-1+x)*ln(-1+x)*csgn(I/x)*csgn(I/x*( 
5+x))^2+I*Pi*(-1+x)*ln(-1+x)*csgn(I*(5+x))*csgn(I/x*(5+x))^2+I*Pi*(-1+x)*c 
sgn(I/x)*csgn(I*(5+x))*csgn(I/x*(5+x))+6/5*I*Pi*csgn(I/x)*csgn(I*(5+x))*cs 
gn(I/x*(5+x))*polylog(2,1/6-1/6*x)-6/5*I*Pi*csgn(I/x)*csgn(I*(5+x))*csgn(I 
/x*(5+x))*polylog(2,1-x)+2/5*dilog(x)+6/5*I*Pi*csgn(I*(5+x))*csgn(I/x*(5+x 
))^2*dilog(5/6+1/6*x)-2*I*Pi*(-1+x)*ln(-1+x)*csgn(I/x*(5+x))^2-I*Pi*csgn(I 
*(5+x))*csgn(I/x*(5+x))^2*ln(x)+I*Pi*csgn(I*(5+x))*csgn(I/x*(5+x))^2*ln(-1 
+x)+I*Pi*csgn(I*(5+x))*csgn(I/x*(5+x))^2*ln(5+x)-6/5*I*Pi*csgn(I/x)*csgn(I 
/x*(5+x))^2*dilog(x)+6/5*I*Pi*csgn(I/x)*csgn(I/x*(5+x))^2*dilog(5/6+1/6*x) 
-I*Pi*csgn(I/x)*csgn(I/x*(5+x))^2*ln(x)-2/5*polylog(2,1-x)-2*I*x*Pi-I*Pi*( 
-1+x)*csgn(I/x)*csgn(I/x*(5+x))^2-I*Pi*(-1+x)*csgn(I*(5+x))*csgn(I/x*(5+x) 
)^2+I*Pi*csgn(I/x)*csgn(I/x*(5+x))^2*ln(-1+x)+I*Pi*csgn(I/x)*csgn(I/x*(5+x 
))^2*ln(5+x)+ln(-1+x)^2*(-1+x)^2-2*(-1+x)^2*ln(-1+x)+2*((-1+x)*ln(-1+x)+ln 
(-1+x)+1-x-ln(x))*ln(5+x)-2*ln(x)*ln(-1+x)+2*ln(5+x)*exp(2)+2*I*Pi*ln(5...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 88 vs. \(2 (24) = 48\).

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

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

Output:

x^2*log(x - 1)^2 + x^2 - 2*x*e^5 - 2*x*e^2 - 2*(x^2 - x*e^5 - x*e^2 - x*lo 
g(-(x + 5)/x))*log(x - 1) - 2*(x - e^5 - e^2)*log(-(x + 5)/x) + log(-(x + 
5)/x)^2
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (24) = 48\).

Time = 0.43 (sec) , antiderivative size = 202, normalized size of antiderivative = 7.77 \[ \int \frac {-10 x-2 x^3+e^2 \left (10+2 x^2\right )+e^5 \left (10+2 x^2\right )+\left (-10 x^2+8 x^3+2 x^4\right ) \log ^2(-1+x)+\left (10+2 x^2\right ) \log \left (\frac {-5-x}{x}\right )+\log (-1+x) \left (10 x+10 x^2-6 x^3-2 x^4+e^2 \left (-10 x+8 x^2+2 x^3\right )+e^5 \left (-10 x+8 x^2+2 x^3\right )+\left (-10 x+8 x^2+2 x^3\right ) \log \left (\frac {-5-x}{x}\right )\right )}{-5 x+4 x^2+x^3} \, dx=x^{2} \log {\left (x - 1 \right )}^{2} + x^{2} + x \left (- 2 e^{5} - 2 e^{2}\right ) + \left (2 x \log {\left (x - 1 \right )} - 2 x\right ) \log {\left (\frac {- x - 5}{x} \right )} + \left (- 2 x^{2} + 2 x e^{2} + 2 x e^{5}\right ) \log {\left (x - 1 \right )} + \log {\left (\frac {- x - 5}{x} \right )}^{2} - 2 \cdot \left (1 + e\right ) \left (- e + 1 + e^{2}\right ) e^{2} \log {\left (x + \frac {- 10 \cdot \left (1 + e\right ) \left (- e + 1 + e^{2}\right ) e^{2} + 10 e^{2} + 10 e^{5}}{4 e^{2} + 4 e^{5}} \right )} + 2 \cdot \left (1 + e\right ) \left (- e + 1 + e^{2}\right ) e^{2} \log {\left (x + \frac {10 e^{2} + 10 e^{5} + 10 \cdot \left (1 + e\right ) \left (- e + 1 + e^{2}\right ) e^{2}}{4 e^{2} + 4 e^{5}} \right )} \] Input:

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

Output:

x**2*log(x - 1)**2 + x**2 + x*(-2*exp(5) - 2*exp(2)) + (2*x*log(x - 1) - 2 
*x)*log((-x - 5)/x) + (-2*x**2 + 2*x*exp(2) + 2*x*exp(5))*log(x - 1) + log 
((-x - 5)/x)**2 - 2*(1 + E)*(-E + 1 + exp(2))*exp(2)*log(x + (-10*(1 + E)* 
(-E + 1 + exp(2))*exp(2) + 10*exp(2) + 10*exp(5))/(4*exp(2) + 4*exp(5))) + 
 2*(1 + E)*(-E + 1 + exp(2))*exp(2)*log(x + (10*exp(2) + 10*exp(5) + 10*(1 
 + E)*(-E + 1 + exp(2))*exp(2))/(4*exp(2) + 4*exp(5)))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (24) = 48\).

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 149 vs. \(2 (24) = 48\).

Time = 0.14 (sec) , antiderivative size = 149, normalized size of antiderivative = 5.73 \[ \int \frac {-10 x-2 x^3+e^2 \left (10+2 x^2\right )+e^5 \left (10+2 x^2\right )+\left (-10 x^2+8 x^3+2 x^4\right ) \log ^2(-1+x)+\left (10+2 x^2\right ) \log \left (\frac {-5-x}{x}\right )+\log (-1+x) \left (10 x+10 x^2-6 x^3-2 x^4+e^2 \left (-10 x+8 x^2+2 x^3\right )+e^5 \left (-10 x+8 x^2+2 x^3\right )+\left (-10 x+8 x^2+2 x^3\right ) \log \left (\frac {-5-x}{x}\right )\right )}{-5 x+4 x^2+x^3} \, dx=x^{2} \log \left (x - 1\right )^{2} - 2 \, x^{2} \log \left (x - 1\right ) + 2 \, x e^{5} \log \left (x - 1\right ) + 2 \, x e^{2} \log \left (x - 1\right ) - 2 \, x \log \left (x - 1\right ) \log \left (x\right ) + 2 \, x \log \left (x - 1\right ) \log \left (-x - 5\right ) + x^{2} - 2 \, x e^{5} - 2 \, x e^{2} + 2 \, e^{5} \log \left (x + 5\right ) + 2 \, e^{2} \log \left (x + 5\right ) - \log \left (x + 5\right )^{2} + 2 \, x \log \left (x\right ) - 2 \, e^{5} \log \left (x\right ) - 2 \, e^{2} \log \left (x\right ) + \log \left (x\right )^{2} - 2 \, x \log \left (-x - 5\right ) + 2 \, \log \left (x + 5\right ) \log \left (-x - 5\right ) - 2 \, \log \left (x\right ) \log \left (-x - 5\right ) \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 3.51 (sec) , antiderivative size = 97, normalized size of antiderivative = 3.73 \[ \int \frac {-10 x-2 x^3+e^2 \left (10+2 x^2\right )+e^5 \left (10+2 x^2\right )+\left (-10 x^2+8 x^3+2 x^4\right ) \log ^2(-1+x)+\left (10+2 x^2\right ) \log \left (\frac {-5-x}{x}\right )+\log (-1+x) \left (10 x+10 x^2-6 x^3-2 x^4+e^2 \left (-10 x+8 x^2+2 x^3\right )+e^5 \left (-10 x+8 x^2+2 x^3\right )+\left (-10 x+8 x^2+2 x^3\right ) \log \left (\frac {-5-x}{x}\right )\right )}{-5 x+4 x^2+x^3} \, dx=x^2-\ln \left (x-1\right )\,\left (2\,x^2-2\,x\,{\mathrm {e}}^2\,\left ({\mathrm {e}}^3+1\right )\right )-x\,\left (2\,{\mathrm {e}}^2+2\,{\mathrm {e}}^5\right )-\ln \left (-\frac {x+5}{x}\right )\,\left (2\,x-2\,x\,\ln \left (x-1\right )\right )+x^2\,{\ln \left (x-1\right )}^2+{\ln \left (-\frac {x+5}{x}\right )}^2-{\mathrm {e}}^2\,\mathrm {atan}\left (\frac {x\,2{}\mathrm {i}}{5}+1{}\mathrm {i}\right )\,\left ({\mathrm {e}}^3+1\right )\,4{}\mathrm {i} \] Input:

int((log(x - 1)^2*(8*x^3 - 10*x^2 + 2*x^4) - 10*x + exp(2)*(2*x^2 + 10) + 
exp(5)*(2*x^2 + 10) + log(-(x + 5)/x)*(2*x^2 + 10) + log(x - 1)*(10*x + ex 
p(2)*(8*x^2 - 10*x + 2*x^3) + exp(5)*(8*x^2 - 10*x + 2*x^3) + log(-(x + 5) 
/x)*(8*x^2 - 10*x + 2*x^3) + 10*x^2 - 6*x^3 - 2*x^4) - 2*x^3)/(4*x^2 - 5*x 
 + x^3),x)
 

Output:

x^2 - log(x - 1)*(2*x^2 - 2*x*exp(2)*(exp(3) + 1)) - x*(2*exp(2) + 2*exp(5 
)) - log(-(x + 5)/x)*(2*x - 2*x*log(x - 1)) + x^2*log(x - 1)^2 + log(-(x + 
 5)/x)^2 - exp(2)*atan((x*2i)/5 + 1i)*(exp(3) + 1)*4i
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 151, normalized size of antiderivative = 5.81 \[ \int \frac {-10 x-2 x^3+e^2 \left (10+2 x^2\right )+e^5 \left (10+2 x^2\right )+\left (-10 x^2+8 x^3+2 x^4\right ) \log ^2(-1+x)+\left (10+2 x^2\right ) \log \left (\frac {-5-x}{x}\right )+\log (-1+x) \left (10 x+10 x^2-6 x^3-2 x^4+e^2 \left (-10 x+8 x^2+2 x^3\right )+e^5 \left (-10 x+8 x^2+2 x^3\right )+\left (-10 x+8 x^2+2 x^3\right ) \log \left (\frac {-5-x}{x}\right )\right )}{-5 x+4 x^2+x^3} \, dx=\mathrm {log}\left (x -1\right )^{2} x^{2}+2 \,\mathrm {log}\left (x -1\right ) \mathrm {log}\left (\frac {-x -5}{x}\right ) x +2 \,\mathrm {log}\left (x -1\right ) e^{5} x +2 \,\mathrm {log}\left (x -1\right ) e^{2} x -2 \,\mathrm {log}\left (x -1\right ) x^{2}+2 \,\mathrm {log}\left (x +5\right ) e^{5}+2 \,\mathrm {log}\left (x +5\right ) e^{2}+10 \,\mathrm {log}\left (x +5\right )+\mathrm {log}\left (\frac {-x -5}{x}\right )^{2}-2 \,\mathrm {log}\left (\frac {-x -5}{x}\right ) x -10 \,\mathrm {log}\left (\frac {-x -5}{x}\right )-2 \,\mathrm {log}\left (x \right ) e^{5}-2 \,\mathrm {log}\left (x \right ) e^{2}-10 \,\mathrm {log}\left (x \right )-2 e^{5} x -2 e^{2} x +x^{2} \] Input:

int(((2*x^4+8*x^3-10*x^2)*log(-1+x)^2+((2*x^3+8*x^2-10*x)*log((-x-5)/x)+(2 
*x^3+8*x^2-10*x)*exp(5)+(2*x^3+8*x^2-10*x)*exp(2)-2*x^4-6*x^3+10*x^2+10*x) 
*log(-1+x)+(2*x^2+10)*log((-x-5)/x)+(2*x^2+10)*exp(5)+(2*x^2+10)*exp(2)-2* 
x^3-10*x)/(x^3+4*x^2-5*x),x)
 

Output:

log(x - 1)**2*x**2 + 2*log(x - 1)*log(( - x - 5)/x)*x + 2*log(x - 1)*e**5* 
x + 2*log(x - 1)*e**2*x - 2*log(x - 1)*x**2 + 2*log(x + 5)*e**5 + 2*log(x 
+ 5)*e**2 + 10*log(x + 5) + log(( - x - 5)/x)**2 - 2*log(( - x - 5)/x)*x - 
 10*log(( - x - 5)/x) - 2*log(x)*e**5 - 2*log(x)*e**2 - 10*log(x) - 2*e**5 
*x - 2*e**2*x + x**2