Elliptic integral evaluation How to integrate ( $ r_o, r_b$ constants)
$$ \int \sqrt{\dfrac{r_o^2- r^2}{r^2-r_b^2}} \, dr,  (r_o > r > r_b > 0)\, ? $$
With Mathematica got its coefficient  imaginary, needing  to take the condition properly.
EDIT1: 
As a stand alone its evaluation is problematic. However, using NDSolve of Mathematica along with other evaluated variables it solves OK in a sort of self-regulatory mode, the puzzling aspect had me post it over here.
 A: We are given $0<r_{b}<r<r_{o}$, which implies $0<\frac{r_{b}}{r_{o}}<\frac{r}{r_{o}}<1$. Defining $b:=\frac{r_{b}}{r_{o}}$ and substituting $x=\frac{r}{r_{o}}$, the integral becomes:
$$\begin{align}
\int\sqrt{\frac{r_{o}^2-r^2}{r^2-r_{b}^2}}\,\mathrm{d}r
&=\int\sqrt{\frac{1-\left(\frac{r}{r_{o}}\right)^2}{\left(\frac{r}{r_{o}}\right)^2-\left(\frac{r_{b}}{r_{o}}\right)^2}}\,\mathrm{d}r
\\
&=r_{o}\int\sqrt{\frac{1-x^2}{x^2-b^2}}\,\mathrm{d}x;~~[0<b<x<1].
\\
\end{align}$$
To solve the rescaled indefinite integral $\int\sqrt{\frac{1-x^2}{x^2-b^2}}\,\mathrm{d}x$, start by substituting $y=\sqrt{1-x^2}$, and then $z=\frac{y}{\sqrt{1-b^2}}$:
$$\begin{align}
\int\sqrt{\frac{1-x^2}{x^2-b^2}}\,\mathrm{d}x
&=\int\frac{\sqrt{1-x^2}}{\sqrt{x^2-b^2}}\,\mathrm{d}x\\
&=\int\frac{\sqrt{1-x^2}}{\sqrt{(1-b^2)-(1-x^2)}}\,\mathrm{d}x\\
&=\int\frac{y}{\sqrt{(1-b^2)-y^2}}\cdot\frac{(-y)}{\sqrt{1-y^2}}\,\mathrm{d}y\\
&=-\int\frac{y^2}{\sqrt{(1-b^2)-y^2}\,\sqrt{1-y^2}}\,\mathrm{d}y\\
&=-\frac{1}{\sqrt{1-b^2}}\int\frac{(1-b^2)\,z^2}{\sqrt{1-z^2}\,\sqrt{1-(1-b^2)z^2}}\sqrt{1-b^2}\,\mathrm{d}z\\
&=\int\frac{-(1-b^2)z^2}{\sqrt{1-z^2}\,\sqrt{1-(1-b^2)z^2}}\,\mathrm{d}z\\
&=\int\frac{-1+1-(1-b^2)z^2}{\sqrt{1-z^2}\,\sqrt{1-(1-b^2)z^2}}\,\mathrm{d}z\\
&=\int\frac{1-(1-b^2)z^2}{\sqrt{1-z^2}\,\sqrt{1-(1-b^2)z^2}}\,\mathrm{d}z-\int\frac{\mathrm{d}z}{\sqrt{1-z^2}\,\sqrt{1-(1-b^2)z^2}}\\
&=\int\frac{\sqrt{1-(1-b^2)z^2}}{\sqrt{1-z^2}}\,\mathrm{d}z-\int\frac{\mathrm{d}z}{\sqrt{1-z^2}\,\sqrt{1-(1-b^2)z^2}}\\
&=\int\frac{\sqrt{1-b^{~\prime\,2}z^2}}{\sqrt{1-z^2}}\,\mathrm{d}z-\int\frac{\mathrm{d}z}{\sqrt{1-z^2}\,\sqrt{1-b^{~\prime\,2}z^2}}\\
&=\int\frac{\sqrt{1-b^{~\prime\,2}z^2}}{\sqrt{1-z^2}}\,\mathrm{d}z-\int\frac{\mathrm{d}z}{\sqrt{1-z^2}\,\sqrt{1-b^{~\prime\,2}z^2}}\\
&=E{\left(\arcsin{\left(z\right)}\,|\,b^{~\prime\,2}\right)}-F{\left(\arcsin{\left(z\right)}\,|\,b^{~\prime\,2}\right)}+\color{grey}{constant}.\\
\end{align}$$
The rest of the derivation is just straightforward back-substitution.
