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

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 {C \sqrt {e} \sqrt {c+d x^2} \sqrt {1-\frac {f x^2}{e}} E\left (\arcsin \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )|-\frac {d e}{c f}\right )}{b d \sqrt {f} \sqrt {1+\frac {d x^2}{c}} \sqrt {e-f x^2}}-\frac {(b c C-b B d+a C d) \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^2 d \sqrt {f} \sqrt {c+d x^2} \sqrt {e-f x^2}}+\frac {\left (A b^2-a (b B-a C)\right ) \sqrt {e} \sqrt {1+\frac {d x^2}{c}} \sqrt {1-\frac {f x^2}{e}} \operatorname {EllipticPi}\left (-\frac {b e}{a f},\arcsin \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ),-\frac {d e}{c f}\right )}{a b^2 \sqrt {f} \sqrt {c+d x^2} \sqrt {e-f x^2}} \] Output:

C*e^(1/2)*(d*x^2+c)^(1/2)*(1-f*x^2/e)^(1/2)*EllipticE(f^(1/2)*x/e^(1/2),(- 
d*e/c/f)^(1/2))/b/d/f^(1/2)/(1+d*x^2/c)^(1/2)/(-f*x^2+e)^(1/2)-(-B*b*d+C*a 
*d+C*b*c)*e^(1/2)*(1+d*x^2/c)^(1/2)*(1-f*x^2/e)^(1/2)*EllipticF(f^(1/2)*x/ 
e^(1/2),(-d*e/c/f)^(1/2))/b^2/d/f^(1/2)/(d*x^2+c)^(1/2)/(-f*x^2+e)^(1/2)+( 
A*b^2-a*(B*b-C*a))*e^(1/2)*(1+d*x^2/c)^(1/2)*(1-f*x^2/e)^(1/2)*EllipticPi( 
f^(1/2)*x/e^(1/2),-b*e/a/f,(-d*e/c/f)^(1/2))/a/b^2/f^(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.33 (sec) , antiderivative size = 206, normalized size of antiderivative = 0.64 \[ \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 (a C f-b (C e+B 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[Sq 
rt[d/c]*x], -((c*f)/(d*e))] + a*(a*C*f - b*(C*e + B*f))*EllipticF[I*ArcSin 
h[Sqrt[d/c]*x], -((c*f)/(d*e))] - (A*b^2 + a*(-(b*B) + a*C))*f*EllipticPi[ 
(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.24 (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 {e} \sqrt {\frac {d x^2}{c}+1} \sqrt {1-\frac {f x^2}{e}} \left (A b^2-a (b B-a C)\right ) \operatorname {EllipticPi}\left (-\frac {b e}{a f},\arcsin \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ),-\frac {d e}{c f}\right )}{a b^2 \sqrt {f} \sqrt {c+d x^2} \sqrt {e-f x^2}}+\frac {\sqrt {e} \sqrt {\frac {d x^2}{c}+1} \sqrt {1-\frac {f x^2}{e}} (b B-a C) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ),-\frac {d e}{c f}\right )}{b^2 \sqrt {f} \sqrt {c+d x^2} \sqrt {e-f x^2}}-\frac {c C \sqrt {e} \sqrt {\frac {d x^2}{c}+1} \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 d \sqrt {f} \sqrt {c+d x^2} \sqrt {e-f x^2}}+\frac {C \sqrt {e} \sqrt {c+d x^2} \sqrt {1-\frac {f x^2}{e}} E\left (\arcsin \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )|-\frac {d e}{c f}\right )}{b d \sqrt {f} \sqrt {\frac {d x^2}{c}+1} \sqrt {e-f x^2}}\)

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:

(C*Sqrt[e]*Sqrt[c + d*x^2]*Sqrt[1 - (f*x^2)/e]*EllipticE[ArcSin[(Sqrt[f]*x 
)/Sqrt[e]], -((d*e)/(c*f))])/(b*d*Sqrt[f]*Sqrt[1 + (d*x^2)/c]*Sqrt[e - f*x 
^2]) + ((b*B - a*C)*Sqrt[e]*Sqrt[1 + (d*x^2)/c]*Sqrt[1 - (f*x^2)/e]*Ellipt 
icF[ArcSin[(Sqrt[f]*x)/Sqrt[e]], -((d*e)/(c*f))])/(b^2*Sqrt[f]*Sqrt[c + d* 
x^2]*Sqrt[e - f*x^2]) - (c*C*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*d*Sqrt[f]*Sq 
rt[c + d*x^2]*Sqrt[e - f*x^2]) + ((A*b^2 - a*(b*B - a*C))*Sqrt[e]*Sqrt[1 + 
 (d*x^2)/c]*Sqrt[1 - (f*x^2)/e]*EllipticPi[-((b*e)/(a*f)), ArcSin[(Sqrt[f] 
*x)/Sqrt[e]], -((d*e)/(c*f))])/(a*b^2*Sqrt[f]*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.84 (sec) , antiderivative size = 328, normalized size of antiderivative = 1.02

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^{2} d +B \operatorname {EllipticF}\left (x \sqrt {\frac {f}{e}}, \sqrt {-\frac {d e}{c f}}\right ) a b d -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 b d -C \operatorname {EllipticF}\left (x \sqrt {\frac {f}{e}}, \sqrt {-\frac {d e}{c f}}\right ) a^{2} d -C \operatorname {EllipticF}\left (x \sqrt {\frac {f}{e}}, \sqrt {-\frac {d e}{c f}}\right ) a b c +C \operatorname {EllipticE}\left (x \sqrt {\frac {f}{e}}, \sqrt {-\frac {d e}{c f}}\right ) a b c +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^{2} d \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}}{d a \sqrt {\frac {f}{e}}\, 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 {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 {EllipticF}\left (x \sqrt {\frac {f}{e}}, \sqrt {-1-\frac {-c f +d e}{c f}}\right ) C a}{b^{2} \sqrt {\frac {f}{e}}\, \sqrt {-d f \,x^{4}-c f \,x^{2}+d e \,x^{2}+c e}}-\frac {C c \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}\, d}+\frac {C c \sqrt {1-\frac {f \,x^{2}}{e}}\, \sqrt {1+\frac {d \,x^{2}}{c}}\, \operatorname {EllipticE}\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}\, d}+\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}}+\frac {a \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 ) C}{b^{2} \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}}\) \(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*(f/e)^(1/2),-b*e/a/f,(-1/c*d)^(1/2)/(f/e)^(1/2))*b^2*d+B*E 
llipticF(x*(f/e)^(1/2),(-d*e/c/f)^(1/2))*a*b*d-B*EllipticPi(x*(f/e)^(1/2), 
-b*e/a/f,(-1/c*d)^(1/2)/(f/e)^(1/2))*a*b*d-C*EllipticF(x*(f/e)^(1/2),(-d*e 
/c/f)^(1/2))*a^2*d-C*EllipticF(x*(f/e)^(1/2),(-d*e/c/f)^(1/2))*a*b*c+C*Ell 
ipticE(x*(f/e)^(1/2),(-d*e/c/f)^(1/2))*a*b*c+C*EllipticPi(x*(f/e)^(1/2),-b 
*e/a/f,(-1/c*d)^(1/2)/(f/e)^(1/2))*a^2*d)*((d*x^2+c)/c)^(1/2)*((-f*x^2+e)/ 
e)^(1/2)*(d*x^2+c)^(1/2)*(-f*x^2+e)^(1/2)/d/a/(f/e)^(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 {d\,x^2+c}\,\sqrt {e-f\,x^2}} \,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