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

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 = 41, antiderivative size = 205 \[ \int \frac {A+B x^2}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e-f x^2}} \, dx=\frac {B \sqrt {c} \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 \sqrt {d} \sqrt {c-d x^2} \sqrt {e-f x^2}}+\frac {(A b-a B) \sqrt {c} \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 \sqrt {d} \sqrt {c-d x^2} \sqrt {e-f x^2}} \] Output:

B*c^(1/2)*(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/d^(1/2)/(-d*x^2+c)^(1/2)/(-f*x^2+e)^(1/2)+(A*b-B*a)*c^( 
1/2)*(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/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 = 8.52 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.74 \[ \int \frac {A+B x^2}{\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 \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {d}{c}} x\right ),\frac {c f}{d e}\right )+(A b-a B) \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 \sqrt {-\frac {d}{c}} \sqrt {c-d x^2} \sqrt {e-f x^2}} \] Input:

Integrate[(A + B*x^2)/((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*EllipticF[I*ArcSinh[Sqr 
t[-(d/c)]*x], (c*f)/(d*e)] + (A*b - a*B)*EllipticPi[-((b*c)/(a*d)), I*ArcS 
inh[Sqrt[-(d/c)]*x], (c*f)/(d*e)]))/(a*b*Sqrt[-(d/c)]*Sqrt[c - d*x^2]*Sqrt 
[e - f*x^2])
 

Rubi [A] (verified)

Time = 1.11 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, 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}{\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 b-a B}{b \left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e-f x^2}}+\frac {B}{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 {1-\frac {f x^2}{e}} (A b-a B) \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 \sqrt {d} \sqrt {c-d x^2} \sqrt {e-f x^2}}+\frac {B \sqrt {e} \sqrt {1-\frac {d x^2}{c}} \sqrt {1-\frac {f x^2}{e}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ),\frac {d e}{c f}\right )}{b \sqrt {f} \sqrt {c-d x^2} \sqrt {e-f x^2}}\)

Input:

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

Output:

(B*Sqrt[e]*Sqrt[1 - (d*x^2)/c]*Sqrt[1 - (f*x^2)/e]*EllipticF[ArcSin[(Sqrt[ 
f]*x)/Sqrt[e]], (d*e)/(c*f)])/(b*Sqrt[f]*Sqrt[c - d*x^2]*Sqrt[e - f*x^2]) 
+ ((A*b - a*B)*Sqrt[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*Sqrt[d]*Sq 
rt[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.94 (sec) , antiderivative size = 191, normalized size of antiderivative = 0.93

method result size
default \(\frac {\left (A \operatorname {EllipticPi}\left (x \sqrt {\frac {f}{e}}, -\frac {b e}{a f}, \frac {\sqrt {\frac {d}{c}}}{\sqrt {\frac {f}{e}}}\right ) b +B \operatorname {EllipticF}\left (x \sqrt {\frac {f}{e}}, \sqrt {\frac {d e}{c f}}\right ) a -B \operatorname {EllipticPi}\left (x \sqrt {\frac {f}{e}}, -\frac {b e}{a f}, \frac {\sqrt {\frac {d}{c}}}{\sqrt {\frac {f}{e}}}\right ) a \right ) \sqrt {\frac {-x^{2} d +c}{c}}\, \sqrt {\frac {-f \,x^{2}+e}{e}}\, \sqrt {-x^{2} d +c}\, \sqrt {-f \,x^{2}+e}}{b a \sqrt {\frac {f}{e}}\, \left (d f \,x^{4}-c f \,x^{2}-d e \,x^{2}+c e \right )}\) \(191\)
elliptic \(\frac {\sqrt {\left (-x^{2} d +c \right ) \left (-f \,x^{2}+e \right )}\, \left (\frac {B \sqrt {1-\frac {f \,x^{2}}{e}}\, \sqrt {1-\frac {d \,x^{2}}{c}}\, \operatorname {EllipticF}\left (x \sqrt {\frac {f}{e}}, \sqrt {-1-\frac {-c f -d e}{c f}}\right )}{b \sqrt {\frac {f}{e}}\, \sqrt {d f \,x^{4}-c f \,x^{2}-d e \,x^{2}+c e}}+\frac {\sqrt {1-\frac {f \,x^{2}}{e}}\, \sqrt {1-\frac {d \,x^{2}}{c}}\, \operatorname {EllipticPi}\left (x \sqrt {\frac {f}{e}}, -\frac {b e}{a f}, \frac {\sqrt {\frac {d}{c}}}{\sqrt {\frac {f}{e}}}\right ) A}{a \sqrt {\frac {f}{e}}\, \sqrt {d f \,x^{4}-c f \,x^{2}-d e \,x^{2}+c e}}-\frac {\sqrt {1-\frac {f \,x^{2}}{e}}\, \sqrt {1-\frac {d \,x^{2}}{c}}\, \operatorname {EllipticPi}\left (x \sqrt {\frac {f}{e}}, -\frac {b e}{a f}, \frac {\sqrt {\frac {d}{c}}}{\sqrt {\frac {f}{e}}}\right ) B}{b \sqrt {\frac {f}{e}}\, \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}}\) \(336\)

Input:

int((B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(-f*x^2+e)^(1/2),x,method=_RETURN 
VERBOSE)
 

Output:

(A*EllipticPi(x*(f/e)^(1/2),-b*e/a/f,(1/c*d)^(1/2)/(f/e)^(1/2))*b+B*Ellipt 
icF(x*(f/e)^(1/2),(d*e/c/f)^(1/2))*a-B*EllipticPi(x*(f/e)^(1/2),-b*e/a/f,( 
1/c*d)^(1/2)/(f/e)^(1/2))*a)*((-d*x^2+c)/c)^(1/2)*((-f*x^2+e)/e)^(1/2)/b*( 
-d*x^2+c)^(1/2)*(-f*x^2+e)^(1/2)/a/(f/e)^(1/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}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e-f x^2}} \, dx=\text {Timed out} \] Input:

integrate((B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(-f*x^2+e)^(1/2),x, algorit 
hm="fricas")
 

Output:

Timed out
 

Sympy [F]

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

integrate((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)/((a + b*x**2)*sqrt(c - d*x**2)*sqrt(e - f*x**2)), x)
 

Maxima [F]

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

integrate((B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(-f*x^2+e)^(1/2),x, algorit 
hm="maxima")
 

Output:

integrate((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}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e-f x^2}} \, dx=\int { \frac {B x^{2} + A}{{\left (b x^{2} + a\right )} \sqrt {-d x^{2} + c} \sqrt {-f x^{2} + e}} \,d x } \] Input:

integrate((B*x^2+A)/(b*x^2+a)/(-d*x^2+c)^(1/2)/(-f*x^2+e)^(1/2),x, algorit 
hm="giac")
 

Output:

integrate((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}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e-f x^2}} \, dx=\int \frac {B\,x^2+A}{\left (b\,x^2+a\right )\,\sqrt {c-d\,x^2}\,\sqrt {e-f\,x^2}} \,d x \] Input:

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

Output:

int((A + B*x^2)/((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}{\left (a+b x^2\right ) \sqrt {c-d x^2} \sqrt {e-f x^2}} \, dx=\int \frac {\sqrt {-f \,x^{2}+e}\, \sqrt {-d \,x^{2}+c}}{d f \,x^{4}-c f \,x^{2}-d e \,x^{2}+c e}d x \] Input:

int((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))/(c*e - c*f*x**2 - d*e*x**2 + d*f*x 
**4),x)