Evaluating $\int_{\theta_0}^{\pi} \frac{d(\cos\theta)}{\sqrt{(\cos\theta_0-\cos\theta)(1+\cos\theta)}}.$

After making the substitutions $\cos(\theta)= x$ and $\cos(\theta_0)=x_0$, we have for $0<\theta_0<\pi$ and $-1<x<x_0$

$$\int_{\theta_0}^\pi \sqrt{\frac{1-\cos(\theta)}{\cos(\theta_0)-\cos(\theta)}}\,d\theta=\int_{-1}^{x_0}\sqrt{\frac{1}{(x_0-x)(1+x)}}\,dx$$

The integrand has square root singularities at $-1$ and $x_0$, and the integral exists as both an improper Riemann integral and a Lebesgue integral.


We first restrict the angle $\theta$ in the range, $0<\theta_0<\theta<\pi, $ then rewrite the integral by double-angle formula $$1-\cos \theta=2\sin^2 \frac{\theta}{2} \text{ and } 1+\cos \theta=2\cos^2 \frac{\theta}{2} ,$$

\begin{aligned} & I=\int_{\theta_{0}}^{\pi} \sqrt{\frac{1-\cos \theta}{\cos \theta_{0}-\cos \theta}} d \theta = \int_{\theta_{0}}^{\pi} \frac{\sqrt{2 \sin ^{2} \frac{\theta}{2}}}{\sqrt{\cos \theta_{0}-\cos \theta}} d \theta =\sqrt{2} \int_{\theta_{0}}^{\pi} \frac{\sin \frac{\theta}{2} d \theta}{\sqrt{\cos \theta_{0}-\left(2 \cos^2 \frac{\theta}{2}-1\right)}} \end{aligned}

Putting $y=\cos \dfrac{\theta}{2}$ yields \begin{aligned} I &=-2 \int_{\cos \frac{\theta_{0}}{2}}^{0} \frac{d y}{\sqrt{\cos ^{2} \frac{\theta_{0}}{2}-y^{2}}} \\ &=2\left[\sin ^{-1}\left(\frac{y}{\cos \frac{\theta_{0}}{2}}\right)\right]_{0}^{\cos \frac{\theta_{0}}{2}} \\ &=2 \sin ^{-1}(1) \\ &=\pi, \end{aligned} which is surprisingly independent of $\theta_0$.


Spectree’s step is correct and can be carried on as follows:

$$\begin{aligned}\int_{\theta_0}^{\pi} \sqrt{\frac{1-\cos\theta}{\cos\theta_0-\cos\theta}} d\theta &= - \int_{\theta_0}^{\pi} \frac{d(\cos\theta)}{\sqrt{(\cos\theta_0-\cos\theta)(1+\cos\theta)}}\\ &\stackrel{y=\cos \theta}{=} -\int_{a}^{-1} \frac{d y}{\sqrt{a-(1-a) y-y^{2}}}, \text{ where }a=\cos \theta_{0}. \\&=\int_{-1}^{a} \frac{d y}{\sqrt{\left(\frac{1+a}{2}\right)^{2}-\left(y+\frac{1-a}{2}\right)^{2}}} \\&=\left[\sin ^{-1}\left(\frac{y+\frac{1-a}{2}}{\frac{1+a}{2}}\right)\right]_{-1}^{a}\\&=\pi, \end{aligned}$$ which is certainly independent of $\theta_{0}.$ $$\text{********}\tag*{} $$ Alternate method: $$ \begin{aligned} I &=-\int_{a}^{-1} \frac{d y}{\sqrt{a-y} \sqrt{1+y}} \\ &=-2 \int_{a}^{-1} \frac{1}{\sqrt{a-y}} d(\sqrt{1+y}) \\ &=-2 \int_{a}^{-1} \frac{1}{\sqrt{a+1-(\sqrt{1+y})^{2}}} d(\sqrt{1+y}) \\ &=2\left[\sin ^{-1}\left(\frac{\sqrt{1+y}}{\sqrt{a+1}}\right)\right]_{-1}^{a}\\ &=\pi \end{aligned} $$