\(\int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx\) [127]

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

Optimal result

Integrand size = 24, antiderivative size = 135 \[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=-\frac {a^{3/2} \sqrt {1-\frac {b^2 x^4}{a^2}} E\left (\left .\arcsin \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )\right |-1\right )}{\sqrt {b} \sqrt {a-b x^2} \sqrt {a+b x^2}}+\frac {2 a^{3/2} \sqrt {1-\frac {b^2 x^4}{a^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ),-1\right )}{\sqrt {b} \sqrt {a-b x^2} \sqrt {a+b x^2}} \] Output:

-a^(3/2)*(1-b^2*x^4/a^2)^(1/2)*EllipticE(b^(1/2)*x/a^(1/2),I)/b^(1/2)/(-b* 
x^2+a)^(1/2)/(b*x^2+a)^(1/2)+2*a^(3/2)*(1-b^2*x^4/a^2)^(1/2)*EllipticF(b^( 
1/2)*x/a^(1/2),I)/b^(1/2)/(-b*x^2+a)^(1/2)/(b*x^2+a)^(1/2)
 

Mathematica [A] (verified)

Time = 0.51 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.59 \[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=\frac {\sqrt {a-b x^2} \sqrt {\frac {a+b x^2}{a}} E\left (\left .\arcsin \left (\sqrt {-\frac {b}{a}} x\right )\right |-1\right )}{\sqrt {-\frac {b}{a}} \sqrt {\frac {a-b x^2}{a}} \sqrt {a+b x^2}} \] Input:

Integrate[Sqrt[a - b*x^2]/Sqrt[a + b*x^2],x]
 

Output:

(Sqrt[a - b*x^2]*Sqrt[(a + b*x^2)/a]*EllipticE[ArcSin[Sqrt[-(b/a)]*x], -1] 
)/(Sqrt[-(b/a)]*Sqrt[(a - b*x^2)/a]*Sqrt[a + b*x^2])
 

Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {326, 289, 329, 327, 765, 762}

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 {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx\)

\(\Big \downarrow \) 326

\(\displaystyle 2 a \int \frac {1}{\sqrt {a-b x^2} \sqrt {b x^2+a}}dx-\int \frac {\sqrt {b x^2+a}}{\sqrt {a-b x^2}}dx\)

\(\Big \downarrow \) 289

\(\displaystyle \frac {2 a \sqrt {a^2-b^2 x^4} \int \frac {1}{\sqrt {a^2-b^2 x^4}}dx}{\sqrt {a-b x^2} \sqrt {a+b x^2}}-\int \frac {\sqrt {b x^2+a}}{\sqrt {a-b x^2}}dx\)

\(\Big \downarrow \) 329

\(\displaystyle \frac {2 a \sqrt {a^2-b^2 x^4} \int \frac {1}{\sqrt {a^2-b^2 x^4}}dx}{\sqrt {a-b x^2} \sqrt {a+b x^2}}-\frac {a \sqrt {1-\frac {b^2 x^4}{a^2}} \int \frac {\sqrt {\frac {b x^2}{a}+1}}{\sqrt {1-\frac {b x^2}{a}}}dx}{\sqrt {a-b x^2} \sqrt {a+b x^2}}\)

\(\Big \downarrow \) 327

\(\displaystyle \frac {2 a \sqrt {a^2-b^2 x^4} \int \frac {1}{\sqrt {a^2-b^2 x^4}}dx}{\sqrt {a-b x^2} \sqrt {a+b x^2}}-\frac {a^{3/2} \sqrt {1-\frac {b^2 x^4}{a^2}} E\left (\left .\arcsin \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )\right |-1\right )}{\sqrt {b} \sqrt {a-b x^2} \sqrt {a+b x^2}}\)

\(\Big \downarrow \) 765

\(\displaystyle \frac {2 a \sqrt {1-\frac {b^2 x^4}{a^2}} \int \frac {1}{\sqrt {1-\frac {b^2 x^4}{a^2}}}dx}{\sqrt {a-b x^2} \sqrt {a+b x^2}}-\frac {a^{3/2} \sqrt {1-\frac {b^2 x^4}{a^2}} E\left (\left .\arcsin \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )\right |-1\right )}{\sqrt {b} \sqrt {a-b x^2} \sqrt {a+b x^2}}\)

\(\Big \downarrow \) 762

\(\displaystyle \frac {2 a^{3/2} \sqrt {1-\frac {b^2 x^4}{a^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ),-1\right )}{\sqrt {b} \sqrt {a-b x^2} \sqrt {a+b x^2}}-\frac {a^{3/2} \sqrt {1-\frac {b^2 x^4}{a^2}} E\left (\left .\arcsin \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )\right |-1\right )}{\sqrt {b} \sqrt {a-b x^2} \sqrt {a+b x^2}}\)

Input:

Int[Sqrt[a - b*x^2]/Sqrt[a + b*x^2],x]
 

Output:

-((a^(3/2)*Sqrt[1 - (b^2*x^4)/a^2]*EllipticE[ArcSin[(Sqrt[b]*x)/Sqrt[a]], 
-1])/(Sqrt[b]*Sqrt[a - b*x^2]*Sqrt[a + b*x^2])) + (2*a^(3/2)*Sqrt[1 - (b^2 
*x^4)/a^2]*EllipticF[ArcSin[(Sqrt[b]*x)/Sqrt[a]], -1])/(Sqrt[b]*Sqrt[a - b 
*x^2]*Sqrt[a + b*x^2])
 

Defintions of rubi rules used

rule 289
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(p_), x_Symbol] :> Sim 
p[(a + b*x^2)^FracPart[p]*((c + d*x^2)^FracPart[p]/(a*c + b*d*x^4)^FracPart 
[p])   Int[(a*c + b*d*x^4)^p, x], x] /; FreeQ[{a, b, c, d, p}, x] && EqQ[b* 
c + a*d, 0] &&  !IntegerQ[p]
 

rule 326
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ 
b/d   Int[Sqrt[c + d*x^2]/Sqrt[a + b*x^2], x], x] - Simp[(b*c - a*d)/d   In 
t[1/(Sqrt[a + b*x^2]*Sqrt[c + d*x^2]), x], x] /; FreeQ[{a, b, c, d}, x] && 
PosQ[d/c] && NegQ[b/a]
 

rule 327
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ 
(Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*EllipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d) 
)], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0]
 

rule 329
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ 
a*(Sqrt[1 - b^2*(x^4/a^2)]/(Sqrt[a + b*x^2]*Sqrt[c + d*x^2]))   Int[Sqrt[1 
+ b*(x^2/a)]/Sqrt[1 - b*(x^2/a)], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[b 
*c + a*d, 0] &&  !(LtQ[a*c, 0] && GtQ[a*b, 0])
 

rule 762
Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> Simp[(1/(Sqrt[a]*Rt[-b/a, 4]) 
)*EllipticF[ArcSin[Rt[-b/a, 4]*x], -1], x] /; FreeQ[{a, b}, x] && NegQ[b/a] 
 && GtQ[a, 0]
 

rule 765
Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> Simp[Sqrt[1 + b*(x^4/a)]/Sqrt 
[a + b*x^4]   Int[1/Sqrt[1 + b*(x^4/a)], x], x] /; FreeQ[{a, b}, x] && NegQ 
[b/a] &&  !GtQ[a, 0]
 
Maple [A] (verified)

Time = 0.67 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.73

method result size
default \(\frac {\sqrt {-b \,x^{2}+a}\, \sqrt {b \,x^{2}+a}\, a \sqrt {\frac {-b \,x^{2}+a}{a}}\, \sqrt {\frac {b \,x^{2}+a}{a}}\, \left (2 \operatorname {EllipticF}\left (x \sqrt {\frac {b}{a}}, i\right )-\operatorname {EllipticE}\left (x \sqrt {\frac {b}{a}}, i\right )\right )}{\left (-b^{2} x^{4}+a^{2}\right ) \sqrt {\frac {b}{a}}}\) \(99\)
elliptic \(\frac {\sqrt {-b^{2} x^{4}+a^{2}}\, \left (\frac {a \sqrt {1-\frac {b \,x^{2}}{a}}\, \sqrt {1+\frac {b \,x^{2}}{a}}\, \operatorname {EllipticF}\left (x \sqrt {\frac {b}{a}}, i\right )}{\sqrt {\frac {b}{a}}\, \sqrt {-b^{2} x^{4}+a^{2}}}+\frac {a \sqrt {1-\frac {b \,x^{2}}{a}}\, \sqrt {1+\frac {b \,x^{2}}{a}}\, \left (\operatorname {EllipticF}\left (x \sqrt {\frac {b}{a}}, i\right )-\operatorname {EllipticE}\left (x \sqrt {\frac {b}{a}}, i\right )\right )}{\sqrt {\frac {b}{a}}\, \sqrt {-b^{2} x^{4}+a^{2}}}\right )}{\sqrt {-b \,x^{2}+a}\, \sqrt {b \,x^{2}+a}}\) \(171\)

Input:

int((-b*x^2+a)^(1/2)/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

(-b*x^2+a)^(1/2)*(b*x^2+a)^(1/2)*a*((-b*x^2+a)/a)^(1/2)*((b*x^2+a)/a)^(1/2 
)*(2*EllipticF(x*(b/a)^(1/2),I)-EllipticE(x*(b/a)^(1/2),I))/(-b^2*x^4+a^2) 
/(b/a)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.71 \[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=\frac {\sqrt {-b^{2}} a x \sqrt {\frac {a}{b}} E(\arcsin \left (\frac {\sqrt {\frac {a}{b}}}{x}\right )\,|\,-1) - \sqrt {-b^{2}} {\left (a - b\right )} x \sqrt {\frac {a}{b}} F(\arcsin \left (\frac {\sqrt {\frac {a}{b}}}{x}\right )\,|\,-1) + \sqrt {b x^{2} + a} \sqrt {-b x^{2} + a} b}{b^{2} x} \] Input:

integrate((-b*x^2+a)^(1/2)/(b*x^2+a)^(1/2),x, algorithm="fricas")
 

Output:

(sqrt(-b^2)*a*x*sqrt(a/b)*elliptic_e(arcsin(sqrt(a/b)/x), -1) - sqrt(-b^2) 
*(a - b)*x*sqrt(a/b)*elliptic_f(arcsin(sqrt(a/b)/x), -1) + sqrt(b*x^2 + a) 
*sqrt(-b*x^2 + a)*b)/(b^2*x)
 

Sympy [F]

\[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=\int \frac {\sqrt {a - b x^{2}}}{\sqrt {a + b x^{2}}}\, dx \] Input:

integrate((-b*x**2+a)**(1/2)/(b*x**2+a)**(1/2),x)
 

Output:

Integral(sqrt(a - b*x**2)/sqrt(a + b*x**2), x)
 

Maxima [F]

\[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=\int { \frac {\sqrt {-b x^{2} + a}}{\sqrt {b x^{2} + a}} \,d x } \] Input:

integrate((-b*x^2+a)^(1/2)/(b*x^2+a)^(1/2),x, algorithm="maxima")
 

Output:

integrate(sqrt(-b*x^2 + a)/sqrt(b*x^2 + a), x)
 

Giac [F]

\[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=\int { \frac {\sqrt {-b x^{2} + a}}{\sqrt {b x^{2} + a}} \,d x } \] Input:

integrate((-b*x^2+a)^(1/2)/(b*x^2+a)^(1/2),x, algorithm="giac")
 

Output:

integrate(sqrt(-b*x^2 + a)/sqrt(b*x^2 + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=\int \frac {\sqrt {a-b\,x^2}}{\sqrt {b\,x^2+a}} \,d x \] Input:

int((a - b*x^2)^(1/2)/(a + b*x^2)^(1/2),x)
 

Output:

int((a - b*x^2)^(1/2)/(a + b*x^2)^(1/2), x)
 

Reduce [F]

\[ \int \frac {\sqrt {a-b x^2}}{\sqrt {a+b x^2}} \, dx=\int \frac {\sqrt {b \,x^{2}+a}\, \sqrt {-b \,x^{2}+a}}{b \,x^{2}+a}d x \] Input:

int((-b*x^2+a)^(1/2)/(b*x^2+a)^(1/2),x)
 

Output:

int((sqrt(a + b*x**2)*sqrt(a - b*x**2))/(a + b*x**2),x)