How to evaluate this improper integral?

I got stuck when evaluating these two improper integrals:$$\int_a^b\frac{dx}{\sqrt{(b-x)(x-a)}}$$ and$$\int_0^1\frac{dx}{\sqrt{x-x^3}}$$ How to evaluate them? Thank you!

• Use the beta function or a dumbbell contour. Nov 11, 2014 at 4:31

\begin{align*} \int_a^b{\frac{\mathrm dx}{\sqrt{(b-x)(x-a)}}}&=\int_a^b\frac{\mathrm d x}{\sqrt{-ab+(a+b)x-x^2}}\\ &=\int_a^b\frac{\mathrm dx}{\sqrt{-ab+\left(\frac{a+b}{2}\right)^2-\left(x-\frac{a+b}{2}\right)^2}}\\ &=\int_a^b\frac{\mathrm dx }{\sqrt{\left(\frac{b-a}{2}\right)^2-\left(x-\frac{a+b}{2}\right)^2}} \end{align*} Let's put $$\frac{b-a}{2}\sin t=x-\frac{a+b}{2},\quad\mathrm dx=\frac{b-a}{2}\cos t\mathrm dt$$ where $$x=a\implies \frac{b-a}{2}\sin t_1=-\frac{b-a}{2}\implies t_1=-\frac{\pi}{2},$$ $$x=b\implies \frac{b-a}{2}\sin t_2=\frac{b-a}{2}\implies t_2=\frac{\pi}{2}$$ It follows \begin{align*} \int_a^b\frac{\mathrm d x}{\sqrt{(b-x)(x-a)}}&=\int_{-\pi/2}^{\pi/2}\frac{\frac{b-a}{2}\cos t \,\mathrm dt}{\frac{b-a}{2}\cos t}\\ &=\pi \end{align*}

• Thank you very much! What about the second one?
– Xuxu
Nov 12, 2014 at 5:20

Let $u=\dfrac{x-a}{b-a}$ so that $du=\dfrac{dx}{b-a}$. Then \begin{align} \int_a^b\frac{dx}{\sqrt{(b-x)(x-a)}} & = \int_0^1 \frac{du}{\sqrt{u(1-u)}} \\[10pt] & = \int_0^1 u^{\frac 1 2 -1} (1-u)^{\frac 1 2 - 1}\,du \\[10pt] & = B\left( \frac 1 2, \frac 1 2 \right) = \frac{\Gamma\left(\frac 1 2\right)\Gamma\left(\frac 1 2 \right)}{\Gamma\left(\frac 1 2 + \frac 1 2 \right)} = \pi. \end{align}

Use the substitution $x = a\sin^{2}t + b\cos^{2}t$ with assumption $a < b$ to get $$(b - x)(x - a) = (b - a)^{2}\sin^{2}t\cos^{2}t$$ and the limits of integration change to $\pi/2$ and $0$ corresponding to $x = a$ and $x = b$. And finally using $$\frac{dx}{dt} = -2(b - a)\sin t\cos t$$ we get the desired integral as \begin{aligned}I &= \int_{a}^{b}\frac{dx}{\sqrt{(b - x)(x - a)}}\\ &= \int_{0}^{\pi/2}\frac{2(b - a)\sin t\cos t}{(b - a)\sin t\cos t}\,dt\\ &= 2\int_{0}^{\pi/2}dt = \pi\end{aligned}

• Thank you very much! What about the second one?
– Xuxu
Nov 12, 2014 at 5:20
• @user52919: second one seems to be an elliptic integral. I doubt it has an elementary evaluation. Nov 12, 2014 at 5:21
• Lovely answer (+1) : The limit swap works out more straightforwardly if the substitution used is $x = a cos^2 t+b sin^2 t$ Dec 22, 2020 at 21:30