Proof of this integration shortcut: $\int_a^b \frac{dx}{\sqrt{(x-a)(b-x)}}=\pi$
Other way is substitution $t=\sin^2\theta$ so $$\int\limits_0^1 \dfrac{dt}{\sqrt{t(1-t)}}=\int\limits_0^\frac{\pi}{2} 2dt=\pi$$
It's called an Abel Integral ( at least in my language ). You can write that $$ \frac{1}{\sqrt{\left(x-a\right)\left(b-x\right)}}=\frac{2}{a-b}\frac{1}{\sqrt{1-\left(\frac{2}{a-b}\left(x-\frac{b+a}{2}\right)\right)^2}}$$
that goes into arcsinus
$$\int_{a}^{b}\frac{\text{d}x}{\sqrt{\left(x-a\right)\left(b-x\right)}}=\text{arcsin}\left(\frac{2}{b-a}\frac{b-a}{2}\right)+\text{arcsin}\left(\frac{2}{a-b}\frac{a-b}{2}\right)=2\text{arcsin}\left(1\right)=\pi$$
Let $m = \frac{b+a}{2}$ and $r = \frac{b-a}{2}$. Consider the circle
$$ (x - m)^2 + y^2 = r^2. $$
Part of this locus with $y \geq 0$ is given by $y = \sqrt{r^2 - (x-m)^2} = \sqrt{(x-a)(b-x)}$ for $a \leq x \leq b$. By the implicit differentiation, this function satisfies $ 2(x - m) dx + 2ydy = 0 $ and hence
$$ \frac{dy}{dx} = -\frac{x-m}{y}. $$
So the length of the upper-circular arc is
$$ \pi r = \int_{a}^{b} \sqrt{1+\left(\frac{dy}{dx}\right)^2} \, dx = \int_{a}^{b} \sqrt{\frac{(x-m)^2 + y^2}{y^2}} \, dx = \int_{a}^{b} \frac{r}{\sqrt{(x-a)(b-x)}} \, dx. $$
Dividing both sides by $r$ gives the desired answer.