\(\int \frac {(a+b x^2)^2 (c+d x^2)^2}{e+f x^2} \, dx\) [227]

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

Optimal result

Integrand size = 28, antiderivative size = 181 \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=\frac {(b d e-b c f-a d f) (a f (d e-2 c f)-b e (d e-c f)) x}{f^4}+\frac {\left (a^2 d^2 f^2-2 a b d f (d e-2 c f)+b^2 (d e-c f)^2\right ) x^3}{3 f^3}-\frac {b d (b d e-2 b c f-2 a d f) x^5}{5 f^2}+\frac {b^2 d^2 x^7}{7 f}+\frac {(b e-a f)^2 (d e-c f)^2 \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{9/2}} \] Output:

(-a*d*f-b*c*f+b*d*e)*(a*f*(-2*c*f+d*e)-b*e*(-c*f+d*e))*x/f^4+1/3*(a^2*d^2* 
f^2-2*a*b*d*f*(-2*c*f+d*e)+b^2*(-c*f+d*e)^2)*x^3/f^3-1/5*b*d*(-2*a*d*f-2*b 
*c*f+b*d*e)*x^5/f^2+1/7*b^2*d^2*x^7/f+(-a*f+b*e)^2*(-c*f+d*e)^2*arctan(f^( 
1/2)*x/e^(1/2))/e^(1/2)/f^(9/2)
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.05 \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=-\frac {\left (a^2 d f^2 (d e-2 c f)+b^2 e (d e-c f)^2-2 a b f (d e-c f)^2\right ) x}{f^4}+\frac {\left (a^2 d^2 f^2-2 a b d f (d e-2 c f)+b^2 (d e-c f)^2\right ) x^3}{3 f^3}-\frac {b d (b d e-2 b c f-2 a d f) x^5}{5 f^2}+\frac {b^2 d^2 x^7}{7 f}+\frac {(b e-a f)^2 (d e-c f)^2 \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{9/2}} \] Input:

Integrate[((a + b*x^2)^2*(c + d*x^2)^2)/(e + f*x^2),x]
 

Output:

-(((a^2*d*f^2*(d*e - 2*c*f) + b^2*e*(d*e - c*f)^2 - 2*a*b*f*(d*e - c*f)^2) 
*x)/f^4) + ((a^2*d^2*f^2 - 2*a*b*d*f*(d*e - 2*c*f) + b^2*(d*e - c*f)^2)*x^ 
3)/(3*f^3) - (b*d*(b*d*e - 2*b*c*f - 2*a*d*f)*x^5)/(5*f^2) + (b^2*d^2*x^7) 
/(7*f) + ((b*e - a*f)^2*(d*e - c*f)^2*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(Sqrt[e 
]*f^(9/2))
 

Rubi [A] (verified)

Time = 0.49 (sec) , antiderivative size = 225, normalized size of antiderivative = 1.24, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {420, 290, 403, 25, 403, 25, 299, 218, 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 (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx\)

\(\Big \downarrow \) 420

\(\displaystyle \frac {b \int \left (b x^2+a\right ) \left (d x^2+c\right )^2dx}{f}-\frac {(b e-a f) \int \frac {\left (b x^2+a\right ) \left (d x^2+c\right )^2}{f x^2+e}dx}{f}\)

\(\Big \downarrow \) 290

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

\(\Big \downarrow \) 403

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 403

\(\displaystyle \frac {b \int \left (b d^2 x^6+d (2 b c+a d) x^4+c (b c+2 a d) x^2+a c^2\right )dx}{f}-\frac {(b e-a f) \left (\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {\frac {\int -\frac {c (b e (5 d e-7 c f)-5 a f (d e-3 c f))-\left (5 a d f (3 d e-5 c f)-b \left (15 d^2 e^2-25 c d f e+8 c^2 f^2\right )\right ) x^2}{f x^2+e}dx}{3 f}+\frac {x \left (c+d x^2\right ) (-5 a d f-4 b c f+5 b d e)}{3 f}}{5 f}\right )}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {b \int \left (b d^2 x^6+d (2 b c+a d) x^4+c (b c+2 a d) x^2+a c^2\right )dx}{f}-\frac {(b e-a f) \left (\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {\frac {x \left (c+d x^2\right ) (-5 a d f-4 b c f+5 b d e)}{3 f}-\frac {\int \frac {c (b e (5 d e-7 c f)-5 a f (d e-3 c f))-\left (5 a d f (3 d e-5 c f)-b \left (15 d^2 e^2-25 c d f e+8 c^2 f^2\right )\right ) x^2}{f x^2+e}dx}{3 f}}{5 f}\right )}{f}\)

\(\Big \downarrow \) 299

\(\displaystyle \frac {b \int \left (b d^2 x^6+d (2 b c+a d) x^4+c (b c+2 a d) x^2+a c^2\right )dx}{f}-\frac {(b e-a f) \left (\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {\frac {x \left (c+d x^2\right ) (-5 a d f-4 b c f+5 b d e)}{3 f}-\frac {-\frac {15 (b e-a f) (d e-c f)^2 \int \frac {1}{f x^2+e}dx}{f}-\frac {x \left (5 a d f (3 d e-5 c f)-b \left (8 c^2 f^2-25 c d e f+15 d^2 e^2\right )\right )}{f}}{3 f}}{5 f}\right )}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {b \int \left (b d^2 x^6+d (2 b c+a d) x^4+c (b c+2 a d) x^2+a c^2\right )dx}{f}-\frac {(b e-a f) \left (\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {\frac {x \left (c+d x^2\right ) (-5 a d f-4 b c f+5 b d e)}{3 f}-\frac {-\frac {15 (b e-a f) \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) (d e-c f)^2}{\sqrt {e} f^{3/2}}-\frac {x \left (5 a d f (3 d e-5 c f)-b \left (8 c^2 f^2-25 c d e f+15 d^2 e^2\right )\right )}{f}}{3 f}}{5 f}\right )}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b \left (\frac {1}{5} d x^5 (a d+2 b c)+\frac {1}{3} c x^3 (2 a d+b c)+a c^2 x+\frac {1}{7} b d^2 x^7\right )}{f}-\frac {(b e-a f) \left (\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {\frac {x \left (c+d x^2\right ) (-5 a d f-4 b c f+5 b d e)}{3 f}-\frac {-\frac {15 (b e-a f) \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) (d e-c f)^2}{\sqrt {e} f^{3/2}}-\frac {x \left (5 a d f (3 d e-5 c f)-b \left (8 c^2 f^2-25 c d e f+15 d^2 e^2\right )\right )}{f}}{3 f}}{5 f}\right )}{f}\)

Input:

Int[((a + b*x^2)^2*(c + d*x^2)^2)/(e + f*x^2),x]
 

Output:

(b*(a*c^2*x + (c*(b*c + 2*a*d)*x^3)/3 + (d*(2*b*c + a*d)*x^5)/5 + (b*d^2*x 
^7)/7))/f - ((b*e - a*f)*((b*x*(c + d*x^2)^2)/(5*f) - (((5*b*d*e - 4*b*c*f 
 - 5*a*d*f)*x*(c + d*x^2))/(3*f) - (-(((5*a*d*f*(3*d*e - 5*c*f) - b*(15*d^ 
2*e^2 - 25*c*d*e*f + 8*c^2*f^2))*x)/f) - (15*(b*e - a*f)*(d*e - c*f)^2*Arc 
Tan[(Sqrt[f]*x)/Sqrt[e]])/(Sqrt[e]*f^(3/2)))/(3*f))/(5*f)))/f
 

Defintions of rubi rules used

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

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 290
Int[((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> I 
nt[ExpandIntegrand[(a + b*x^2)^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d 
}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]
 

rule 299
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[d*x 
*((a + b*x^2)^(p + 1)/(b*(2*p + 3))), x] - Simp[(a*d - b*c*(2*p + 3))/(b*(2 
*p + 3))   Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - 
 a*d, 0] && NeQ[2*p + 3, 0]
 

rule 403
Int[((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*( 
x_)^2), x_Symbol] :> Simp[f*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^q/(b*(2*(p + 
 q + 1) + 1))), x] + Simp[1/(b*(2*(p + q + 1) + 1))   Int[(a + b*x^2)^p*(c 
+ d*x^2)^(q - 1)*Simp[c*(b*e - a*f + b*e*2*(p + q + 1)) + (d*(b*e - a*f) + 
f*2*q*(b*c - a*d) + b*d*e*2*(p + q + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, 
 d, e, f, p}, x] && GtQ[q, 0] && NeQ[2*(p + q + 1) + 1, 0]
 

rule 420
Int[(((c_) + (d_.)*(x_)^2)^(q_)*((e_) + (f_.)*(x_)^2)^(r_))/((a_) + (b_.)*( 
x_)^2), x_Symbol] :> Simp[d/b   Int[(c + d*x^2)^(q - 1)*(e + f*x^2)^r, x], 
x] + Simp[(b*c - a*d)/b   Int[(c + d*x^2)^(q - 1)*((e + f*x^2)^r/(a + b*x^2 
)), x], x] /; FreeQ[{a, b, c, d, e, f, r}, x] && GtQ[q, 1]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [A] (verified)

Time = 0.71 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.61

method result size
default \(\frac {\frac {b^{2} d^{2} x^{7} f^{3}}{7}+\frac {\left (\left (a d f +b c f -b d e \right ) b d \,f^{2}+b d f \left (a d \,f^{2}+b c \,f^{2}\right )\right ) x^{5}}{5}+\frac {\left (\left (a d f +b c f -b d e \right ) \left (a d \,f^{2}+b c \,f^{2}\right )+b d f \left (2 a c \,f^{2}-a d e f -b c e f +b d \,e^{2}\right )\right ) x^{3}}{3}+\left (a d f +b c f -b d e \right ) \left (2 a c \,f^{2}-a d e f -b c e f +b d \,e^{2}\right ) x}{f^{4}}+\frac {\left (a^{2} c^{2} f^{4}-2 a^{2} c d e \,f^{3}+a^{2} d^{2} e^{2} f^{2}-2 a b \,c^{2} e \,f^{3}+4 a b c d \,e^{2} f^{2}-2 a b \,d^{2} e^{3} f +b^{2} c^{2} e^{2} f^{2}-2 b^{2} c d \,e^{3} f +b^{2} d^{2} e^{4}\right ) \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{f^{4} \sqrt {e f}}\) \(291\)
risch \(\frac {2 \ln \left (-f x +\sqrt {-e f}\right ) a b c d \,e^{2}}{f^{2} \sqrt {-e f}}+\frac {\ln \left (f x +\sqrt {-e f}\right ) a^{2} c d e}{f \sqrt {-e f}}+\frac {\ln \left (f x +\sqrt {-e f}\right ) a b \,c^{2} e}{f \sqrt {-e f}}+\frac {\ln \left (f x +\sqrt {-e f}\right ) a b \,d^{2} e^{3}}{f^{3} \sqrt {-e f}}+\frac {\ln \left (f x +\sqrt {-e f}\right ) b^{2} c d \,e^{3}}{f^{3} \sqrt {-e f}}-\frac {\ln \left (-f x +\sqrt {-e f}\right ) a^{2} c d e}{f \sqrt {-e f}}-\frac {\ln \left (-f x +\sqrt {-e f}\right ) a b \,c^{2} e}{f \sqrt {-e f}}-\frac {\ln \left (-f x +\sqrt {-e f}\right ) a b \,d^{2} e^{3}}{f^{3} \sqrt {-e f}}-\frac {\ln \left (-f x +\sqrt {-e f}\right ) b^{2} c d \,e^{3}}{f^{3} \sqrt {-e f}}-\frac {2 \ln \left (f x +\sqrt {-e f}\right ) a b c d \,e^{2}}{f^{2} \sqrt {-e f}}+\frac {\ln \left (-f x +\sqrt {-e f}\right ) b^{2} c^{2} e^{2}}{2 f^{2} \sqrt {-e f}}+\frac {\ln \left (-f x +\sqrt {-e f}\right ) b^{2} d^{2} e^{4}}{2 f^{4} \sqrt {-e f}}+\frac {2 x^{5} a b \,d^{2}}{5 f}-\frac {2 x^{3} a b \,d^{2} e}{3 f^{2}}-\frac {2 x^{3} b^{2} c d e}{3 f^{2}}+\frac {2 a b \,d^{2} e^{2} x}{f^{3}}+\frac {2 b^{2} c d \,e^{2} x}{f^{3}}+\frac {4 x^{3} a b c d}{3 f}+\frac {\ln \left (-f x +\sqrt {-e f}\right ) a^{2} d^{2} e^{2}}{2 f^{2} \sqrt {-e f}}-\frac {\ln \left (f x +\sqrt {-e f}\right ) a^{2} d^{2} e^{2}}{2 f^{2} \sqrt {-e f}}-\frac {\ln \left (f x +\sqrt {-e f}\right ) b^{2} c^{2} e^{2}}{2 f^{2} \sqrt {-e f}}-\frac {\ln \left (f x +\sqrt {-e f}\right ) b^{2} d^{2} e^{4}}{2 f^{4} \sqrt {-e f}}-\frac {4 a b c d e x}{f^{2}}+\frac {2 x^{5} b^{2} c d}{5 f}-\frac {x^{5} b^{2} d^{2} e}{5 f^{2}}+\frac {x^{3} b^{2} d^{2} e^{2}}{3 f^{3}}+\frac {2 a^{2} c d x}{f}-\frac {a^{2} d^{2} e x}{f^{2}}+\frac {2 a b \,c^{2} x}{f}-\frac {b^{2} c^{2} e x}{f^{2}}-\frac {b^{2} d^{2} e^{3} x}{f^{4}}+\frac {x^{3} a^{2} d^{2}}{3 f}+\frac {x^{3} b^{2} c^{2}}{3 f}-\frac {\ln \left (f x +\sqrt {-e f}\right ) a^{2} c^{2}}{2 \sqrt {-e f}}+\frac {\ln \left (-f x +\sqrt {-e f}\right ) a^{2} c^{2}}{2 \sqrt {-e f}}+\frac {b^{2} d^{2} x^{7}}{7 f}\) \(775\)

Input:

int((b*x^2+a)^2*(d*x^2+c)^2/(f*x^2+e),x,method=_RETURNVERBOSE)
 

Output:

1/f^4*(1/7*b^2*d^2*x^7*f^3+1/5*((a*d*f+b*c*f-b*d*e)*b*d*f^2+b*d*f*(a*d*f^2 
+b*c*f^2))*x^5+1/3*((a*d*f+b*c*f-b*d*e)*(a*d*f^2+b*c*f^2)+b*d*f*(2*a*c*f^2 
-a*d*e*f-b*c*e*f+b*d*e^2))*x^3+(a*d*f+b*c*f-b*d*e)*(2*a*c*f^2-a*d*e*f-b*c* 
e*f+b*d*e^2)*x)+(a^2*c^2*f^4-2*a^2*c*d*e*f^3+a^2*d^2*e^2*f^2-2*a*b*c^2*e*f 
^3+4*a*b*c*d*e^2*f^2-2*a*b*d^2*e^3*f+b^2*c^2*e^2*f^2-2*b^2*c*d*e^3*f+b^2*d 
^2*e^4)/f^4/(e*f)^(1/2)*arctan(f*x/(e*f)^(1/2))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 652, normalized size of antiderivative = 3.60 \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=\left [\frac {30 \, b^{2} d^{2} e f^{4} x^{7} - 42 \, {\left (b^{2} d^{2} e^{2} f^{3} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e f^{4}\right )} x^{5} + 70 \, {\left (b^{2} d^{2} e^{3} f^{2} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e^{2} f^{3} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} e f^{4}\right )} x^{3} - 105 \, {\left (b^{2} d^{2} e^{4} + a^{2} c^{2} f^{4} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e^{3} f + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} e^{2} f^{2} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} e f^{3}\right )} \sqrt {-e f} \log \left (\frac {f x^{2} - 2 \, \sqrt {-e f} x - e}{f x^{2} + e}\right ) - 210 \, {\left (b^{2} d^{2} e^{4} f - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e^{3} f^{2} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} e^{2} f^{3} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} e f^{4}\right )} x}{210 \, e f^{5}}, \frac {15 \, b^{2} d^{2} e f^{4} x^{7} - 21 \, {\left (b^{2} d^{2} e^{2} f^{3} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e f^{4}\right )} x^{5} + 35 \, {\left (b^{2} d^{2} e^{3} f^{2} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e^{2} f^{3} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} e f^{4}\right )} x^{3} + 105 \, {\left (b^{2} d^{2} e^{4} + a^{2} c^{2} f^{4} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e^{3} f + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} e^{2} f^{2} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} e f^{3}\right )} \sqrt {e f} \arctan \left (\frac {\sqrt {e f} x}{e}\right ) - 105 \, {\left (b^{2} d^{2} e^{4} f - 2 \, {\left (b^{2} c d + a b d^{2}\right )} e^{3} f^{2} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} e^{2} f^{3} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} e f^{4}\right )} x}{105 \, e f^{5}}\right ] \] Input:

integrate((b*x^2+a)^2*(d*x^2+c)^2/(f*x^2+e),x, algorithm="fricas")
 

Output:

[1/210*(30*b^2*d^2*e*f^4*x^7 - 42*(b^2*d^2*e^2*f^3 - 2*(b^2*c*d + a*b*d^2) 
*e*f^4)*x^5 + 70*(b^2*d^2*e^3*f^2 - 2*(b^2*c*d + a*b*d^2)*e^2*f^3 + (b^2*c 
^2 + 4*a*b*c*d + a^2*d^2)*e*f^4)*x^3 - 105*(b^2*d^2*e^4 + a^2*c^2*f^4 - 2* 
(b^2*c*d + a*b*d^2)*e^3*f + (b^2*c^2 + 4*a*b*c*d + a^2*d^2)*e^2*f^2 - 2*(a 
*b*c^2 + a^2*c*d)*e*f^3)*sqrt(-e*f)*log((f*x^2 - 2*sqrt(-e*f)*x - e)/(f*x^ 
2 + e)) - 210*(b^2*d^2*e^4*f - 2*(b^2*c*d + a*b*d^2)*e^3*f^2 + (b^2*c^2 + 
4*a*b*c*d + a^2*d^2)*e^2*f^3 - 2*(a*b*c^2 + a^2*c*d)*e*f^4)*x)/(e*f^5), 1/ 
105*(15*b^2*d^2*e*f^4*x^7 - 21*(b^2*d^2*e^2*f^3 - 2*(b^2*c*d + a*b*d^2)*e* 
f^4)*x^5 + 35*(b^2*d^2*e^3*f^2 - 2*(b^2*c*d + a*b*d^2)*e^2*f^3 + (b^2*c^2 
+ 4*a*b*c*d + a^2*d^2)*e*f^4)*x^3 + 105*(b^2*d^2*e^4 + a^2*c^2*f^4 - 2*(b^ 
2*c*d + a*b*d^2)*e^3*f + (b^2*c^2 + 4*a*b*c*d + a^2*d^2)*e^2*f^2 - 2*(a*b* 
c^2 + a^2*c*d)*e*f^3)*sqrt(e*f)*arctan(sqrt(e*f)*x/e) - 105*(b^2*d^2*e^4*f 
 - 2*(b^2*c*d + a*b*d^2)*e^3*f^2 + (b^2*c^2 + 4*a*b*c*d + a^2*d^2)*e^2*f^3 
 - 2*(a*b*c^2 + a^2*c*d)*e*f^4)*x)/(e*f^5)]
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 609 vs. \(2 (177) = 354\).

Time = 1.00 (sec) , antiderivative size = 609, normalized size of antiderivative = 3.36 \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=\frac {b^{2} d^{2} x^{7}}{7 f} + x^{5} \cdot \left (\frac {2 a b d^{2}}{5 f} + \frac {2 b^{2} c d}{5 f} - \frac {b^{2} d^{2} e}{5 f^{2}}\right ) + x^{3} \left (\frac {a^{2} d^{2}}{3 f} + \frac {4 a b c d}{3 f} - \frac {2 a b d^{2} e}{3 f^{2}} + \frac {b^{2} c^{2}}{3 f} - \frac {2 b^{2} c d e}{3 f^{2}} + \frac {b^{2} d^{2} e^{2}}{3 f^{3}}\right ) + x \left (\frac {2 a^{2} c d}{f} - \frac {a^{2} d^{2} e}{f^{2}} + \frac {2 a b c^{2}}{f} - \frac {4 a b c d e}{f^{2}} + \frac {2 a b d^{2} e^{2}}{f^{3}} - \frac {b^{2} c^{2} e}{f^{2}} + \frac {2 b^{2} c d e^{2}}{f^{3}} - \frac {b^{2} d^{2} e^{3}}{f^{4}}\right ) - \frac {\sqrt {- \frac {1}{e f^{9}}} \left (a f - b e\right )^{2} \left (c f - d e\right )^{2} \log {\left (- \frac {e f^{4} \sqrt {- \frac {1}{e f^{9}}} \left (a f - b e\right )^{2} \left (c f - d e\right )^{2}}{a^{2} c^{2} f^{4} - 2 a^{2} c d e f^{3} + a^{2} d^{2} e^{2} f^{2} - 2 a b c^{2} e f^{3} + 4 a b c d e^{2} f^{2} - 2 a b d^{2} e^{3} f + b^{2} c^{2} e^{2} f^{2} - 2 b^{2} c d e^{3} f + b^{2} d^{2} e^{4}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{e f^{9}}} \left (a f - b e\right )^{2} \left (c f - d e\right )^{2} \log {\left (\frac {e f^{4} \sqrt {- \frac {1}{e f^{9}}} \left (a f - b e\right )^{2} \left (c f - d e\right )^{2}}{a^{2} c^{2} f^{4} - 2 a^{2} c d e f^{3} + a^{2} d^{2} e^{2} f^{2} - 2 a b c^{2} e f^{3} + 4 a b c d e^{2} f^{2} - 2 a b d^{2} e^{3} f + b^{2} c^{2} e^{2} f^{2} - 2 b^{2} c d e^{3} f + b^{2} d^{2} e^{4}} + x \right )}}{2} \] Input:

integrate((b*x**2+a)**2*(d*x**2+c)**2/(f*x**2+e),x)
 

Output:

b**2*d**2*x**7/(7*f) + x**5*(2*a*b*d**2/(5*f) + 2*b**2*c*d/(5*f) - b**2*d* 
*2*e/(5*f**2)) + x**3*(a**2*d**2/(3*f) + 4*a*b*c*d/(3*f) - 2*a*b*d**2*e/(3 
*f**2) + b**2*c**2/(3*f) - 2*b**2*c*d*e/(3*f**2) + b**2*d**2*e**2/(3*f**3) 
) + x*(2*a**2*c*d/f - a**2*d**2*e/f**2 + 2*a*b*c**2/f - 4*a*b*c*d*e/f**2 + 
 2*a*b*d**2*e**2/f**3 - b**2*c**2*e/f**2 + 2*b**2*c*d*e**2/f**3 - b**2*d** 
2*e**3/f**4) - sqrt(-1/(e*f**9))*(a*f - b*e)**2*(c*f - d*e)**2*log(-e*f**4 
*sqrt(-1/(e*f**9))*(a*f - b*e)**2*(c*f - d*e)**2/(a**2*c**2*f**4 - 2*a**2* 
c*d*e*f**3 + a**2*d**2*e**2*f**2 - 2*a*b*c**2*e*f**3 + 4*a*b*c*d*e**2*f**2 
 - 2*a*b*d**2*e**3*f + b**2*c**2*e**2*f**2 - 2*b**2*c*d*e**3*f + b**2*d**2 
*e**4) + x)/2 + sqrt(-1/(e*f**9))*(a*f - b*e)**2*(c*f - d*e)**2*log(e*f**4 
*sqrt(-1/(e*f**9))*(a*f - b*e)**2*(c*f - d*e)**2/(a**2*c**2*f**4 - 2*a**2* 
c*d*e*f**3 + a**2*d**2*e**2*f**2 - 2*a*b*c**2*e*f**3 + 4*a*b*c*d*e**2*f**2 
 - 2*a*b*d**2*e**3*f + b**2*c**2*e**2*f**2 - 2*b**2*c*d*e**3*f + b**2*d**2 
*e**4) + x)/2
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=\text {Exception raised: ValueError} \] Input:

integrate((b*x^2+a)^2*(d*x^2+c)^2/(f*x^2+e),x, algorithm="maxima")
 

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(e>0)', see `assume?` for more de 
tails)Is e
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 370 vs. \(2 (168) = 336\).

Time = 0.12 (sec) , antiderivative size = 370, normalized size of antiderivative = 2.04 \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=\frac {{\left (b^{2} d^{2} e^{4} - 2 \, b^{2} c d e^{3} f - 2 \, a b d^{2} e^{3} f + b^{2} c^{2} e^{2} f^{2} + 4 \, a b c d e^{2} f^{2} + a^{2} d^{2} e^{2} f^{2} - 2 \, a b c^{2} e f^{3} - 2 \, a^{2} c d e f^{3} + a^{2} c^{2} f^{4}\right )} \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{\sqrt {e f} f^{4}} + \frac {15 \, b^{2} d^{2} f^{6} x^{7} - 21 \, b^{2} d^{2} e f^{5} x^{5} + 42 \, b^{2} c d f^{6} x^{5} + 42 \, a b d^{2} f^{6} x^{5} + 35 \, b^{2} d^{2} e^{2} f^{4} x^{3} - 70 \, b^{2} c d e f^{5} x^{3} - 70 \, a b d^{2} e f^{5} x^{3} + 35 \, b^{2} c^{2} f^{6} x^{3} + 140 \, a b c d f^{6} x^{3} + 35 \, a^{2} d^{2} f^{6} x^{3} - 105 \, b^{2} d^{2} e^{3} f^{3} x + 210 \, b^{2} c d e^{2} f^{4} x + 210 \, a b d^{2} e^{2} f^{4} x - 105 \, b^{2} c^{2} e f^{5} x - 420 \, a b c d e f^{5} x - 105 \, a^{2} d^{2} e f^{5} x + 210 \, a b c^{2} f^{6} x + 210 \, a^{2} c d f^{6} x}{105 \, f^{7}} \] Input:

integrate((b*x^2+a)^2*(d*x^2+c)^2/(f*x^2+e),x, algorithm="giac")
 

Output:

(b^2*d^2*e^4 - 2*b^2*c*d*e^3*f - 2*a*b*d^2*e^3*f + b^2*c^2*e^2*f^2 + 4*a*b 
*c*d*e^2*f^2 + a^2*d^2*e^2*f^2 - 2*a*b*c^2*e*f^3 - 2*a^2*c*d*e*f^3 + a^2*c 
^2*f^4)*arctan(f*x/sqrt(e*f))/(sqrt(e*f)*f^4) + 1/105*(15*b^2*d^2*f^6*x^7 
- 21*b^2*d^2*e*f^5*x^5 + 42*b^2*c*d*f^6*x^5 + 42*a*b*d^2*f^6*x^5 + 35*b^2* 
d^2*e^2*f^4*x^3 - 70*b^2*c*d*e*f^5*x^3 - 70*a*b*d^2*e*f^5*x^3 + 35*b^2*c^2 
*f^6*x^3 + 140*a*b*c*d*f^6*x^3 + 35*a^2*d^2*f^6*x^3 - 105*b^2*d^2*e^3*f^3* 
x + 210*b^2*c*d*e^2*f^4*x + 210*a*b*d^2*e^2*f^4*x - 105*b^2*c^2*e*f^5*x - 
420*a*b*c*d*e*f^5*x - 105*a^2*d^2*e*f^5*x + 210*a*b*c^2*f^6*x + 210*a^2*c* 
d*f^6*x)/f^7
 

Mupad [B] (verification not implemented)

Time = 2.03 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.94 \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=x^3\,\left (\frac {a^2\,d^2+4\,a\,b\,c\,d+b^2\,c^2}{3\,f}+\frac {e\,\left (\frac {b^2\,d^2\,e}{f^2}-\frac {2\,b\,d\,\left (a\,d+b\,c\right )}{f}\right )}{3\,f}\right )-x^5\,\left (\frac {b^2\,d^2\,e}{5\,f^2}-\frac {2\,b\,d\,\left (a\,d+b\,c\right )}{5\,f}\right )-x\,\left (\frac {e\,\left (\frac {a^2\,d^2+4\,a\,b\,c\,d+b^2\,c^2}{f}+\frac {e\,\left (\frac {b^2\,d^2\,e}{f^2}-\frac {2\,b\,d\,\left (a\,d+b\,c\right )}{f}\right )}{f}\right )}{f}-\frac {2\,a\,c\,\left (a\,d+b\,c\right )}{f}\right )+\frac {b^2\,d^2\,x^7}{7\,f}+\frac {\mathrm {atan}\left (\frac {\sqrt {f}\,x\,{\left (a\,f-b\,e\right )}^2\,{\left (c\,f-d\,e\right )}^2}{\sqrt {e}\,\left (a^2\,c^2\,f^4-2\,a^2\,c\,d\,e\,f^3+a^2\,d^2\,e^2\,f^2-2\,a\,b\,c^2\,e\,f^3+4\,a\,b\,c\,d\,e^2\,f^2-2\,a\,b\,d^2\,e^3\,f+b^2\,c^2\,e^2\,f^2-2\,b^2\,c\,d\,e^3\,f+b^2\,d^2\,e^4\right )}\right )\,{\left (a\,f-b\,e\right )}^2\,{\left (c\,f-d\,e\right )}^2}{\sqrt {e}\,f^{9/2}} \] Input:

int(((a + b*x^2)^2*(c + d*x^2)^2)/(e + f*x^2),x)
 

Output:

x^3*((a^2*d^2 + b^2*c^2 + 4*a*b*c*d)/(3*f) + (e*((b^2*d^2*e)/f^2 - (2*b*d* 
(a*d + b*c))/f))/(3*f)) - x^5*((b^2*d^2*e)/(5*f^2) - (2*b*d*(a*d + b*c))/( 
5*f)) - x*((e*((a^2*d^2 + b^2*c^2 + 4*a*b*c*d)/f + (e*((b^2*d^2*e)/f^2 - ( 
2*b*d*(a*d + b*c))/f))/f))/f - (2*a*c*(a*d + b*c))/f) + (b^2*d^2*x^7)/(7*f 
) + (atan((f^(1/2)*x*(a*f - b*e)^2*(c*f - d*e)^2)/(e^(1/2)*(a^2*c^2*f^4 + 
b^2*d^2*e^4 + a^2*d^2*e^2*f^2 + b^2*c^2*e^2*f^2 - 2*a*b*c^2*e*f^3 - 2*a*b* 
d^2*e^3*f - 2*a^2*c*d*e*f^3 - 2*b^2*c*d*e^3*f + 4*a*b*c*d*e^2*f^2)))*(a*f 
- b*e)^2*(c*f - d*e)^2)/(e^(1/2)*f^(9/2))
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 519, normalized size of antiderivative = 2.87 \[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^2}{e+f x^2} \, dx=\frac {-105 a^{2} d^{2} e^{2} f^{3} x +35 a^{2} d^{2} e \,f^{4} x^{3}-105 b^{2} c^{2} e^{2} f^{3} x +35 b^{2} c^{2} e \,f^{4} x^{3}-105 b^{2} d^{2} e^{4} f x +35 b^{2} d^{2} e^{3} f^{2} x^{3}-21 b^{2} d^{2} e^{2} f^{3} x^{5}+15 b^{2} d^{2} e \,f^{4} x^{7}+420 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a b c d \,e^{2} f^{2}-210 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a^{2} c d e \,f^{3}-210 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a b \,c^{2} e \,f^{3}-210 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a b \,d^{2} e^{3} f -210 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) b^{2} c d \,e^{3} f +105 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a^{2} d^{2} e^{2} f^{2}+105 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) b^{2} c^{2} e^{2} f^{2}-420 a b c d \,e^{2} f^{3} x +140 a b c d e \,f^{4} x^{3}+105 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) a^{2} c^{2} f^{4}+105 \sqrt {f}\, \sqrt {e}\, \mathit {atan} \left (\frac {f x}{\sqrt {f}\, \sqrt {e}}\right ) b^{2} d^{2} e^{4}+210 a^{2} c d e \,f^{4} x +210 a b \,c^{2} e \,f^{4} x +210 a b \,d^{2} e^{3} f^{2} x -70 a b \,d^{2} e^{2} f^{3} x^{3}+42 a b \,d^{2} e \,f^{4} x^{5}+210 b^{2} c d \,e^{3} f^{2} x -70 b^{2} c d \,e^{2} f^{3} x^{3}+42 b^{2} c d e \,f^{4} x^{5}}{105 e \,f^{5}} \] Input:

int((b*x^2+a)^2*(d*x^2+c)^2/(f*x^2+e),x)
 

Output:

(105*sqrt(f)*sqrt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*a**2*c**2*f**4 - 210*sq 
rt(f)*sqrt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*a**2*c*d*e*f**3 + 105*sqrt(f)* 
sqrt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*a**2*d**2*e**2*f**2 - 210*sqrt(f)*sq 
rt(e)*atan((f*x)/(sqrt(f)*sqrt(e)))*a*b*c**2*e*f**3 + 420*sqrt(f)*sqrt(e)* 
atan((f*x)/(sqrt(f)*sqrt(e)))*a*b*c*d*e**2*f**2 - 210*sqrt(f)*sqrt(e)*atan 
((f*x)/(sqrt(f)*sqrt(e)))*a*b*d**2*e**3*f + 105*sqrt(f)*sqrt(e)*atan((f*x) 
/(sqrt(f)*sqrt(e)))*b**2*c**2*e**2*f**2 - 210*sqrt(f)*sqrt(e)*atan((f*x)/( 
sqrt(f)*sqrt(e)))*b**2*c*d*e**3*f + 105*sqrt(f)*sqrt(e)*atan((f*x)/(sqrt(f 
)*sqrt(e)))*b**2*d**2*e**4 + 210*a**2*c*d*e*f**4*x - 105*a**2*d**2*e**2*f* 
*3*x + 35*a**2*d**2*e*f**4*x**3 + 210*a*b*c**2*e*f**4*x - 420*a*b*c*d*e**2 
*f**3*x + 140*a*b*c*d*e*f**4*x**3 + 210*a*b*d**2*e**3*f**2*x - 70*a*b*d**2 
*e**2*f**3*x**3 + 42*a*b*d**2*e*f**4*x**5 - 105*b**2*c**2*e**2*f**3*x + 35 
*b**2*c**2*e*f**4*x**3 + 210*b**2*c*d*e**3*f**2*x - 70*b**2*c*d*e**2*f**3* 
x**3 + 42*b**2*c*d*e*f**4*x**5 - 105*b**2*d**2*e**4*f*x + 35*b**2*d**2*e** 
3*f**2*x**3 - 21*b**2*d**2*e**2*f**3*x**5 + 15*b**2*d**2*e*f**4*x**7)/(105 
*e*f**5)