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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (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 = 23, antiderivative size = 119 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {e}{18 \left (1-x^2\right )}+\frac {e}{18 \left (4-x^2\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \text {arctanh}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \text {arctanh}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right ) \] Output:

e/(-18*x^2+18)+e/(-18*x^2+72)+x*(17*d+20*f-(5*d+8*f)*x^2)/(72*x^4-360*x^2+ 
288)+1/432*(19*d+52*f)*arctanh(1/2*x)-1/54*(d+7*f)*arctanh(x)+1/27*e*ln(-x 
^2+1)-1/27*e*ln(-x^2+4)
 

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.94 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{864} \left (\frac {12 \left (17 d x+20 f x-5 d x^3-8 f x^3+e \left (20-8 x^2\right )\right )}{4-5 x^2+x^4}+8 (d+4 e+7 f) \log (1-x)-(19 d+32 e+52 f) \log (2-x)-8 (d-4 e+7 f) \log (1+x)+(19 d-32 e+52 f) \log (2+x)\right ) \] Input:

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

Output:

((12*(17*d*x + 20*f*x - 5*d*x^3 - 8*f*x^3 + e*(20 - 8*x^2)))/(4 - 5*x^2 + 
x^4) + 8*(d + 4*e + 7*f)*Log[1 - x] - (19*d + 32*e + 52*f)*Log[2 - x] - 8* 
(d - 4*e + 7*f)*Log[1 + x] + (19*d - 32*e + 52*f)*Log[2 + x])/864
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {2202, 27, 1432, 1084, 1492, 25, 1480, 220, 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 {d+e x+f x^2}{\left (x^4-5 x^2+4\right )^2} \, dx\)

\(\Big \downarrow \) 2202

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 1432

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

\(\Big \downarrow \) 1084

\(\displaystyle \int \frac {f x^2+d}{\left (x^4-5 x^2+4\right )^2}dx+\frac {1}{2} e \int \left (\frac {2}{27 \left (4-x^2\right )}+\frac {1}{9 \left (4-x^2\right )^2}-\frac {2}{27 \left (1-x^2\right )}+\frac {1}{9 \left (1-x^2\right )^2}\right )dx^2\)

\(\Big \downarrow \) 1492

\(\displaystyle -\frac {1}{72} \int -\frac {-\left ((5 d+8 f) x^2\right )+d-20 f}{x^4-5 x^2+4}dx+\frac {1}{2} e \int \left (\frac {2}{27 \left (4-x^2\right )}+\frac {1}{9 \left (4-x^2\right )^2}-\frac {2}{27 \left (1-x^2\right )}+\frac {1}{9 \left (1-x^2\right )^2}\right )dx^2+\frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{72 \left (x^4-5 x^2+4\right )}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{72} \int \frac {-\left ((5 d+8 f) x^2\right )+d-20 f}{x^4-5 x^2+4}dx+\frac {1}{2} e \int \left (\frac {2}{27 \left (4-x^2\right )}+\frac {1}{9 \left (4-x^2\right )^2}-\frac {2}{27 \left (1-x^2\right )}+\frac {1}{9 \left (1-x^2\right )^2}\right )dx^2+\frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{72 \left (x^4-5 x^2+4\right )}\)

\(\Big \downarrow \) 1480

\(\displaystyle \frac {1}{72} \left (\frac {4}{3} (d+7 f) \int \frac {1}{x^2-1}dx-\frac {1}{3} (19 d+52 f) \int \frac {1}{x^2-4}dx\right )+\frac {1}{2} e \int \left (\frac {2}{27 \left (4-x^2\right )}+\frac {1}{9 \left (4-x^2\right )^2}-\frac {2}{27 \left (1-x^2\right )}+\frac {1}{9 \left (1-x^2\right )^2}\right )dx^2+\frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{72 \left (x^4-5 x^2+4\right )}\)

\(\Big \downarrow \) 220

\(\displaystyle \frac {1}{2} e \int \left (\frac {2}{27 \left (4-x^2\right )}+\frac {1}{9 \left (4-x^2\right )^2}-\frac {2}{27 \left (1-x^2\right )}+\frac {1}{9 \left (1-x^2\right )^2}\right )dx^2+\frac {1}{72} \left (\frac {1}{6} \text {arctanh}\left (\frac {x}{2}\right ) (19 d+52 f)-\frac {4}{3} \text {arctanh}(x) (d+7 f)\right )+\frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{72 \left (x^4-5 x^2+4\right )}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{72} \left (\frac {1}{6} \text {arctanh}\left (\frac {x}{2}\right ) (19 d+52 f)-\frac {4}{3} \text {arctanh}(x) (d+7 f)\right )+\frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{72 \left (x^4-5 x^2+4\right )}+\frac {1}{2} e \left (\frac {1}{9 \left (1-x^2\right )}+\frac {1}{9 \left (4-x^2\right )}+\frac {2}{27} \log \left (1-x^2\right )-\frac {2}{27} \log \left (4-x^2\right )\right )\)

Input:

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

Output:

(x*(17*d + 20*f - (5*d + 8*f)*x^2))/(72*(4 - 5*x^2 + x^4)) + (((19*d + 52* 
f)*ArcTanh[x/2])/6 - (4*(d + 7*f)*ArcTanh[x])/3)/72 + (e*(1/(9*(1 - x^2)) 
+ 1/(9*(4 - x^2)) + (2*Log[1 - x^2])/27 - (2*Log[4 - x^2])/27))/2
 

Defintions of rubi rules used

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 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[a, 0] || GtQ[b, 0])
 

rule 1084
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 
- 4*a*c, 2]}, Simp[1/c^p   Int[ExpandIntegrand[(b/2 - q/2 + c*x)^p*(b/2 + q 
/2 + c*x)^p, x], x], x] /;  !FractionalPowerFactorQ[q]] /; FreeQ[{a, b, c}, 
 x] && IntegerQ[p] && NiceSqrtQ[b^2 - 4*a*c]
 

rule 1432
Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[1/2 
 Subst[Int[(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x]
 

rule 1480
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q))   Int[1/( 
b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q))   Int[1/(b/2 
+ q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] 
 && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
 

rule 1492
Int[((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symb 
ol] :> Simp[x*(a*b*e - d*(b^2 - 2*a*c) - c*(b*d - 2*a*e)*x^2)*((a + b*x^2 + 
 c*x^4)^(p + 1)/(2*a*(p + 1)*(b^2 - 4*a*c))), x] + Simp[1/(2*a*(p + 1)*(b^2 
 - 4*a*c))   Int[Simp[(2*p + 3)*d*b^2 - a*b*e - 2*a*c*d*(4*p + 5) + (4*p + 
7)*(d*b - 2*a*e)*c*x^2, x]*(a + b*x^2 + c*x^4)^(p + 1), x], x] /; FreeQ[{a, 
 b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && 
 LtQ[p, -1] && IntegerQ[2*p]
 

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

rule 2202
Int[(Pn_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{n 
 = Expon[Pn, x], k}, Int[Sum[Coeff[Pn, x, 2*k]*x^(2*k), {k, 0, n/2}]*(a + b 
*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pn, x, 2*k + 1]*x^(2*k), {k, 0, (n - 
1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pn, x] 
 &&  !PolyQ[Pn, x^2]
 
Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.88

method result size
norman \(\frac {\left (-\frac {5 d}{72}-\frac {f}{9}\right ) x^{3}+\left (\frac {17 d}{72}+\frac {5 f}{18}\right ) x -\frac {e \,x^{2}}{9}+\frac {5 e}{18}}{x^{4}-5 x^{2}+4}+\left (-\frac {19 d}{864}-\frac {e}{27}-\frac {13 f}{216}\right ) \ln \left (x -2\right )+\left (-\frac {d}{108}+\frac {e}{27}-\frac {7 f}{108}\right ) \ln \left (1+x \right )+\left (\frac {d}{108}+\frac {e}{27}+\frac {7 f}{108}\right ) \ln \left (x -1\right )+\left (\frac {19 d}{864}-\frac {e}{27}+\frac {13 f}{216}\right ) \ln \left (x +2\right )\) \(105\)
default \(\left (-\frac {19 d}{864}-\frac {e}{27}-\frac {13 f}{216}\right ) \ln \left (x -2\right )-\frac {\frac {d}{144}+\frac {e}{72}+\frac {f}{36}}{x -2}+\left (-\frac {d}{108}+\frac {e}{27}-\frac {7 f}{108}\right ) \ln \left (1+x \right )-\frac {\frac {d}{36}-\frac {e}{36}+\frac {f}{36}}{1+x}-\frac {\frac {d}{36}+\frac {e}{36}+\frac {f}{36}}{x -1}+\left (\frac {d}{108}+\frac {e}{27}+\frac {7 f}{108}\right ) \ln \left (x -1\right )-\frac {\frac {d}{144}-\frac {e}{72}+\frac {f}{36}}{x +2}+\left (\frac {19 d}{864}-\frac {e}{27}+\frac {13 f}{216}\right ) \ln \left (x +2\right )\) \(130\)
risch \(\frac {\left (-\frac {5 d}{72}-\frac {f}{9}\right ) x^{3}+\left (\frac {17 d}{72}+\frac {5 f}{18}\right ) x -\frac {e \,x^{2}}{9}+\frac {5 e}{18}}{x^{4}-5 x^{2}+4}+\frac {19 \ln \left (x +2\right ) d}{864}-\frac {\ln \left (x +2\right ) e}{27}+\frac {13 \ln \left (x +2\right ) f}{216}+\frac {\ln \left (1-x \right ) d}{108}+\frac {\ln \left (1-x \right ) e}{27}+\frac {7 \ln \left (1-x \right ) f}{108}-\frac {19 \ln \left (2-x \right ) d}{864}-\frac {\ln \left (2-x \right ) e}{27}-\frac {13 \ln \left (2-x \right ) f}{216}-\frac {\ln \left (1+x \right ) d}{108}+\frac {\ln \left (1+x \right ) e}{27}-\frac {7 \ln \left (1+x \right ) f}{108}\) \(141\)
parallelrisch \(-\frac {-204 d x -240 f x -240 e +128 \ln \left (x -2\right ) e +128 \ln \left (x +2\right ) e +40 \ln \left (x -1\right ) x^{2} d +160 \ln \left (x -1\right ) x^{2} e +60 d \,x^{3}+96 e \,x^{2}+208 \ln \left (x -2\right ) f +56 \ln \left (1+x \right ) x^{4} f -19 \ln \left (x +2\right ) x^{4} d +32 \ln \left (1+x \right ) d -208 \ln \left (x +2\right ) f -32 \ln \left (x -1\right ) d -76 \ln \left (x +2\right ) d +76 \ln \left (x -2\right ) d -128 \ln \left (x -1\right ) e +224 \ln \left (1+x \right ) f -128 \ln \left (1+x \right ) e -224 \ln \left (x -1\right ) f +32 \ln \left (x -2\right ) x^{4} e +52 \ln \left (x -2\right ) x^{4} f -32 \ln \left (x -1\right ) x^{4} e -56 \ln \left (x -1\right ) x^{4} f +8 \ln \left (1+x \right ) x^{4} d -32 \ln \left (1+x \right ) x^{4} e +96 f \,x^{3}+280 \ln \left (x -1\right ) x^{2} f -40 \ln \left (1+x \right ) x^{2} d +160 \ln \left (1+x \right ) x^{2} e -95 \ln \left (x -2\right ) x^{2} d -160 \ln \left (x -2\right ) x^{2} e +19 \ln \left (x -2\right ) x^{4} d -280 \ln \left (1+x \right ) x^{2} f +95 \ln \left (x +2\right ) x^{2} d -160 \ln \left (x +2\right ) x^{2} e +260 \ln \left (x +2\right ) x^{2} f -8 \ln \left (x -1\right ) x^{4} d -52 \ln \left (x +2\right ) x^{4} f -260 \ln \left (x -2\right ) x^{2} f +32 \ln \left (x +2\right ) x^{4} e}{864 \left (x^{4}-5 x^{2}+4\right )}\) \(369\)

Input:

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

Output:

((-5/72*d-1/9*f)*x^3+(17/72*d+5/18*f)*x-1/9*e*x^2+5/18*e)/(x^4-5*x^2+4)+(- 
19/864*d-1/27*e-13/216*f)*ln(x-2)+(-1/108*d+1/27*e-7/108*f)*ln(1+x)+(1/108 
*d+1/27*e+7/108*f)*ln(x-1)+(19/864*d-1/27*e+13/216*f)*ln(x+2)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 217 vs. \(2 (98) = 196\).

Time = 0.13 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.82 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=-\frac {12 \, {\left (5 \, d + 8 \, f\right )} x^{3} + 96 \, e x^{2} - 12 \, {\left (17 \, d + 20 \, f\right )} x - {\left ({\left (19 \, d - 32 \, e + 52 \, f\right )} x^{4} - 5 \, {\left (19 \, d - 32 \, e + 52 \, f\right )} x^{2} + 76 \, d - 128 \, e + 208 \, f\right )} \log \left (x + 2\right ) + 8 \, {\left ({\left (d - 4 \, e + 7 \, f\right )} x^{4} - 5 \, {\left (d - 4 \, e + 7 \, f\right )} x^{2} + 4 \, d - 16 \, e + 28 \, f\right )} \log \left (x + 1\right ) - 8 \, {\left ({\left (d + 4 \, e + 7 \, f\right )} x^{4} - 5 \, {\left (d + 4 \, e + 7 \, f\right )} x^{2} + 4 \, d + 16 \, e + 28 \, f\right )} \log \left (x - 1\right ) + {\left ({\left (19 \, d + 32 \, e + 52 \, f\right )} x^{4} - 5 \, {\left (19 \, d + 32 \, e + 52 \, f\right )} x^{2} + 76 \, d + 128 \, e + 208 \, f\right )} \log \left (x - 2\right ) - 240 \, e}{864 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \] Input:

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

Output:

-1/864*(12*(5*d + 8*f)*x^3 + 96*e*x^2 - 12*(17*d + 20*f)*x - ((19*d - 32*e 
 + 52*f)*x^4 - 5*(19*d - 32*e + 52*f)*x^2 + 76*d - 128*e + 208*f)*log(x + 
2) + 8*((d - 4*e + 7*f)*x^4 - 5*(d - 4*e + 7*f)*x^2 + 4*d - 16*e + 28*f)*l 
og(x + 1) - 8*((d + 4*e + 7*f)*x^4 - 5*(d + 4*e + 7*f)*x^2 + 4*d + 16*e + 
28*f)*log(x - 1) + ((19*d + 32*e + 52*f)*x^4 - 5*(19*d + 32*e + 52*f)*x^2 
+ 76*d + 128*e + 208*f)*log(x - 2) - 240*e)/(x^4 - 5*x^2 + 4)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2689 vs. \(2 (94) = 188\).

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

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

Output:

-(d - 4*e + 7*f)*log(x + (-6006260*d**5*e + 2341251*d**5*(d - 4*e + 7*f) - 
 246016240*d**4*e*f + 31626180*d**4*f*(d - 4*e + 7*f) - 18247680*d**3*e**3 
 + 24099840*d**3*e**2*(d - 4*e + 7*f) - 2758371200*d**3*e*f**2 + 7387904*d 
**3*e*(d - 4*e + 7*f)**2 + 171122976*d**3*f**2*(d - 4*e + 7*f) - 665280*d* 
*3*(d - 4*e + 7*f)**3 + 298598400*d**2*e**3*f + 369487872*d**2*e**2*f*(d - 
 4*e + 7*f) - 13192256000*d**2*e*f**3 + 90885120*d**2*e*f*(d - 4*e + 7*f)* 
*2 + 441486720*d**2*f**3*(d - 4*e + 7*f) - 5536512*d**2*f*(d - 4*e + 7*f)* 
*3 + 587202560*d*e**5 - 12582912*d*e**4*(d - 4*e + 7*f) + 1353646080*d*e** 
3*f**2 - 36700160*d*e**3*(d - 4*e + 7*f)**2 + 1448755200*d*e**2*f**2*(d - 
4*e + 7*f) + 786432*d*e**2*(d - 4*e + 7*f)**3 - 28282393600*d*e*f**4 + 362 
729472*d*e*f**2*(d - 4*e + 7*f)**2 + 399575808*d*f**4*(d - 4*e + 7*f) - 10 
368000*d*f**2*(d - 4*e + 7*f)**3 + 2751463424*e**5*f + 251658240*e**4*f*(d 
 - 4*e + 7*f) - 530841600*e**3*f**3 - 171966464*e**3*f*(d - 4*e + 7*f)**2 
+ 1935212544*e**2*f**3*(d - 4*e + 7*f) - 15728640*e**2*f*(d - 4*e + 7*f)** 
3 - 21886889984*e*f**5 + 483737600*e*f**3*(d - 4*e + 7*f)**2 - 212474880*f 
**5*(d - 4*e + 7*f) + 4534272*f**3*(d - 4*e + 7*f)**3)/(1675971*d**6 + 285 
07545*d**5*f - 66150400*d**4*e**2 + 168075324*d**4*f**2 - 1091117056*d**3* 
e**2*f + 384095520*d**3*f**3 + 318767104*d**2*e**4 - 6528860160*d**2*e**2* 
f**2 + 162082944*d**2*f**4 + 3103784960*d*e**4*f - 17414619136*d*e**2*f**3 
 - 305130240*d*f**5 + 6106906624*e**4*f**2 - 17414225920*e**2*f**4 + 67...
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.89 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{864} \, {\left (19 \, d - 32 \, e + 52 \, f\right )} \log \left (x + 2\right ) - \frac {1}{108} \, {\left (d - 4 \, e + 7 \, f\right )} \log \left (x + 1\right ) + \frac {1}{108} \, {\left (d + 4 \, e + 7 \, f\right )} \log \left (x - 1\right ) - \frac {1}{864} \, {\left (19 \, d + 32 \, e + 52 \, f\right )} \log \left (x - 2\right ) - \frac {{\left (5 \, d + 8 \, f\right )} x^{3} + 8 \, e x^{2} - {\left (17 \, d + 20 \, f\right )} x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \] Input:

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

Output:

1/864*(19*d - 32*e + 52*f)*log(x + 2) - 1/108*(d - 4*e + 7*f)*log(x + 1) + 
 1/108*(d + 4*e + 7*f)*log(x - 1) - 1/864*(19*d + 32*e + 52*f)*log(x - 2) 
- 1/72*((5*d + 8*f)*x^3 + 8*e*x^2 - (17*d + 20*f)*x - 20*e)/(x^4 - 5*x^2 + 
 4)
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.92 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{864} \, {\left (19 \, d - 32 \, e + 52 \, f\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac {1}{108} \, {\left (d - 4 \, e + 7 \, f\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{108} \, {\left (d + 4 \, e + 7 \, f\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{864} \, {\left (19 \, d + 32 \, e + 52 \, f\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {5 \, d x^{3} + 8 \, f x^{3} + 8 \, e x^{2} - 17 \, d x - 20 \, f x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \] Input:

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

Output:

1/864*(19*d - 32*e + 52*f)*log(abs(x + 2)) - 1/108*(d - 4*e + 7*f)*log(abs 
(x + 1)) + 1/108*(d + 4*e + 7*f)*log(abs(x - 1)) - 1/864*(19*d + 32*e + 52 
*f)*log(abs(x - 2)) - 1/72*(5*d*x^3 + 8*f*x^3 + 8*e*x^2 - 17*d*x - 20*f*x 
- 20*e)/(x^4 - 5*x^2 + 4)
                                                                                    
                                                                                    
 

Mupad [B] (verification not implemented)

Time = 17.99 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.90 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\ln \left (x-1\right )\,\left (\frac {d}{108}+\frac {e}{27}+\frac {7\,f}{108}\right )-\ln \left (x+1\right )\,\left (\frac {d}{108}-\frac {e}{27}+\frac {7\,f}{108}\right )-\ln \left (x-2\right )\,\left (\frac {19\,d}{864}+\frac {e}{27}+\frac {13\,f}{216}\right )+\ln \left (x+2\right )\,\left (\frac {19\,d}{864}-\frac {e}{27}+\frac {13\,f}{216}\right )+\frac {\left (-\frac {5\,d}{72}-\frac {f}{9}\right )\,x^3-\frac {e\,x^2}{9}+\left (\frac {17\,d}{72}+\frac {5\,f}{18}\right )\,x+\frac {5\,e}{18}}{x^4-5\,x^2+4} \] Input:

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

Output:

log(x - 1)*(d/108 + e/27 + (7*f)/108) - log(x + 1)*(d/108 - e/27 + (7*f)/1 
08) - log(x - 2)*((19*d)/864 + e/27 + (13*f)/216) + log(x + 2)*((19*d)/864 
 - e/27 + (13*f)/216) + ((5*e)/18 - x^3*((5*d)/72 + f/9) - (e*x^2)/9 + x*( 
(17*d)/72 + (5*f)/18))/(x^4 - 5*x^2 + 4)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 369, normalized size of antiderivative = 3.10 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {816 e -380 \,\mathrm {log}\left (x -2\right ) d +380 \,\mathrm {log}\left (x +2\right ) d -640 \,\mathrm {log}\left (x -2\right ) e -1040 \,\mathrm {log}\left (x -2\right ) f +160 \,\mathrm {log}\left (x -1\right ) d +640 \,\mathrm {log}\left (x -1\right ) e +1120 \,\mathrm {log}\left (x -1\right ) f -640 \,\mathrm {log}\left (x +2\right ) e +1040 \,\mathrm {log}\left (x +2\right ) f -160 \,\mathrm {log}\left (x +1\right ) d +640 \,\mathrm {log}\left (x +1\right ) e -1120 \,\mathrm {log}\left (x +1\right ) f -300 d \,x^{3}-480 f \,x^{3}+1200 f x -96 e \,x^{4}+1020 d x -95 \,\mathrm {log}\left (x -2\right ) d \,x^{4}+475 \,\mathrm {log}\left (x -2\right ) d \,x^{2}-160 \,\mathrm {log}\left (x -2\right ) e \,x^{4}+800 \,\mathrm {log}\left (x -2\right ) e \,x^{2}-260 \,\mathrm {log}\left (x -2\right ) f \,x^{4}+1300 \,\mathrm {log}\left (x -2\right ) f \,x^{2}+40 \,\mathrm {log}\left (x -1\right ) d \,x^{4}-200 \,\mathrm {log}\left (x -1\right ) d \,x^{2}+160 \,\mathrm {log}\left (x -1\right ) e \,x^{4}-800 \,\mathrm {log}\left (x -1\right ) e \,x^{2}+280 \,\mathrm {log}\left (x -1\right ) f \,x^{4}-1400 \,\mathrm {log}\left (x -1\right ) f \,x^{2}+95 \,\mathrm {log}\left (x +2\right ) d \,x^{4}-475 \,\mathrm {log}\left (x +2\right ) d \,x^{2}-160 \,\mathrm {log}\left (x +2\right ) e \,x^{4}+800 \,\mathrm {log}\left (x +2\right ) e \,x^{2}+260 \,\mathrm {log}\left (x +2\right ) f \,x^{4}-1300 \,\mathrm {log}\left (x +2\right ) f \,x^{2}-40 \,\mathrm {log}\left (x +1\right ) d \,x^{4}+200 \,\mathrm {log}\left (x +1\right ) d \,x^{2}+160 \,\mathrm {log}\left (x +1\right ) e \,x^{4}-800 \,\mathrm {log}\left (x +1\right ) e \,x^{2}-280 \,\mathrm {log}\left (x +1\right ) f \,x^{4}+1400 \,\mathrm {log}\left (x +1\right ) f \,x^{2}}{4320 x^{4}-21600 x^{2}+17280} \] Input:

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

Output:

( - 95*log(x - 2)*d*x**4 + 475*log(x - 2)*d*x**2 - 380*log(x - 2)*d - 160* 
log(x - 2)*e*x**4 + 800*log(x - 2)*e*x**2 - 640*log(x - 2)*e - 260*log(x - 
 2)*f*x**4 + 1300*log(x - 2)*f*x**2 - 1040*log(x - 2)*f + 40*log(x - 1)*d* 
x**4 - 200*log(x - 1)*d*x**2 + 160*log(x - 1)*d + 160*log(x - 1)*e*x**4 - 
800*log(x - 1)*e*x**2 + 640*log(x - 1)*e + 280*log(x - 1)*f*x**4 - 1400*lo 
g(x - 1)*f*x**2 + 1120*log(x - 1)*f + 95*log(x + 2)*d*x**4 - 475*log(x + 2 
)*d*x**2 + 380*log(x + 2)*d - 160*log(x + 2)*e*x**4 + 800*log(x + 2)*e*x** 
2 - 640*log(x + 2)*e + 260*log(x + 2)*f*x**4 - 1300*log(x + 2)*f*x**2 + 10 
40*log(x + 2)*f - 40*log(x + 1)*d*x**4 + 200*log(x + 1)*d*x**2 - 160*log(x 
 + 1)*d + 160*log(x + 1)*e*x**4 - 800*log(x + 1)*e*x**2 + 640*log(x + 1)*e 
 - 280*log(x + 1)*f*x**4 + 1400*log(x + 1)*f*x**2 - 1120*log(x + 1)*f - 30 
0*d*x**3 + 1020*d*x - 96*e*x**4 + 816*e - 480*f*x**3 + 1200*f*x)/(4320*(x* 
*4 - 5*x**2 + 4))