\(\int \frac {(2-x-2 x^2+x^3) (d+e x+f x^2+g x^3+h x^4+i x^5)}{(4-5 x^2+x^4)^2} \, dx\) [87]

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

Optimal result

Integrand size = 51, antiderivative size = 122 \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=i x+\frac {d-2 e+4 f-8 g+16 h-32 i}{12 (2+x)}-\frac {1}{18} (d+e+f+g+h+i) \log (1-x)+\frac {1}{48} (d+2 e+4 f+8 g+16 h+32 i) \log (2-x)+\frac {1}{6} (d-e+f-g+h-i) \log (1+x)-\frac {1}{144} (19 d-26 e+28 f-8 g-80 h+352 i) \log (2+x) \] Output:

i*x+(d-2*e+4*f-8*g+16*h-32*i)/(24+12*x)-1/18*(d+e+f+g+h+i)*ln(1-x)+1/48*(d 
+2*e+4*f+8*g+16*h+32*i)*ln(2-x)+1/6*(d-e+f-g+h-i)*ln(1+x)-1/144*(19*d-26*e 
+28*f-8*g-80*h+352*i)*ln(2+x)
 

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.97 \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{144} \left (144 i x+\frac {12 (d-2 (e-2 f+4 g-8 h+16 i))}{2+x}-8 (d+e+f+g+h+i) \log (1-x)+3 (d+2 e+4 (f+2 g+4 h+8 i)) \log (2-x)+24 (d-e+f-g+h-i) \log (1+x)+(-19 d+26 e-28 f+8 g+80 h-352 i) \log (2+x)\right ) \] Input:

Integrate[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5) 
)/(4 - 5*x^2 + x^4)^2,x]
 

Output:

(144*i*x + (12*(d - 2*(e - 2*f + 4*g - 8*h + 16*i)))/(2 + x) - 8*(d + e + 
f + g + h + i)*Log[1 - x] + 3*(d + 2*e + 4*(f + 2*g + 4*h + 8*i))*Log[2 - 
x] + 24*(d - e + f - g + h - i)*Log[1 + x] + (-19*d + 26*e - 28*f + 8*g + 
80*h - 352*i)*Log[2 + x])/144
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {2019, 2462, 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 {\left (x^3-2 x^2-x+2\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (x^4-5 x^2+4\right )^2} \, dx\)

\(\Big \downarrow \) 2019

\(\displaystyle \int \frac {d+e x+f x^2+g x^3+h x^4+i x^5}{(x+2)^2 \left (x^3-2 x^2-x+2\right )}dx\)

\(\Big \downarrow \) 2462

\(\displaystyle \int \left (\frac {-19 d+26 e-28 f+8 g+80 h-352 i}{144 (x+2)}+\frac {d+2 e+4 f+8 g+16 h+32 i}{48 (x-2)}+\frac {-d-e-f-g-h-i}{18 (x-1)}+\frac {d-e+f-g+h-i}{6 (x+1)}+\frac {-d+2 e-4 f+8 g-16 h+32 i}{12 (x+2)^2}+i\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {d-2 e+4 f-8 g+16 h-32 i}{12 (x+2)}-\frac {1}{18} \log (1-x) (d+e+f+g+h+i)+\frac {1}{48} \log (2-x) (d+2 e+4 f+8 g+16 h+32 i)+\frac {1}{6} \log (x+1) (d-e+f-g+h-i)-\frac {1}{144} \log (x+2) (19 d-26 e+28 f-8 g-80 h+352 i)+i x\)

Input:

Int[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(4 - 
 5*x^2 + x^4)^2,x]
 

Output:

i*x + (d - 2*e + 4*f - 8*g + 16*h - 32*i)/(12*(2 + x)) - ((d + e + f + g + 
 h + i)*Log[1 - x])/18 + ((d + 2*e + 4*f + 8*g + 16*h + 32*i)*Log[2 - x])/ 
48 + ((d - e + f - g + h - i)*Log[1 + x])/6 - ((19*d - 26*e + 28*f - 8*g - 
 80*h + 352*i)*Log[2 + x])/144
 

Defintions of rubi rules used

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

rule 2019
Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px 
, Qx, x]^p*Qx^(p + q), x] /; FreeQ[q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && 
 EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]
 

rule 2462
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{Qx = Factor[Px]}, Int[ExpandIntegr 
and[u*Qx^p, x], x] /;  !SumQ[NonfreeFactors[Qx, x]]] /; PolyQ[Px, x] && GtQ 
[Expon[Px, x], 2] &&  !BinomialQ[Px, x] &&  !TrinomialQ[Px, x] && ILtQ[p, 0 
] && RationalFunctionQ[u, x]
 
Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.04

method result size
default \(\left (\frac {d}{48}+\frac {e}{24}+\frac {f}{12}+\frac {g}{6}+\frac {h}{3}+\frac {2 i}{3}\right ) \ln \left (x -2\right )+i x +\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}-\frac {i}{6}\right ) \ln \left (1+x \right )+\left (-\frac {d}{18}-\frac {e}{18}-\frac {f}{18}-\frac {g}{18}-\frac {h}{18}-\frac {i}{18}\right ) \ln \left (x -1\right )+\left (\frac {5 h}{9}-\frac {22 i}{9}+\frac {g}{18}-\frac {7 f}{36}+\frac {13 e}{72}-\frac {19 d}{144}\right ) \ln \left (x +2\right )-\frac {-\frac {d}{12}+\frac {e}{6}-\frac {f}{3}+\frac {2 g}{3}-\frac {4 h}{3}+\frac {8 i}{3}}{x +2}\) \(127\)
norman \(\frac {i \,x^{5}+\left (-\frac {4 h}{3}+\frac {20 i}{3}+\frac {2 g}{3}-\frac {f}{3}+\frac {e}{6}-\frac {d}{12}\right ) x +\left (\frac {4 h}{3}-\frac {23 i}{3}-\frac {2 g}{3}+\frac {f}{3}-\frac {e}{6}+\frac {d}{12}\right ) x^{3}+\left (-\frac {d}{6}+\frac {e}{3}-\frac {2 f}{3}+\frac {4 g}{3}-\frac {8 h}{3}+\frac {16 i}{3}\right ) x^{2}+\frac {8 h}{3}-\frac {16 i}{3}+\frac {d}{6}-\frac {e}{3}+\frac {2 f}{3}-\frac {4 g}{3}}{x^{4}-5 x^{2}+4}+\left (-\frac {d}{18}-\frac {e}{18}-\frac {f}{18}-\frac {g}{18}-\frac {h}{18}-\frac {i}{18}\right ) \ln \left (x -1\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}-\frac {i}{6}\right ) \ln \left (1+x \right )+\left (\frac {d}{48}+\frac {e}{24}+\frac {f}{12}+\frac {g}{6}+\frac {h}{3}+\frac {2 i}{3}\right ) \ln \left (x -2\right )+\left (\frac {5 h}{9}-\frac {22 i}{9}+\frac {g}{18}-\frac {7 f}{36}+\frac {13 e}{72}-\frac {19 d}{144}\right ) \ln \left (x +2\right )\) \(202\)
risch \(\frac {\ln \left (2-x \right ) e}{24}+\frac {\ln \left (2-x \right ) g}{6}-\frac {7 \ln \left (-x -2\right ) f}{36}-\frac {22 \ln \left (-x -2\right ) i}{9}-\frac {19 \ln \left (-x -2\right ) d}{144}+\frac {13 \ln \left (-x -2\right ) e}{72}+\frac {\ln \left (2-x \right ) d}{48}+\frac {\ln \left (2-x \right ) f}{12}+\frac {4 h}{3 \left (x +2\right )}+\frac {\ln \left (1+x \right ) d}{6}-\frac {\ln \left (x -1\right ) d}{18}-\frac {e}{6 \left (x +2\right )}-\frac {\ln \left (x -1\right ) e}{18}+\frac {\ln \left (1+x \right ) f}{6}-\frac {\ln \left (1+x \right ) e}{6}+\frac {\ln \left (2-x \right ) h}{3}-\frac {\ln \left (x -1\right ) f}{18}+\frac {\ln \left (1+x \right ) h}{6}-\frac {\ln \left (1+x \right ) i}{6}-\frac {\ln \left (1+x \right ) g}{6}-\frac {8 i}{3 \left (x +2\right )}-\frac {2 g}{3 \left (x +2\right )}+\frac {5 \ln \left (-x -2\right ) h}{9}+\frac {\ln \left (-x -2\right ) g}{18}+i x +\frac {2 \ln \left (2-x \right ) i}{3}+\frac {d}{24+12 x}-\frac {\ln \left (x -1\right ) g}{18}-\frac {\ln \left (x -1\right ) h}{18}-\frac {\ln \left (x -1\right ) i}{18}+\frac {f}{3 x +6}\) \(245\)
parallelrisch \(\frac {-960 i +48 f -96 g +192 h +12 d -24 e +12 \ln \left (x -2\right ) e +144 i \,x^{2}+52 \ln \left (x +2\right ) e +24 \ln \left (1+x \right ) x d -24 \ln \left (1+x \right ) x e -19 \ln \left (x +2\right ) x d +26 \ln \left (x +2\right ) x e -28 \ln \left (x +2\right ) x f +3 \ln \left (x -2\right ) x d +24 \ln \left (x -2\right ) f +48 \ln \left (1+x \right ) d -56 \ln \left (x +2\right ) f -16 \ln \left (x -1\right ) d -8 \ln \left (x -1\right ) x e +24 \ln \left (1+x \right ) x f -38 \ln \left (x +2\right ) d +12 \ln \left (x -2\right ) x f +6 \ln \left (x -2\right ) d -16 \ln \left (x -1\right ) e +48 \ln \left (1+x \right ) f -48 \ln \left (1+x \right ) e -16 \ln \left (x -1\right ) f +96 \ln \left (x -2\right ) x i -24 \ln \left (1+x \right ) x i -352 \ln \left (x +2\right ) x i +48 \ln \left (1+x \right ) h -48 \ln \left (1+x \right ) i -48 \ln \left (1+x \right ) g -8 \ln \left (x -1\right ) x i +16 \ln \left (x +2\right ) g +160 \ln \left (x +2\right ) h -704 \ln \left (x +2\right ) i +6 \ln \left (x -2\right ) x e -8 \ln \left (x -1\right ) x d -8 \ln \left (x -1\right ) x f +48 \ln \left (x -2\right ) g +96 \ln \left (x -2\right ) h +192 \ln \left (x -2\right ) i -16 \ln \left (x -1\right ) g -16 \ln \left (x -1\right ) h -16 \ln \left (x -1\right ) i +24 \ln \left (x -2\right ) x g -24 \ln \left (1+x \right ) x g +80 \ln \left (x +2\right ) x h -8 \ln \left (x -1\right ) x h +24 \ln \left (1+x \right ) x h +48 \ln \left (x -2\right ) x h -8 \ln \left (x -1\right ) x g +8 \ln \left (x +2\right ) x g}{144 x +288}\) \(393\)

Input:

int((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x,meth 
od=_RETURNVERBOSE)
 

Output:

(1/48*d+1/24*e+1/12*f+1/6*g+1/3*h+2/3*i)*ln(x-2)+i*x+(1/6*d-1/6*e+1/6*f-1/ 
6*g+1/6*h-1/6*i)*ln(1+x)+(-1/18*d-1/18*e-1/18*f-1/18*g-1/18*h-1/18*i)*ln(x 
-1)+(5/9*h-22/9*i+1/18*g-7/36*f+13/72*e-19/144*d)*ln(x+2)-(-1/12*d+1/6*e-1 
/3*f+2/3*g-4/3*h+8/3*i)/(x+2)
 

Fricas [A] (verification not implemented)

Time = 21.72 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.64 \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {144 \, i x^{2} + 288 \, i x - {\left ({\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h + 352 \, i\right )} x + 38 \, d - 52 \, e + 56 \, f - 16 \, g - 160 \, h + 704 \, i\right )} \log \left (x + 2\right ) + 24 \, {\left ({\left (d - e + f - g + h - i\right )} x + 2 \, d - 2 \, e + 2 \, f - 2 \, g + 2 \, h - 2 \, i\right )} \log \left (x + 1\right ) - 8 \, {\left ({\left (d + e + f + g + h + i\right )} x + 2 \, d + 2 \, e + 2 \, f + 2 \, g + 2 \, h + 2 \, i\right )} \log \left (x - 1\right ) + 3 \, {\left ({\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} x + 2 \, d + 4 \, e + 8 \, f + 16 \, g + 32 \, h + 64 \, i\right )} \log \left (x - 2\right ) + 12 \, d - 24 \, e + 48 \, f - 96 \, g + 192 \, h - 384 \, i}{144 \, {\left (x + 2\right )}} \] Input:

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2, 
x, algorithm="fricas")
 

Output:

1/144*(144*i*x^2 + 288*i*x - ((19*d - 26*e + 28*f - 8*g - 80*h + 352*i)*x 
+ 38*d - 52*e + 56*f - 16*g - 160*h + 704*i)*log(x + 2) + 24*((d - e + f - 
 g + h - i)*x + 2*d - 2*e + 2*f - 2*g + 2*h - 2*i)*log(x + 1) - 8*((d + e 
+ f + g + h + i)*x + 2*d + 2*e + 2*f + 2*g + 2*h + 2*i)*log(x - 1) + 3*((d 
 + 2*e + 4*f + 8*g + 16*h + 32*i)*x + 2*d + 4*e + 8*f + 16*g + 32*h + 64*i 
)*log(x - 2) + 12*d - 24*e + 48*f - 96*g + 192*h - 384*i)/(x + 2)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\text {Timed out} \] Input:

integrate((x**3-2*x**2-x+2)*(i*x**5+h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x* 
*2+4)**2,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.89 \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=i x - \frac {1}{144} \, {\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h + 352 \, i\right )} \log \left (x + 2\right ) + \frac {1}{6} \, {\left (d - e + f - g + h - i\right )} \log \left (x + 1\right ) - \frac {1}{18} \, {\left (d + e + f + g + h + i\right )} \log \left (x - 1\right ) + \frac {1}{48} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left (x - 2\right ) + \frac {d - 2 \, e + 4 \, f - 8 \, g + 16 \, h - 32 \, i}{12 \, {\left (x + 2\right )}} \] Input:

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2, 
x, algorithm="maxima")
 

Output:

i*x - 1/144*(19*d - 26*e + 28*f - 8*g - 80*h + 352*i)*log(x + 2) + 1/6*(d 
- e + f - g + h - i)*log(x + 1) - 1/18*(d + e + f + g + h + i)*log(x - 1) 
+ 1/48*(d + 2*e + 4*f + 8*g + 16*h + 32*i)*log(x - 2) + 1/12*(d - 2*e + 4* 
f - 8*g + 16*h - 32*i)/(x + 2)
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.92 \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=i x - \frac {1}{144} \, {\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h + 352 \, i\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{6} \, {\left (d - e + f - g + h - i\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{18} \, {\left (d + e + f + g + h + i\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{48} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left ({\left | x - 2 \right |}\right ) + \frac {d - 2 \, e + 4 \, f - 8 \, g + 16 \, h - 32 \, i}{12 \, {\left (x + 2\right )}} \] Input:

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2, 
x, algorithm="giac")
 

Output:

i*x - 1/144*(19*d - 26*e + 28*f - 8*g - 80*h + 352*i)*log(abs(x + 2)) + 1/ 
6*(d - e + f - g + h - i)*log(abs(x + 1)) - 1/18*(d + e + f + g + h + i)*l 
og(abs(x - 1)) + 1/48*(d + 2*e + 4*f + 8*g + 16*h + 32*i)*log(abs(x - 2)) 
+ 1/12*(d - 2*e + 4*f - 8*g + 16*h - 32*i)/(x + 2)
 

Mupad [B] (verification not implemented)

Time = 18.94 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.04 \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=i\,x+\frac {\frac {d}{12}-\frac {e}{6}+\frac {f}{3}-\frac {2\,g}{3}+\frac {4\,h}{3}-\frac {8\,i}{3}}{x+2}+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}-\frac {i}{6}\right )+\ln \left (x-2\right )\,\left (\frac {d}{48}+\frac {e}{24}+\frac {f}{12}+\frac {g}{6}+\frac {h}{3}+\frac {2\,i}{3}\right )-\ln \left (x-1\right )\,\left (\frac {d}{18}+\frac {e}{18}+\frac {f}{18}+\frac {g}{18}+\frac {h}{18}+\frac {i}{18}\right )-\ln \left (x+2\right )\,\left (\frac {19\,d}{144}-\frac {13\,e}{72}+\frac {7\,f}{36}-\frac {g}{18}-\frac {5\,h}{9}+\frac {22\,i}{9}\right ) \] Input:

int(-((x + 2*x^2 - x^3 - 2)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(x^ 
4 - 5*x^2 + 4)^2,x)
 

Output:

i*x + (d/12 - e/6 + f/3 - (2*g)/3 + (4*h)/3 - (8*i)/3)/(x + 2) + log(x + 1 
)*(d/6 - e/6 + f/6 - g/6 + h/6 - i/6) + log(x - 2)*(d/48 + e/24 + f/12 + g 
/6 + h/3 + (2*i)/3) - log(x - 1)*(d/18 + e/18 + f/18 + g/18 + h/18 + i/18) 
 - log(x + 2)*((19*d)/144 - (13*e)/72 + (7*f)/36 - g/18 - (5*h)/9 + (22*i) 
/9)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 399, normalized size of antiderivative = 3.27 \[ \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {12 e x +24 \,\mathrm {log}\left (x +1\right ) f x -28 \,\mathrm {log}\left (x +2\right ) f x +12 \,\mathrm {log}\left (x -2\right ) f x -8 \,\mathrm {log}\left (x -1\right ) f x +48 \,\mathrm {log}\left (x -2\right ) g +96 \,\mathrm {log}\left (x -2\right ) h +192 \,\mathrm {log}\left (x -2\right ) i -16 \,\mathrm {log}\left (x -1\right ) g -16 \,\mathrm {log}\left (x -1\right ) h -16 \,\mathrm {log}\left (x -1\right ) i +16 \,\mathrm {log}\left (x +2\right ) g +160 \,\mathrm {log}\left (x +2\right ) h -704 \,\mathrm {log}\left (x +2\right ) i -48 \,\mathrm {log}\left (x +1\right ) g +48 \,\mathrm {log}\left (x +1\right ) h -48 \,\mathrm {log}\left (x +1\right ) i -96 h x +144 i \,x^{2}+3 \,\mathrm {log}\left (x -2\right ) d x +6 \,\mathrm {log}\left (x -2\right ) e x -8 \,\mathrm {log}\left (x -1\right ) d x -8 \,\mathrm {log}\left (x -1\right ) e x -19 \,\mathrm {log}\left (x +2\right ) d x +26 \,\mathrm {log}\left (x +2\right ) e x +24 \,\mathrm {log}\left (x +1\right ) d x -24 \,\mathrm {log}\left (x +1\right ) e x +6 \,\mathrm {log}\left (x -2\right ) d -38 \,\mathrm {log}\left (x +2\right ) d +12 \,\mathrm {log}\left (x -2\right ) e +24 \,\mathrm {log}\left (x -2\right ) f -16 \,\mathrm {log}\left (x -1\right ) d -16 \,\mathrm {log}\left (x -1\right ) e -16 \,\mathrm {log}\left (x -1\right ) f +52 \,\mathrm {log}\left (x +2\right ) e -56 \,\mathrm {log}\left (x +2\right ) f +48 \,\mathrm {log}\left (x +1\right ) d -48 \,\mathrm {log}\left (x +1\right ) e +48 \,\mathrm {log}\left (x +1\right ) f +24 \,\mathrm {log}\left (x -2\right ) g x -8 \,\mathrm {log}\left (x -1\right ) g x +8 \,\mathrm {log}\left (x +2\right ) g x -24 \,\mathrm {log}\left (x +1\right ) g x -24 f x +96 \,\mathrm {log}\left (x -2\right ) i x -8 \,\mathrm {log}\left (x -1\right ) i x -352 \,\mathrm {log}\left (x +2\right ) i x -24 \,\mathrm {log}\left (x +1\right ) i x +480 i x +48 g x -6 d x +48 \,\mathrm {log}\left (x -2\right ) h x -8 \,\mathrm {log}\left (x -1\right ) h x +80 \,\mathrm {log}\left (x +2\right ) h x +24 \,\mathrm {log}\left (x +1\right ) h x}{144 x +288} \] Input:

int((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x)
 

Output:

(3*log(x - 2)*d*x + 6*log(x - 2)*d + 6*log(x - 2)*e*x + 12*log(x - 2)*e + 
12*log(x - 2)*f*x + 24*log(x - 2)*f + 24*log(x - 2)*g*x + 48*log(x - 2)*g 
+ 48*log(x - 2)*h*x + 96*log(x - 2)*h + 96*log(x - 2)*i*x + 192*log(x - 2) 
*i - 8*log(x - 1)*d*x - 16*log(x - 1)*d - 8*log(x - 1)*e*x - 16*log(x - 1) 
*e - 8*log(x - 1)*f*x - 16*log(x - 1)*f - 8*log(x - 1)*g*x - 16*log(x - 1) 
*g - 8*log(x - 1)*h*x - 16*log(x - 1)*h - 8*log(x - 1)*i*x - 16*log(x - 1) 
*i - 19*log(x + 2)*d*x - 38*log(x + 2)*d + 26*log(x + 2)*e*x + 52*log(x + 
2)*e - 28*log(x + 2)*f*x - 56*log(x + 2)*f + 8*log(x + 2)*g*x + 16*log(x + 
 2)*g + 80*log(x + 2)*h*x + 160*log(x + 2)*h - 352*log(x + 2)*i*x - 704*lo 
g(x + 2)*i + 24*log(x + 1)*d*x + 48*log(x + 1)*d - 24*log(x + 1)*e*x - 48* 
log(x + 1)*e + 24*log(x + 1)*f*x + 48*log(x + 1)*f - 24*log(x + 1)*g*x - 4 
8*log(x + 1)*g + 24*log(x + 1)*h*x + 48*log(x + 1)*h - 24*log(x + 1)*i*x - 
 48*log(x + 1)*i - 6*d*x + 12*e*x - 24*f*x + 48*g*x - 96*h*x + 144*i*x**2 
+ 480*i*x)/(144*(x + 2))