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

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 = 40, antiderivative size = 203 \[ \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.55 (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*A 
rcSinh[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.04 (sec) , antiderivative size = 203, 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.050, 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 {\frac {f x^2}{e}+1} (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 {c} \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} \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[c]*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]*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]*Elliptic 
Pi[-((b*c)/(a*d)), ArcSin[(Sqrt[d]*x)/Sqrt[c]], -((c*f)/(d*e))])/(a*b*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 = 6.02 (sec) , antiderivative size = 192, normalized size of antiderivative = 0.95

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 +B \operatorname {EllipticF}\left (x \sqrt {\frac {d}{c}}, \sqrt {-\frac {c f}{d e}}\right ) a -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 \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}}{b a \sqrt {\frac {d}{c}}\, \left (-d f \,x^{4}+c f \,x^{2}-d e \,x^{2}+c e \right )}\) \(192\)
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 {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}}\right )}{\sqrt {-x^{2} d +c}\, \sqrt {f \,x^{2}+e}}\) \(332\)

Input:

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

Output:

(A*EllipticPi(x*(1/c*d)^(1/2),-b*c/a/d,(-f/e)^(1/2)/(1/c*d)^(1/2))*b+B*Ell 
ipticF(x*(1/c*d)^(1/2),(-c*f/d/e)^(1/2))*a-B*EllipticPi(x*(1/c*d)^(1/2),-b 
*c/a/d,(-f/e)^(1/2)/(1/c*d)^(1/2))*a)/b*((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)/a/(1/c*d)^(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, algorith 
m="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, algorith 
m="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, algorith 
m="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 {f\,x^2+e}} \,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)