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

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 = 21, antiderivative size = 105 \[ \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {d+e}{12 (1-x)}+\frac {d+2 e}{36 (2-x)}-\frac {d-e}{36 (1+x)}+\frac {1}{36} (2 d+5 e) \log (1-x)-\frac {1}{432} (35 d+58 e) \log (2-x)+\frac {1}{108} (2 d+e) \log (1+x)+\frac {1}{144} (d-2 e) \log (2+x) \] Output:

(d+e)/(12-12*x)+(d+2*e)/(72-36*x)-(d-e)/(36+36*x)+1/36*(2*d+5*e)*ln(1-x)-1 
/432*(35*d+58*e)*ln(2-x)+1/108*(2*d+e)*ln(1+x)+1/144*(d-2*e)*ln(2+x)
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.92 \[ \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{432} \left (\frac {12 \left (d \left (5+6 x-5 x^2\right )+2 e \left (5-2 x^2\right )\right )}{2-x-2 x^2+x^3}+12 (2 d+5 e) \log (1-x)-(35 d+58 e) \log (2-x)+4 (2 d+e) \log (1+x)+3 (d-2 e) \log (2+x)\right ) \] Input:

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

Output:

((12*(d*(5 + 6*x - 5*x^2) + 2*e*(5 - 2*x^2)))/(2 - x - 2*x^2 + x^3) + 12*( 
2*d + 5*e)*Log[1 - x] - (35*d + 58*e)*Log[2 - x] + 4*(2*d + e)*Log[1 + x] 
+ 3*(d - 2*e)*Log[2 + x])/432
 

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 105, 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.143, 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 {(x+2) (d+e x)}{\left (x^4-5 x^2+4\right )^2} \, dx\)

\(\Big \downarrow \) 2019

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

\(\Big \downarrow \) 2462

\(\displaystyle \int \left (\frac {-35 d-58 e}{432 (x-2)}+\frac {2 d+5 e}{36 (x-1)}+\frac {2 d+e}{108 (x+1)}+\frac {d-2 e}{144 (x+2)}+\frac {d+2 e}{36 (x-2)^2}+\frac {d+e}{12 (x-1)^2}+\frac {d-e}{36 (x+1)^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {d-e}{36 (x+1)}+\frac {d+e}{12 (1-x)}+\frac {d+2 e}{36 (2-x)}+\frac {1}{36} (2 d+5 e) \log (1-x)-\frac {1}{432} (35 d+58 e) \log (2-x)+\frac {1}{108} (2 d+e) \log (x+1)+\frac {1}{144} (d-2 e) \log (x+2)\)

Input:

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

Output:

(d + e)/(12*(1 - x)) + (d + 2*e)/(36*(2 - x)) - (d - e)/(36*(1 + x)) + ((2 
*d + 5*e)*Log[1 - x])/36 - ((35*d + 58*e)*Log[2 - x])/432 + ((2*d + e)*Log 
[1 + x])/108 + ((d - 2*e)*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.07 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.88

method result size
default \(\left (-\frac {35 d}{432}-\frac {29 e}{216}\right ) \ln \left (x -2\right )-\frac {\frac {d}{36}+\frac {e}{18}}{x -2}-\frac {\frac {d}{36}-\frac {e}{36}}{1+x}+\left (\frac {d}{54}+\frac {e}{108}\right ) \ln \left (1+x \right )-\frac {\frac {d}{12}+\frac {e}{12}}{x -1}+\left (\frac {d}{18}+\frac {5 e}{36}\right ) \ln \left (x -1\right )+\left (\frac {d}{144}-\frac {e}{72}\right ) \ln \left (x +2\right )\) \(92\)
norman \(\frac {\left (-\frac {5 d}{36}-\frac {e}{9}\right ) x^{3}+\left (\frac {17 d}{36}+\frac {5 e}{18}\right ) x +\left (-\frac {d}{9}-\frac {2 e}{9}\right ) x^{2}+\frac {5 d}{18}+\frac {5 e}{9}}{x^{4}-5 x^{2}+4}+\left (-\frac {35 d}{432}-\frac {29 e}{216}\right ) \ln \left (x -2\right )+\left (\frac {d}{18}+\frac {5 e}{36}\right ) \ln \left (x -1\right )+\left (\frac {d}{54}+\frac {e}{108}\right ) \ln \left (1+x \right )+\left (\frac {d}{144}-\frac {e}{72}\right ) \ln \left (x +2\right )\) \(101\)
risch \(\frac {\left (-\frac {5 d}{36}-\frac {e}{9}\right ) x^{2}+\frac {d x}{6}+\frac {5 d}{36}+\frac {5 e}{18}}{x^{3}-2 x^{2}-x +2}+\frac {\ln \left (x +2\right ) d}{144}-\frac {\ln \left (x +2\right ) e}{72}+\frac {\ln \left (-x -1\right ) d}{54}+\frac {\ln \left (-x -1\right ) e}{108}+\frac {\ln \left (x -1\right ) d}{18}+\frac {5 \ln \left (x -1\right ) e}{36}-\frac {35 \ln \left (2-x \right ) d}{432}-\frac {29 \ln \left (2-x \right ) e}{216}\) \(104\)
parallelrisch \(-\frac {-72 d x -60 d -120 e +116 \ln \left (x -2\right ) e +12 \ln \left (x +2\right ) e +48 \ln \left (x -1\right ) x^{2} d +8 \ln \left (1+x \right ) x d +4 \ln \left (1+x \right ) x e +3 \ln \left (x +2\right ) x d -6 \ln \left (x +2\right ) x e +120 \ln \left (x -1\right ) x^{2} e +60 d \,x^{2}+48 e \,x^{2}-35 \ln \left (x -2\right ) x d -16 \ln \left (1+x \right ) d -48 \ln \left (x -1\right ) d +60 \ln \left (x -1\right ) x e -6 \ln \left (x +2\right ) d +70 \ln \left (x -2\right ) d +58 \ln \left (x -2\right ) x^{3} e -120 \ln \left (x -1\right ) e -8 \ln \left (1+x \right ) e +35 \ln \left (x -2\right ) x^{3} d +16 \ln \left (1+x \right ) x^{2} d +8 \ln \left (1+x \right ) x^{2} e -70 \ln \left (x -2\right ) x^{2} d -116 \ln \left (x -2\right ) x^{2} e +6 \ln \left (x +2\right ) x^{2} d -12 \ln \left (x +2\right ) x^{2} e -4 \ln \left (1+x \right ) x^{3} e -58 \ln \left (x -2\right ) x e +24 \ln \left (x -1\right ) x d -60 \ln \left (x -1\right ) x^{3} e -8 \ln \left (1+x \right ) x^{3} d -24 \ln \left (x -1\right ) x^{3} d +6 \ln \left (x +2\right ) x^{3} e -3 \ln \left (x +2\right ) x^{3} d}{432 \left (x^{3}-2 x^{2}-x +2\right )}\) \(321\)

Input:

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

Output:

(-35/432*d-29/216*e)*ln(x-2)-(1/36*d+1/18*e)/(x-2)-(1/36*d-1/36*e)/(1+x)+( 
1/54*d+1/108*e)*ln(1+x)-(1/12*d+1/12*e)/(x-1)+(1/18*d+5/36*e)*ln(x-1)+(1/1 
44*d-1/72*e)*ln(x+2)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 211 vs. \(2 (87) = 174\).

Time = 0.09 (sec) , antiderivative size = 211, normalized size of antiderivative = 2.01 \[ \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx=-\frac {12 \, {\left (5 \, d + 4 \, e\right )} x^{2} - 72 \, d x - 3 \, {\left ({\left (d - 2 \, e\right )} x^{3} - 2 \, {\left (d - 2 \, e\right )} x^{2} - {\left (d - 2 \, e\right )} x + 2 \, d - 4 \, e\right )} \log \left (x + 2\right ) - 4 \, {\left ({\left (2 \, d + e\right )} x^{3} - 2 \, {\left (2 \, d + e\right )} x^{2} - {\left (2 \, d + e\right )} x + 4 \, d + 2 \, e\right )} \log \left (x + 1\right ) - 12 \, {\left ({\left (2 \, d + 5 \, e\right )} x^{3} - 2 \, {\left (2 \, d + 5 \, e\right )} x^{2} - {\left (2 \, d + 5 \, e\right )} x + 4 \, d + 10 \, e\right )} \log \left (x - 1\right ) + {\left ({\left (35 \, d + 58 \, e\right )} x^{3} - 2 \, {\left (35 \, d + 58 \, e\right )} x^{2} - {\left (35 \, d + 58 \, e\right )} x + 70 \, d + 116 \, e\right )} \log \left (x - 2\right ) - 60 \, d - 120 \, e}{432 \, {\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \] Input:

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

Output:

-1/432*(12*(5*d + 4*e)*x^2 - 72*d*x - 3*((d - 2*e)*x^3 - 2*(d - 2*e)*x^2 - 
 (d - 2*e)*x + 2*d - 4*e)*log(x + 2) - 4*((2*d + e)*x^3 - 2*(2*d + e)*x^2 
- (2*d + e)*x + 4*d + 2*e)*log(x + 1) - 12*((2*d + 5*e)*x^3 - 2*(2*d + 5*e 
)*x^2 - (2*d + 5*e)*x + 4*d + 10*e)*log(x - 1) + ((35*d + 58*e)*x^3 - 2*(3 
5*d + 58*e)*x^2 - (35*d + 58*e)*x + 70*d + 116*e)*log(x - 2) - 60*d - 120* 
e)/(x^3 - 2*x^2 - x + 2)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1034 vs. \(2 (78) = 156\).

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

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

Output:

(d - 2*e)*log(x + (8710660*d**5 + 91884504*d**4*e - 7579779*d**4*(d - 2*e) 
/4 + 364910432*d**3*e**2 - 18128055*d**3*e*(d - 2*e) - 83772*d**3*(d - 2*e 
)**2 + 686697536*d**2*e**3 - 60296868*d**2*e**2*(d - 2*e) - 597816*d**2*e* 
(d - 2*e)**2 + 65907*d**2*(d - 2*e)**3/4 + 614357568*d*e**4 - 85949220*d*e 
**3*(d - 2*e) - 1500048*d*e**2*(d - 2*e)**2 + 105840*d*e*(d - 2*e)**3 + 20 
8470400*e**5 - 45136356*e**4*(d - 2*e) - 1196064*e**3*(d - 2*e)**2 + 12827 
7*e**2*(d - 2*e)**3)/(3374210*d**5 + 38645295*d**4*e + 170558380*d**3*e**2 
 + 362061760*d**2*e**3 + 370298160*d*e**4 + 146466320*e**5))/144 + (2*d + 
e)*log(x + (8710660*d**5 + 91884504*d**4*e - 2526593*d**4*(2*d + e) + 3649 
10432*d**3*e**2 - 24170740*d**3*e*(2*d + e) - 148928*d**3*(2*d + e)**2 + 6 
86697536*d**2*e**3 - 80395824*d**2*e**2*(2*d + e) - 1062784*d**2*e*(2*d + 
e)**2 + 39056*d**2*(2*d + e)**3 + 614357568*d*e**4 - 114598960*d*e**3*(2*d 
 + e) - 2666752*d*e**2*(2*d + e)**2 + 250880*d*e*(2*d + e)**3 + 208470400* 
e**5 - 60181808*e**4*(2*d + e) - 2126336*e**3*(2*d + e)**2 + 304064*e**2*( 
2*d + e)**3)/(3374210*d**5 + 38645295*d**4*e + 170558380*d**3*e**2 + 36206 
1760*d**2*e**3 + 370298160*d*e**4 + 146466320*e**5))/108 + (2*d + 5*e)*log 
(x + (8710660*d**5 + 91884504*d**4*e - 7579779*d**4*(2*d + 5*e) + 36491043 
2*d**3*e**2 - 72512220*d**3*e*(2*d + 5*e) - 1340352*d**3*(2*d + 5*e)**2 + 
686697536*d**2*e**3 - 241187472*d**2*e**2*(2*d + 5*e) - 9565056*d**2*e*(2* 
d + 5*e)**2 + 1054512*d**2*(2*d + 5*e)**3 + 614357568*d*e**4 - 34379688...
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.84 \[ \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{144} \, {\left (d - 2 \, e\right )} \log \left (x + 2\right ) + \frac {1}{108} \, {\left (2 \, d + e\right )} \log \left (x + 1\right ) + \frac {1}{36} \, {\left (2 \, d + 5 \, e\right )} \log \left (x - 1\right ) - \frac {1}{432} \, {\left (35 \, d + 58 \, e\right )} \log \left (x - 2\right ) - \frac {{\left (5 \, d + 4 \, e\right )} x^{2} - 6 \, d x - 5 \, d - 10 \, e}{36 \, {\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \] Input:

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

Output:

1/144*(d - 2*e)*log(x + 2) + 1/108*(2*d + e)*log(x + 1) + 1/36*(2*d + 5*e) 
*log(x - 1) - 1/432*(35*d + 58*e)*log(x - 2) - 1/36*((5*d + 4*e)*x^2 - 6*d 
*x - 5*d - 10*e)/(x^3 - 2*x^2 - x + 2)
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.88 \[ \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{144} \, {\left (d - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{108} \, {\left (2 \, d + e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{36} \, {\left (2 \, d + 5 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{432} \, {\left (35 \, d + 58 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {{\left (5 \, d + 4 \, e\right )} x^{2} - 6 \, d x - 5 \, d - 10 \, e}{36 \, {\left (x + 1\right )} {\left (x - 1\right )} {\left (x - 2\right )}} \] Input:

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

Output:

1/144*(d - 2*e)*log(abs(x + 2)) + 1/108*(2*d + e)*log(abs(x + 1)) + 1/36*( 
2*d + 5*e)*log(abs(x - 1)) - 1/432*(35*d + 58*e)*log(abs(x - 2)) - 1/36*(( 
5*d + 4*e)*x^2 - 6*d*x - 5*d - 10*e)/((x + 1)*(x - 1)*(x - 2))
 

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.86 \[ \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx=\ln \left (x-1\right )\,\left (\frac {d}{18}+\frac {5\,e}{36}\right )-\frac {\left (-\frac {5\,d}{36}-\frac {e}{9}\right )\,x^2+\frac {d\,x}{6}+\frac {5\,d}{36}+\frac {5\,e}{18}}{-x^3+2\,x^2+x-2}+\ln \left (x+1\right )\,\left (\frac {d}{54}+\frac {e}{108}\right )+\ln \left (x+2\right )\,\left (\frac {d}{144}-\frac {e}{72}\right )-\ln \left (x-2\right )\,\left (\frac {35\,d}{432}+\frac {29\,e}{216}\right ) \] Input:

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

Output:

log(x - 1)*(d/18 + (5*e)/36) - ((5*d)/36 + (5*e)/18 - x^2*((5*d)/36 + e/9) 
 + (d*x)/6)/(x + 2*x^2 - x^3 - 2) + log(x + 1)*(d/54 + e/108) + log(x + 2) 
*(d/144 - e/72) - log(x - 2)*((35*d)/432 + (29*e)/216)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 322, normalized size of antiderivative = 3.07 \[ \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {24 e x +72 e +35 \,\mathrm {log}\left (x -2\right ) d x +58 \,\mathrm {log}\left (x -2\right ) e x -24 \,\mathrm {log}\left (x -1\right ) d x -60 \,\mathrm {log}\left (x -1\right ) e x -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 -4 \,\mathrm {log}\left (x +1\right ) e x -70 \,\mathrm {log}\left (x -2\right ) d +6 \,\mathrm {log}\left (x +2\right ) d -116 \,\mathrm {log}\left (x -2\right ) e +48 \,\mathrm {log}\left (x -1\right ) d +120 \,\mathrm {log}\left (x -1\right ) e -12 \,\mathrm {log}\left (x +2\right ) e +16 \,\mathrm {log}\left (x +1\right ) d +8 \,\mathrm {log}\left (x +1\right ) e -24 e \,x^{3}-30 d \,x^{3}+102 d x +70 \,\mathrm {log}\left (x -2\right ) d \,x^{2}+116 \,\mathrm {log}\left (x -2\right ) e \,x^{2}-48 \,\mathrm {log}\left (x -1\right ) d \,x^{2}-120 \,\mathrm {log}\left (x -1\right ) e \,x^{2}-6 \,\mathrm {log}\left (x +2\right ) d \,x^{2}+12 \,\mathrm {log}\left (x +2\right ) e \,x^{2}-16 \,\mathrm {log}\left (x +1\right ) d \,x^{2}-8 \,\mathrm {log}\left (x +1\right ) e \,x^{2}-35 \,\mathrm {log}\left (x -2\right ) d \,x^{3}-58 \,\mathrm {log}\left (x -2\right ) e \,x^{3}+24 \,\mathrm {log}\left (x -1\right ) d \,x^{3}+60 \,\mathrm {log}\left (x -1\right ) e \,x^{3}+3 \,\mathrm {log}\left (x +2\right ) d \,x^{3}-6 \,\mathrm {log}\left (x +2\right ) e \,x^{3}+8 \,\mathrm {log}\left (x +1\right ) d \,x^{3}+4 \,\mathrm {log}\left (x +1\right ) e \,x^{3}}{432 x^{3}-864 x^{2}-432 x +864} \] Input:

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

Output:

( - 35*log(x - 2)*d*x**3 + 70*log(x - 2)*d*x**2 + 35*log(x - 2)*d*x - 70*l 
og(x - 2)*d - 58*log(x - 2)*e*x**3 + 116*log(x - 2)*e*x**2 + 58*log(x - 2) 
*e*x - 116*log(x - 2)*e + 24*log(x - 1)*d*x**3 - 48*log(x - 1)*d*x**2 - 24 
*log(x - 1)*d*x + 48*log(x - 1)*d + 60*log(x - 1)*e*x**3 - 120*log(x - 1)* 
e*x**2 - 60*log(x - 1)*e*x + 120*log(x - 1)*e + 3*log(x + 2)*d*x**3 - 6*lo 
g(x + 2)*d*x**2 - 3*log(x + 2)*d*x + 6*log(x + 2)*d - 6*log(x + 2)*e*x**3 
+ 12*log(x + 2)*e*x**2 + 6*log(x + 2)*e*x - 12*log(x + 2)*e + 8*log(x + 1) 
*d*x**3 - 16*log(x + 1)*d*x**2 - 8*log(x + 1)*d*x + 16*log(x + 1)*d + 4*lo 
g(x + 1)*e*x**3 - 8*log(x + 1)*e*x**2 - 4*log(x + 1)*e*x + 8*log(x + 1)*e 
- 30*d*x**3 + 102*d*x - 24*e*x**3 + 24*e*x + 72*e)/(432*(x**3 - 2*x**2 - x 
 + 2))