Proof of this integration shortcut: $\int_a^b \frac{dx}{\sqrt{(x-a)(b-x)}}=\pi$

I came across this as one of the shortcuts in my textbook without any proof.
When $b\gt a$,

$$\int\limits_a^b \dfrac{dx}{\sqrt{(x-a)(b-x)}}=\pi$$

My attempt :

I notice that the the denominator is $0$ at both the bounds. I thought of substituting $x=a+(b-a)t$ so that the integral becomes $$\int\limits_0^1 \dfrac{dt}{\sqrt{t(1-t)}}$$

This doesn't look simple, but I'm wondering if the answer can be seen using symmetry/geometry ?

• It's better to reduce to the $(a,b)=(-1,1)$ case rather than the $(0,1)$ case. – Angina Seng Jul 16 '18 at 17:59
• @InterstellarProbe here is an example – AgentS Jul 16 '18 at 18:04
• @InterstellarProbe So much the worse for Wolfie! – Angina Seng Jul 16 '18 at 18:06
• $\int\limits_0^1 \dfrac{dt}{\sqrt{t(1-t)}}=\beta(\dfrac14,\dfrac14)=\pi$ – Nosrati Jul 16 '18 at 18:16
• maybe try the substitution $t=\cos \theta$ or $t=\sin\theta$? I haven't tried it but the denominator would simplify – usr0192 Jul 16 '18 at 18:18

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.

\begin{align} \tan^2 \theta &= \frac{x-a}{b-x} \\ 2\tan \theta \sec^2 \theta \, d\theta &= \frac{b-a}{(b-x)^2} \, dx \\ 2\sqrt{\frac{x-a}{b-x}} \times \frac{(x-a)+(b-x)}{b-x} \, d\theta &= \frac{b-a}{(b-x)^2} \, dx \\ 2\, d\theta &= \frac{dx}{\sqrt{(x-a)(b-x)}} \\ \int \frac{dx}{\sqrt{(x-a)(b-x)}} &= 2\tan^{-1} \sqrt{\frac{x-a}{b-x}} \end{align}

The singularity in Wolfram Alpha comes from the upper limit $b$.

Geometrical interpretation

Considering circular arc $(x,y)=(\sqrt{b-u},\sqrt{u-a})$

\begin{align} ds &= \frac{\sqrt{b-a} \, du}{2\sqrt{(u-a)(b-u)}} \\ \tan \theta &= \sqrt{\frac{u-a}{b-u}} \\ \begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} \sqrt{b-a} \cos \theta \\ \sqrt{b-a} \sin \theta \end{pmatrix} \\ ds &= \sqrt{b-a} \, d\theta \end{align}

I was taught to use the substitution $x=a \sin^2 \theta+b \cos^2 \theta$