\(\int \frac {A+B x^2+C x^4}{(a+b x^2) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx\) [19]

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

Optimal result

Integrand size = 45, antiderivative size = 323 \[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=\frac {\sqrt {c} C \sqrt {1-\frac {d x^2}{c}} \sqrt {e+f x^2} E\left (\arcsin \left (\frac {\sqrt {d} x}{\sqrt {c}}\right )|-\frac {c f}{d e}\right )}{b \sqrt {d} f \sqrt {c-d x^2} \sqrt {1+\frac {f x^2}{e}}}-\frac {\sqrt {c} (b C e-b B f+a C f) \sqrt {1-\frac {d x^2}{c}} \sqrt {1+\frac {f x^2}{e}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {d} x}{\sqrt {c}}\right ),-\frac {c f}{d e}\right )}{b^2 \sqrt {d} f \sqrt {c-d x^2} \sqrt {e+f x^2}}+\frac {\sqrt {c} \left (A b^2-a (b B-a C)\right ) \sqrt {1-\frac {d x^2}{c}} \sqrt {1+\frac {f x^2}{e}} \operatorname {EllipticPi}\left (-\frac {b c}{a d},\arcsin \left (\frac {\sqrt {d} x}{\sqrt {c}}\right ),-\frac {c f}{d e}\right )}{a b^2 \sqrt {d} \sqrt {c-d x^2} \sqrt {e+f x^2}} \] Output:

c^(1/2)*C*(1-d*x^2/c)^(1/2)*(f*x^2+e)^(1/2)*EllipticE(d^(1/2)*x/c^(1/2),(- 
c*f/d/e)^(1/2))/b/d^(1/2)/f/(-d*x^2+c)^(1/2)/(1+f*x^2/e)^(1/2)-c^(1/2)*(-B 
*b*f+C*a*f+C*b*e)*(1-d*x^2/c)^(1/2)*(1+f*x^2/e)^(1/2)*EllipticF(d^(1/2)*x/ 
c^(1/2),(-c*f/d/e)^(1/2))/b^2/d^(1/2)/f/(-d*x^2+c)^(1/2)/(f*x^2+e)^(1/2)+c 
^(1/2)*(A*b^2-a*(B*b-C*a))*(1-d*x^2/c)^(1/2)*(1+f*x^2/e)^(1/2)*EllipticPi( 
d^(1/2)*x/c^(1/2),-b*c/a/d,(-c*f/d/e)^(1/2))/a/b^2/d^(1/2)/(-d*x^2+c)^(1/2 
)/(f*x^2+e)^(1/2)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 7.29 (sec) , antiderivative size = 210, normalized size of antiderivative = 0.65 \[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=-\frac {i \sqrt {1-\frac {d x^2}{c}} \sqrt {1+\frac {f x^2}{e}} \left (a b C e E\left (i \text {arcsinh}\left (\sqrt {-\frac {d}{c}} x\right )|-\frac {c f}{d e}\right )-a (b C e-b B f+a C f) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {d}{c}} x\right ),-\frac {c f}{d e}\right )+\left (A b^2+a (-b B+a C)\right ) f \operatorname {EllipticPi}\left (-\frac {b c}{a d},i \text {arcsinh}\left (\sqrt {-\frac {d}{c}} x\right ),-\frac {c f}{d e}\right )\right )}{a b^2 \sqrt {-\frac {d}{c}} f \sqrt {c-d x^2} \sqrt {e+f x^2}} \] Input:

Integrate[(A + B*x^2 + C*x^4)/((a + b*x^2)*Sqrt[c - d*x^2]*Sqrt[e + f*x^2] 
),x]
 

Output:

((-I)*Sqrt[1 - (d*x^2)/c]*Sqrt[1 + (f*x^2)/e]*(a*b*C*e*EllipticE[I*ArcSinh 
[Sqrt[-(d/c)]*x], -((c*f)/(d*e))] - a*(b*C*e - b*B*f + a*C*f)*EllipticF[I* 
ArcSinh[Sqrt[-(d/c)]*x], -((c*f)/(d*e))] + (A*b^2 + a*(-(b*B) + a*C))*f*El 
lipticPi[-((b*c)/(a*d)), I*ArcSinh[Sqrt[-(d/c)]*x], -((c*f)/(d*e))]))/(a*b 
^2*Sqrt[-(d/c)]*f*Sqrt[c - d*x^2]*Sqrt[e + f*x^2])
 

Rubi [A] (verified)

Time = 1.25 (sec) , antiderivative size = 409, normalized size of antiderivative = 1.27, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.044, Rules used = {7276, 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 {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx\)

\(\Big \downarrow \) 7276

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\sqrt {c} \sqrt {1-\frac {d x^2}{c}} \sqrt {\frac {f x^2}{e}+1} \left (A b^2-a (b B-a C)\right ) \operatorname {EllipticPi}\left (-\frac {b c}{a d},\arcsin \left (\frac {\sqrt {d} x}{\sqrt {c}}\right ),-\frac {c f}{d e}\right )}{a b^2 \sqrt {d} \sqrt {c-d x^2} \sqrt {e+f x^2}}+\frac {\sqrt {c} \sqrt {1-\frac {d x^2}{c}} \sqrt {\frac {f x^2}{e}+1} (b B-a C) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {d} x}{\sqrt {c}}\right ),-\frac {c f}{d e}\right )}{b^2 \sqrt {d} \sqrt {c-d x^2} \sqrt {e+f x^2}}-\frac {\sqrt {c} C e \sqrt {1-\frac {d x^2}{c}} \sqrt {\frac {f x^2}{e}+1} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {d} x}{\sqrt {c}}\right ),-\frac {c f}{d e}\right )}{b \sqrt {d} f \sqrt {c-d x^2} \sqrt {e+f x^2}}+\frac {\sqrt {c} C \sqrt {1-\frac {d x^2}{c}} \sqrt {e+f x^2} E\left (\arcsin \left (\frac {\sqrt {d} x}{\sqrt {c}}\right )|-\frac {c f}{d e}\right )}{b \sqrt {d} f \sqrt {c-d x^2} \sqrt {\frac {f x^2}{e}+1}}\)

Input:

Int[(A + B*x^2 + C*x^4)/((a + b*x^2)*Sqrt[c - d*x^2]*Sqrt[e + f*x^2]),x]
 

Output:

(Sqrt[c]*C*Sqrt[1 - (d*x^2)/c]*Sqrt[e + f*x^2]*EllipticE[ArcSin[(Sqrt[d]*x 
)/Sqrt[c]], -((c*f)/(d*e))])/(b*Sqrt[d]*f*Sqrt[c - d*x^2]*Sqrt[1 + (f*x^2) 
/e]) + (Sqrt[c]*(b*B - a*C)*Sqrt[1 - (d*x^2)/c]*Sqrt[1 + (f*x^2)/e]*Ellipt 
icF[ArcSin[(Sqrt[d]*x)/Sqrt[c]], -((c*f)/(d*e))])/(b^2*Sqrt[d]*Sqrt[c - d* 
x^2]*Sqrt[e + f*x^2]) - (Sqrt[c]*C*e*Sqrt[1 - (d*x^2)/c]*Sqrt[1 + (f*x^2)/ 
e]*EllipticF[ArcSin[(Sqrt[d]*x)/Sqrt[c]], -((c*f)/(d*e))])/(b*Sqrt[d]*f*Sq 
rt[c - d*x^2]*Sqrt[e + f*x^2]) + (Sqrt[c]*(A*b^2 - a*(b*B - a*C))*Sqrt[1 - 
 (d*x^2)/c]*Sqrt[1 + (f*x^2)/e]*EllipticPi[-((b*c)/(a*d)), ArcSin[(Sqrt[d] 
*x)/Sqrt[c]], -((c*f)/(d*e))])/(a*b^2*Sqrt[d]*Sqrt[c - d*x^2]*Sqrt[e + f*x 
^2])
 

Defintions of rubi rules used

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

rule 7276
Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionE 
xpand[u/(a + b*x^n), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ 
[n, 0]
 
Maple [A] (verified)

Time = 5.76 (sec) , antiderivative size = 328, normalized size of antiderivative = 1.02

method result size
default \(\frac {\left (A \operatorname {EllipticPi}\left (x \sqrt {\frac {d}{c}}, -\frac {b c}{a d}, \frac {\sqrt {-\frac {f}{e}}}{\sqrt {\frac {d}{c}}}\right ) b^{2} f +B \operatorname {EllipticF}\left (x \sqrt {\frac {d}{c}}, \sqrt {-\frac {c f}{d e}}\right ) a b f -B \operatorname {EllipticPi}\left (x \sqrt {\frac {d}{c}}, -\frac {b c}{a d}, \frac {\sqrt {-\frac {f}{e}}}{\sqrt {\frac {d}{c}}}\right ) a b f -C \operatorname {EllipticF}\left (x \sqrt {\frac {d}{c}}, \sqrt {-\frac {c f}{d e}}\right ) a^{2} f -C \operatorname {EllipticF}\left (x \sqrt {\frac {d}{c}}, \sqrt {-\frac {c f}{d e}}\right ) a b e +C \operatorname {EllipticE}\left (x \sqrt {\frac {d}{c}}, \sqrt {-\frac {c f}{d e}}\right ) a b e +C \operatorname {EllipticPi}\left (x \sqrt {\frac {d}{c}}, -\frac {b c}{a d}, \frac {\sqrt {-\frac {f}{e}}}{\sqrt {\frac {d}{c}}}\right ) a^{2} f \right ) \sqrt {\frac {f \,x^{2}+e}{e}}\, \sqrt {\frac {-x^{2} d +c}{c}}\, \sqrt {-x^{2} d +c}\, \sqrt {f \,x^{2}+e}}{f a \sqrt {\frac {d}{c}}\, b^{2} \left (-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e \right )}\) \(328\)
elliptic \(\frac {\sqrt {\left (-x^{2} d +c \right ) \left (f \,x^{2}+e \right )}\, \left (\frac {B \sqrt {1-\frac {d \,x^{2}}{c}}\, \sqrt {1+\frac {f \,x^{2}}{e}}\, \operatorname {EllipticF}\left (x \sqrt {\frac {d}{c}}, \sqrt {-1-\frac {c f -d e}{e d}}\right )}{b \sqrt {\frac {d}{c}}\, \sqrt {-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e}}-\frac {\sqrt {1-\frac {d \,x^{2}}{c}}\, \sqrt {1+\frac {f \,x^{2}}{e}}\, \operatorname {EllipticF}\left (x \sqrt {\frac {d}{c}}, \sqrt {-1-\frac {c f -d e}{e d}}\right ) C a}{b^{2} \sqrt {\frac {d}{c}}\, \sqrt {-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e}}-\frac {C e \sqrt {1-\frac {d \,x^{2}}{c}}\, \sqrt {1+\frac {f \,x^{2}}{e}}\, \operatorname {EllipticF}\left (x \sqrt {\frac {d}{c}}, \sqrt {-1-\frac {c f -d e}{e d}}\right )}{b \sqrt {\frac {d}{c}}\, \sqrt {-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e}\, f}+\frac {C e \sqrt {1-\frac {d \,x^{2}}{c}}\, \sqrt {1+\frac {f \,x^{2}}{e}}\, \operatorname {EllipticE}\left (x \sqrt {\frac {d}{c}}, \sqrt {-1-\frac {c f -d e}{e d}}\right )}{b \sqrt {\frac {d}{c}}\, \sqrt {-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e}\, f}+\frac {\sqrt {1-\frac {d \,x^{2}}{c}}\, \sqrt {1+\frac {f \,x^{2}}{e}}\, \operatorname {EllipticPi}\left (x \sqrt {\frac {d}{c}}, -\frac {b c}{a d}, \frac {\sqrt {-\frac {f}{e}}}{\sqrt {\frac {d}{c}}}\right ) A}{a \sqrt {\frac {d}{c}}\, \sqrt {-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e}}-\frac {\sqrt {1-\frac {d \,x^{2}}{c}}\, \sqrt {1+\frac {f \,x^{2}}{e}}\, \operatorname {EllipticPi}\left (x \sqrt {\frac {d}{c}}, -\frac {b c}{a d}, \frac {\sqrt {-\frac {f}{e}}}{\sqrt {\frac {d}{c}}}\right ) B}{b \sqrt {\frac {d}{c}}\, \sqrt {-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e}}+\frac {a \sqrt {1-\frac {d \,x^{2}}{c}}\, \sqrt {1+\frac {f \,x^{2}}{e}}\, \operatorname {EllipticPi}\left (x \sqrt {\frac {d}{c}}, -\frac {b c}{a d}, \frac {\sqrt {-\frac {f}{e}}}{\sqrt {\frac {d}{c}}}\right ) C}{b^{2} \sqrt {\frac {d}{c}}\, \sqrt {-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e}}\right )}{\sqrt {-x^{2} d +c}\, \sqrt {f \,x^{2}+e}}\) \(722\)

Input:

int((C*x^4+B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(f*x^2+e)^(1/2),x,method=_R 
ETURNVERBOSE)
 

Output:

(A*EllipticPi(x*(1/c*d)^(1/2),-b*c/a/d,(-f/e)^(1/2)/(1/c*d)^(1/2))*b^2*f+B 
*EllipticF(x*(1/c*d)^(1/2),(-c*f/d/e)^(1/2))*a*b*f-B*EllipticPi(x*(1/c*d)^ 
(1/2),-b*c/a/d,(-f/e)^(1/2)/(1/c*d)^(1/2))*a*b*f-C*EllipticF(x*(1/c*d)^(1/ 
2),(-c*f/d/e)^(1/2))*a^2*f-C*EllipticF(x*(1/c*d)^(1/2),(-c*f/d/e)^(1/2))*a 
*b*e+C*EllipticE(x*(1/c*d)^(1/2),(-c*f/d/e)^(1/2))*a*b*e+C*EllipticPi(x*(1 
/c*d)^(1/2),-b*c/a/d,(-f/e)^(1/2)/(1/c*d)^(1/2))*a^2*f)*((f*x^2+e)/e)^(1/2 
)*((-d*x^2+c)/c)^(1/2)*(-d*x^2+c)^(1/2)*(f*x^2+e)^(1/2)/f/a/(1/c*d)^(1/2)/ 
b^2/(-d*f*x^4+c*f*x^2-d*e*x^2+c*e)
 

Fricas [F(-1)]

Timed out. \[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=\text {Timed out} \] Input:

integrate((C*x^4+B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(f*x^2+e)^(1/2),x, al 
gorithm="fricas")
 

Output:

Timed out
 

Sympy [F]

\[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=\int \frac {A + B x^{2} + C x^{4}}{\left (a + b x^{2}\right ) \sqrt {c - d x^{2}} \sqrt {e + f x^{2}}}\, dx \] Input:

integrate((C*x**4+B*x**2+A)/(b*x**2+a)/(-d*x**2+c)**(1/2)/(f*x**2+e)**(1/2 
),x)
 

Output:

Integral((A + B*x**2 + C*x**4)/((a + b*x**2)*sqrt(c - d*x**2)*sqrt(e + f*x 
**2)), x)
 

Maxima [F]

\[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=\int { \frac {C x^{4} + B x^{2} + A}{{\left (b x^{2} + a\right )} \sqrt {-d x^{2} + c} \sqrt {f x^{2} + e}} \,d x } \] Input:

integrate((C*x^4+B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(f*x^2+e)^(1/2),x, al 
gorithm="maxima")
 

Output:

integrate((C*x^4 + B*x^2 + A)/((b*x^2 + a)*sqrt(-d*x^2 + c)*sqrt(f*x^2 + e 
)), x)
 

Giac [F]

\[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=\int { \frac {C x^{4} + B x^{2} + A}{{\left (b x^{2} + a\right )} \sqrt {-d x^{2} + c} \sqrt {f x^{2} + e}} \,d x } \] Input:

integrate((C*x^4+B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(f*x^2+e)^(1/2),x, al 
gorithm="giac")
 

Output:

integrate((C*x^4 + B*x^2 + A)/((b*x^2 + a)*sqrt(-d*x^2 + c)*sqrt(f*x^2 + e 
)), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=\int \frac {C\,x^4+B\,x^2+A}{\left (b\,x^2+a\right )\,\sqrt {c-d\,x^2}\,\sqrt {f\,x^2+e}} \,d x \] Input:

int((A + B*x^2 + C*x^4)/((a + b*x^2)*(c - d*x^2)^(1/2)*(e + f*x^2)^(1/2)), 
x)
 

Output:

int((A + B*x^2 + C*x^4)/((a + b*x^2)*(c - d*x^2)^(1/2)*(e + f*x^2)^(1/2)), 
 x)
 

Reduce [F]

\[ \int \frac {A+B x^2+C x^4}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e+f x^2}} \, dx=\left (\int \frac {\sqrt {f \,x^{2}+e}\, \sqrt {-d \,x^{2}+c}\, x^{4}}{-b d f \,x^{6}-a d f \,x^{4}+b c f \,x^{4}-b d e \,x^{4}+a c f \,x^{2}-a d e \,x^{2}+b c e \,x^{2}+a c e}d x \right ) c +\left (\int \frac {\sqrt {f \,x^{2}+e}\, \sqrt {-d \,x^{2}+c}\, x^{2}}{-b d f \,x^{6}-a d f \,x^{4}+b c f \,x^{4}-b d e \,x^{4}+a c f \,x^{2}-a d e \,x^{2}+b c e \,x^{2}+a c e}d x \right ) b +\left (\int \frac {\sqrt {f \,x^{2}+e}\, \sqrt {-d \,x^{2}+c}}{-b d f \,x^{6}-a d f \,x^{4}+b c f \,x^{4}-b d e \,x^{4}+a c f \,x^{2}-a d e \,x^{2}+b c e \,x^{2}+a c e}d x \right ) a \] Input:

int((C*x^4+B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(f*x^2+e)^(1/2),x)
 

Output:

int((sqrt(e + f*x**2)*sqrt(c - d*x**2)*x**4)/(a*c*e + a*c*f*x**2 - a*d*e*x 
**2 - a*d*f*x**4 + b*c*e*x**2 + b*c*f*x**4 - b*d*e*x**4 - b*d*f*x**6),x)*c 
 + int((sqrt(e + f*x**2)*sqrt(c - d*x**2)*x**2)/(a*c*e + a*c*f*x**2 - a*d* 
e*x**2 - a*d*f*x**4 + b*c*e*x**2 + b*c*f*x**4 - b*d*e*x**4 - b*d*f*x**6),x 
)*b + int((sqrt(e + f*x**2)*sqrt(c - d*x**2))/(a*c*e + a*c*f*x**2 - a*d*e* 
x**2 - a*d*f*x**4 + b*c*e*x**2 + b*c*f*x**4 - b*d*e*x**4 - b*d*f*x**6),x)* 
a