\(\int \frac {(d+e x) (2-3 x+x^2)}{(4-5 x^2+x^4)^2} \, dx\) [89]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (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 = 26, antiderivative size = 89 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=-\frac {5 d-6 e+(3 d-4 e) x}{12 \left (2+3 x+x^2\right )}-\frac {1}{36} (d+e) \log (1-x)+\frac {1}{144} (d+2 e) \log (2-x)-\frac {1}{36} (7 d-13 e) \log (1+x)+\frac {1}{144} (31 d-50 e) \log (2+x) \] Output:

-1/12*(5*d-6*e+(3*d-4*e)*x)/(x^2+3*x+2)-1/36*(d+e)*ln(1-x)+1/144*(d+2*e)*l 
n(2-x)-1/36*(7*d-13*e)*ln(1+x)+1/144*(31*d-50*e)*ln(2+x)
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.90 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{144} \left (\frac {12 (-5 d+6 e-3 d x+4 e x)}{2+3 x+x^2}-4 (d+e) \log (1-x)+(d+2 e) \log (2-x)+4 (-7 d+13 e) \log (1+x)+(31 d-50 e) \log (2+x)\right ) \] Input:

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

Output:

((12*(-5*d + 6*e - 3*d*x + 4*e*x))/(2 + 3*x + x^2) - 4*(d + e)*Log[1 - x] 
+ (d + 2*e)*Log[2 - x] + 4*(-7*d + 13*e)*Log[1 + x] + (31*d - 50*e)*Log[2 
+ x])/144
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.06, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {2019, 1349, 27, 2141, 27, 1141, 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^2-3 x+2\right ) (d+e x)}{\left (x^4-5 x^2+4\right )^2} \, dx\)

\(\Big \downarrow \) 2019

\(\displaystyle \int \frac {d+e x}{\left (x^2-3 x+2\right ) \left (x^2+3 x+2\right )^2}dx\)

\(\Big \downarrow \) 1349

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 2141

\(\displaystyle \frac {1}{12} \left (-\frac {1}{72} \int -\frac {6 (7 d+6 e-(3 d+2 e) x)}{x^2-3 x+2}dx-\frac {1}{72} \int \frac {6 (25 d-54 e-(3 d+2 e) x)}{x^2+3 x+2}dx\right )-\frac {x (3 d-4 e)+5 d-6 e}{12 \left (x^2+3 x+2\right )}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{12} \left (\frac {1}{12} \int \frac {7 d+6 e-(3 d+2 e) x}{x^2-3 x+2}dx-\frac {1}{12} \int \frac {25 d-54 e-(3 d+2 e) x}{x^2+3 x+2}dx\right )-\frac {x (3 d-4 e)+5 d-6 e}{12 \left (x^2+3 x+2\right )}\)

\(\Big \downarrow \) 1141

\(\displaystyle \frac {1}{12} \left (\frac {1}{12} \int \left (\frac {4 (d+e)}{1-x}-\frac {d+2 e}{2-x}\right )dx-\frac {1}{12} \int \left (\frac {4 (7 d-13 e)}{x+1}-\frac {31 d-50 e}{x+2}\right )dx\right )-\frac {x (3 d-4 e)+5 d-6 e}{12 \left (x^2+3 x+2\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{12} \left (\frac {1}{12} ((d+2 e) \log (2-x)-4 (d+e) \log (1-x))+\frac {1}{12} ((31 d-50 e) \log (x+2)-4 (7 d-13 e) \log (x+1))\right )-\frac {x (3 d-4 e)+5 d-6 e}{12 \left (x^2+3 x+2\right )}\)

Input:

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

Output:

-1/12*(5*d - 6*e + (3*d - 4*e)*x)/(2 + 3*x + x^2) + ((-4*(d + e)*Log[1 - x 
] + (d + 2*e)*Log[2 - x])/12 + (-4*(7*d - 13*e)*Log[1 + x] + (31*d - 50*e) 
*Log[2 + x])/12)/12
 

Defintions of rubi rules used

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 1141
Int[((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_ 
Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[1/c^p   Int[ExpandIntegrand[ 
(d + e*x)^m*(b/2 - q/2 + c*x)^p*(b/2 + q/2 + c*x)^p, x], x], x] /; EqQ[p, - 
1] ||  !FractionalPowerFactorQ[q]] /; FreeQ[{a, b, c, d, e}, x] && ILtQ[p, 
0] && IntegerQ[m] && NiceSqrtQ[b^2 - 4*a*c]
 

rule 1349
Int[((g_.) + (h_.)*(x_))*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_) + (e 
_.)*(x_) + (f_.)*(x_)^2)^(q_), x_Symbol] :> Simp[(a + b*x + c*x^2)^(p + 1)* 
((d + e*x + f*x^2)^(q + 1)/((b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e 
 - b*f))*(p + 1)))*(g*c*(2*a*c*e - b*(c*d + a*f)) + (g*b - a*h)*(2*c^2*d + 
b^2*f - c*(b*e + 2*a*f)) + c*(g*(2*c^2*d + b^2*f - c*(b*e + 2*a*f)) - h*(b* 
c*d - 2*a*c*e + a*b*f))*x), x] + Simp[1/((b^2 - 4*a*c)*((c*d - a*f)^2 - (b* 
d - a*e)*(c*e - b*f))*(p + 1))   Int[(a + b*x + c*x^2)^(p + 1)*(d + e*x + f 
*x^2)^q*Simp[(b*h - 2*g*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1 
) + (b^2*(g*f) - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*f) - a*((-h)*c 
*e)))*(a*f*(p + 1) - c*d*(p + 2)) - e*((g*c)*(2*a*c*e - b*(c*d + a*f)) + (g 
*b - a*h)*(2*c^2*d + b^2*f - c*(b*e + 2*a*f)))*(p + q + 2) - (2*f*((g*c)*(2 
*a*c*e - b*(c*d + a*f)) + (g*b - a*h)*(2*c^2*d + b^2*f - c*(b*e + 2*a*f)))* 
(p + q + 2) - (b^2*g*f - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*f) - a 
*((-h)*c*e)))*(b*f*(p + 1) - c*e*(2*p + q + 4)))*x - c*f*(b^2*(g*f) - b*(h* 
c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*f) + a*h*c*e))*(2*p + 2*q + 5)*x^2, 
x], x], x] /; FreeQ[{a, b, c, d, e, f, g, h, q}, x] && NeQ[b^2 - 4*a*c, 0] 
&& NeQ[e^2 - 4*d*f, 0] && LtQ[p, -1] && NeQ[(c*d - a*f)^2 - (b*d - a*e)*(c* 
e - b*f), 0] &&  !( !IntegerQ[p] && ILtQ[q, -1])
 

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 2141
Int[(Px_)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_) + (e_.)*(x_) + (f_.)*(x 
_)^2)), x_Symbol] :> With[{A = Coeff[Px, x, 0], B = Coeff[Px, x, 1], C = Co 
eff[Px, x, 2], q = c^2*d^2 - b*c*d*e + a*c*e^2 + b^2*d*f - 2*a*c*d*f - a*b* 
e*f + a^2*f^2}, Simp[1/q   Int[(A*c^2*d - a*c*C*d - A*b*c*e + a*B*c*e + A*b 
^2*f - a*b*B*f - a*A*c*f + a^2*C*f + c*(B*c*d - b*C*d - A*c*e + a*C*e + A*b 
*f - a*B*f)*x)/(a + b*x + c*x^2), x], x] + Simp[1/q   Int[(c*C*d^2 - B*c*d* 
e + A*c*e^2 + b*B*d*f - A*c*d*f - a*C*d*f - A*b*e*f + a*A*f^2 - f*(B*c*d - 
b*C*d - A*c*e + a*C*e + A*b*f - a*B*f)*x)/(d + e*x + f*x^2), x], x] /; NeQ[ 
q, 0]] /; FreeQ[{a, b, c, d, e, f}, x] && PolyQ[Px, x, 2]
 
Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.88

method result size
default \(\left (\frac {d}{144}+\frac {e}{72}\right ) \ln \left (x -2\right )+\left (-\frac {7 d}{36}+\frac {13 e}{36}\right ) \ln \left (1+x \right )-\frac {\frac {d}{6}-\frac {e}{6}}{1+x}+\left (-\frac {d}{36}-\frac {e}{36}\right ) \ln \left (x -1\right )-\frac {\frac {d}{12}-\frac {e}{6}}{x +2}+\left (\frac {31 d}{144}-\frac {25 e}{72}\right ) \ln \left (x +2\right )\) \(78\)
risch \(\frac {\left (-\frac {d}{4}+\frac {e}{3}\right ) x -\frac {5 d}{12}+\frac {e}{2}}{x^{2}+3 x +2}+\frac {\ln \left (2-x \right ) d}{144}+\frac {\ln \left (2-x \right ) e}{72}-\frac {7 \ln \left (-x -1\right ) d}{36}+\frac {13 \ln \left (-x -1\right ) e}{36}-\frac {\ln \left (x -1\right ) d}{36}-\frac {\ln \left (x -1\right ) e}{36}+\frac {31 \ln \left (x +2\right ) d}{144}-\frac {25 \ln \left (x +2\right ) e}{72}\) \(93\)
norman \(\frac {\left (-\frac {d}{4}+\frac {e}{3}\right ) x^{3}+\left (\frac {3 d}{4}-\frac {5 e}{6}\right ) x +\left (\frac {d}{3}-\frac {e}{2}\right ) x^{2}-\frac {5 d}{6}+e}{x^{4}-5 x^{2}+4}+\left (-\frac {7 d}{36}+\frac {13 e}{36}\right ) \ln \left (1+x \right )+\left (-\frac {d}{36}-\frac {e}{36}\right ) \ln \left (x -1\right )+\left (\frac {d}{144}+\frac {e}{72}\right ) \ln \left (x -2\right )+\left (\frac {31 d}{144}-\frac {25 e}{72}\right ) \ln \left (x +2\right )\) \(99\)
parallelrisch \(\frac {-36 d x -60 d +72 e +48 e x +4 \ln \left (x -2\right ) e -100 \ln \left (x +2\right ) e -4 \ln \left (x -1\right ) x^{2} d -84 \ln \left (1+x \right ) x d +156 \ln \left (1+x \right ) x e +93 \ln \left (x +2\right ) x d -150 \ln \left (x +2\right ) x e -4 \ln \left (x -1\right ) x^{2} e +3 \ln \left (x -2\right ) x d -56 \ln \left (1+x \right ) d -8 \ln \left (x -1\right ) d -12 \ln \left (x -1\right ) x e +62 \ln \left (x +2\right ) d +2 \ln \left (x -2\right ) d -8 \ln \left (x -1\right ) e +104 \ln \left (1+x \right ) e -28 \ln \left (1+x \right ) x^{2} d +52 \ln \left (1+x \right ) x^{2} e +\ln \left (x -2\right ) x^{2} d +2 \ln \left (x -2\right ) x^{2} e +31 \ln \left (x +2\right ) x^{2} d -50 \ln \left (x +2\right ) x^{2} e +6 \ln \left (x -2\right ) x e -12 \ln \left (x -1\right ) x d}{144 x^{2}+432 x +288}\) \(227\)

Input:

int((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4)^2,x,method=_RETURNVERBOSE)
 

Output:

(1/144*d+1/72*e)*ln(x-2)+(-7/36*d+13/36*e)*ln(1+x)-(1/6*d-1/6*e)/(1+x)+(-1 
/36*d-1/36*e)*ln(x-1)-(1/12*d-1/6*e)/(x+2)+(31/144*d-25/72*e)*ln(x+2)
 

Fricas [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.72 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=-\frac {12 \, {\left (3 \, d - 4 \, e\right )} x - {\left ({\left (31 \, d - 50 \, e\right )} x^{2} + 3 \, {\left (31 \, d - 50 \, e\right )} x + 62 \, d - 100 \, e\right )} \log \left (x + 2\right ) + 4 \, {\left ({\left (7 \, d - 13 \, e\right )} x^{2} + 3 \, {\left (7 \, d - 13 \, e\right )} x + 14 \, d - 26 \, e\right )} \log \left (x + 1\right ) + 4 \, {\left ({\left (d + e\right )} x^{2} + 3 \, {\left (d + e\right )} x + 2 \, d + 2 \, e\right )} \log \left (x - 1\right ) - {\left ({\left (d + 2 \, e\right )} x^{2} + 3 \, {\left (d + 2 \, e\right )} x + 2 \, d + 4 \, e\right )} \log \left (x - 2\right ) + 60 \, d - 72 \, e}{144 \, {\left (x^{2} + 3 \, x + 2\right )}} \] Input:

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

Output:

-1/144*(12*(3*d - 4*e)*x - ((31*d - 50*e)*x^2 + 3*(31*d - 50*e)*x + 62*d - 
 100*e)*log(x + 2) + 4*((7*d - 13*e)*x^2 + 3*(7*d - 13*e)*x + 14*d - 26*e) 
*log(x + 1) + 4*((d + e)*x^2 + 3*(d + e)*x + 2*d + 2*e)*log(x - 1) - ((d + 
 2*e)*x^2 + 3*(d + 2*e)*x + 2*d + 4*e)*log(x - 2) + 60*d - 72*e)/(x^2 + 3* 
x + 2)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1255 vs. \(2 (80) = 160\).

Time = 5.84 (sec) , antiderivative size = 1255, normalized size of antiderivative = 14.10 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\text {Too large to display} \] Input:

integrate((e*x+d)*(x**2-3*x+2)/(x**4-5*x**2+4)**2,x)
 

Output:

-(d + e)*log(x + (-24383100*d**6 + 187408066*d**5*e + 10439775*d**5*(d + e 
) - 511591980*d**4*e**2 - 94132290*d**4*e*(d + e) + 667200*d**4*(d + e)**2 
 + 469491120*d**3*e**3 + 333672552*d**3*e**2*(d + e) - 2703328*d**3*e*(d + 
 e)**2 - 198000*d**3*(d + e)**3 + 322778400*d**2*e**4 - 582497712*d**2*e** 
3*(d + e) + 1752768*d**2*e**2*(d + e)**2 + 1107552*d**2*e*(d + e)**3 - 863 
493856*d*e**5 + 500776560*d*e**4*(d + e) + 4226944*d*e**3*(d + e)**2 - 188 
0640*d*e**2*(d + e)**3 + 429000000*e**6 - 169242912*e**5*(d + e) - 4538112 
*e**4*(d + e)**2 + 964224*e**3*(d + e)**3)/(13474125*d**6 - 102860175*d**5 
*e + 274190390*d**4*e**2 - 224142072*d**3*e**3 - 245084096*d**2*e**4 + 535 
797456*d*e**5 - 256183200*e**6))/36 + (d + 2*e)*log(x + (-24383100*d**6 + 
187408066*d**5*e - 10439775*d**5*(d + 2*e)/4 - 511591980*d**4*e**2 + 47066 
145*d**4*e*(d + 2*e)/2 + 41700*d**4*(d + 2*e)**2 + 469491120*d**3*e**3 - 8 
3418138*d**3*e**2*(d + 2*e) - 168958*d**3*e*(d + 2*e)**2 + 12375*d**3*(d + 
 2*e)**3/4 + 322778400*d**2*e**4 + 145624428*d**2*e**3*(d + 2*e) + 109548* 
d**2*e**2*(d + 2*e)**2 - 34611*d**2*e*(d + 2*e)**3/2 - 863493856*d*e**5 - 
125194140*d*e**4*(d + 2*e) + 264184*d*e**3*(d + 2*e)**2 + 29385*d*e**2*(d 
+ 2*e)**3 + 429000000*e**6 + 42310728*e**5*(d + 2*e) - 283632*e**4*(d + 2* 
e)**2 - 15066*e**3*(d + 2*e)**3)/(13474125*d**6 - 102860175*d**5*e + 27419 
0390*d**4*e**2 - 224142072*d**3*e**3 - 245084096*d**2*e**4 + 535797456*d*e 
**5 - 256183200*e**6))/144 - (7*d - 13*e)*log(x + (-24383100*d**6 + 187...
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.84 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{144} \, {\left (31 \, d - 50 \, e\right )} \log \left (x + 2\right ) - \frac {1}{36} \, {\left (7 \, d - 13 \, e\right )} \log \left (x + 1\right ) - \frac {1}{36} \, {\left (d + e\right )} \log \left (x - 1\right ) + \frac {1}{144} \, {\left (d + 2 \, e\right )} \log \left (x - 2\right ) - \frac {{\left (3 \, d - 4 \, e\right )} x + 5 \, d - 6 \, e}{12 \, {\left (x^{2} + 3 \, x + 2\right )}} \] Input:

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

Output:

1/144*(31*d - 50*e)*log(x + 2) - 1/36*(7*d - 13*e)*log(x + 1) - 1/36*(d + 
e)*log(x - 1) + 1/144*(d + 2*e)*log(x - 2) - 1/12*((3*d - 4*e)*x + 5*d - 6 
*e)/(x^2 + 3*x + 2)
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.89 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{144} \, {\left (31 \, d - 50 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac {1}{36} \, {\left (7 \, d - 13 \, e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{36} \, {\left (d + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{144} \, {\left (d + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {{\left (3 \, d - 4 \, e\right )} x + 5 \, d - 6 \, e}{12 \, {\left (x + 2\right )} {\left (x + 1\right )}} \] Input:

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

Output:

1/144*(31*d - 50*e)*log(abs(x + 2)) - 1/36*(7*d - 13*e)*log(abs(x + 1)) - 
1/36*(d + e)*log(abs(x - 1)) + 1/144*(d + 2*e)*log(abs(x - 2)) - 1/12*((3* 
d - 4*e)*x + 5*d - 6*e)/((x + 2)*(x + 1))
 

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.89 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\ln \left (x-2\right )\,\left (\frac {d}{144}+\frac {e}{72}\right )-\ln \left (x-1\right )\,\left (\frac {d}{36}+\frac {e}{36}\right )-\ln \left (x+1\right )\,\left (\frac {7\,d}{36}-\frac {13\,e}{36}\right )-\frac {\frac {5\,d}{12}-\frac {e}{2}+x\,\left (\frac {d}{4}-\frac {e}{3}\right )}{x^2+3\,x+2}+\ln \left (x+2\right )\,\left (\frac {31\,d}{144}-\frac {25\,e}{72}\right ) \] Input:

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

Output:

log(x - 2)*(d/144 + e/72) - log(x - 1)*(d/36 + e/36) - log(x + 1)*((7*d)/3 
6 - (13*e)/36) - ((5*d)/12 - e/2 + x*(d/4 - e/3))/(3*x + x^2 + 2) + log(x 
+ 2)*((31*d)/144 - (25*e)/72)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 231, normalized size of antiderivative = 2.60 \[ \int \frac {(d+e x) \left (2-3 x+x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {-36 d +40 e +3 \,\mathrm {log}\left (x -2\right ) d x +6 \,\mathrm {log}\left (x -2\right ) e x -12 \,\mathrm {log}\left (x -1\right ) d x -12 \,\mathrm {log}\left (x -1\right ) e x +93 \,\mathrm {log}\left (x +2\right ) d x -150 \,\mathrm {log}\left (x +2\right ) e x -84 \,\mathrm {log}\left (x +1\right ) d x +156 \,\mathrm {log}\left (x +1\right ) e x +2 \,\mathrm {log}\left (x -2\right ) d +62 \,\mathrm {log}\left (x +2\right ) d +4 \,\mathrm {log}\left (x -2\right ) e -8 \,\mathrm {log}\left (x -1\right ) d -8 \,\mathrm {log}\left (x -1\right ) e -100 \,\mathrm {log}\left (x +2\right ) e -56 \,\mathrm {log}\left (x +1\right ) d +104 \,\mathrm {log}\left (x +1\right ) e -16 e \,x^{2}+\mathrm {log}\left (x -2\right ) d \,x^{2}+2 \,\mathrm {log}\left (x -2\right ) e \,x^{2}-4 \,\mathrm {log}\left (x -1\right ) d \,x^{2}-4 \,\mathrm {log}\left (x -1\right ) e \,x^{2}+31 \,\mathrm {log}\left (x +2\right ) d \,x^{2}-50 \,\mathrm {log}\left (x +2\right ) e \,x^{2}-28 \,\mathrm {log}\left (x +1\right ) d \,x^{2}+52 \,\mathrm {log}\left (x +1\right ) e \,x^{2}+12 d \,x^{2}}{144 x^{2}+432 x +288} \] Input:

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

Output:

(log(x - 2)*d*x**2 + 3*log(x - 2)*d*x + 2*log(x - 2)*d + 2*log(x - 2)*e*x* 
*2 + 6*log(x - 2)*e*x + 4*log(x - 2)*e - 4*log(x - 1)*d*x**2 - 12*log(x - 
1)*d*x - 8*log(x - 1)*d - 4*log(x - 1)*e*x**2 - 12*log(x - 1)*e*x - 8*log( 
x - 1)*e + 31*log(x + 2)*d*x**2 + 93*log(x + 2)*d*x + 62*log(x + 2)*d - 50 
*log(x + 2)*e*x**2 - 150*log(x + 2)*e*x - 100*log(x + 2)*e - 28*log(x + 1) 
*d*x**2 - 84*log(x + 1)*d*x - 56*log(x + 1)*d + 52*log(x + 1)*e*x**2 + 156 
*log(x + 1)*e*x + 104*log(x + 1)*e + 12*d*x**2 - 36*d - 16*e*x**2 + 40*e)/ 
(144*(x**2 + 3*x + 2))