<s>[INST] Calculating the Integral for the Brachistochrone Problem I am trying to prove that the shortest possible time of descent in the Brachistochrone problem is:
$$ T = \sqrt\frac{c_1}{2g} \theta_1 $$
I have the following 2 parametric equations:
$$ x = \frac{c_1}{2} (\theta - \sin\theta) \qquad y = \frac{c_1}{2} (1 - \cos\theta) $$
Solving $$ \frac{dx}{d\theta} = \frac{c_1}{2} (1-\cos\theta) \qquad \frac{dy}{d\theta} = \frac{c_1}{2} (\sin\theta) $$
I know that $$ T = \int_0^{x_1} \frac{\sqrt{1 + (y')^2}}{\sqrt{2gy}} dx  \tag{1} $$
Now solve $$y' = \frac{dy}{dx} = \frac{dy / d\theta}{ dx / d\theta } = \frac{\sin\theta}{1-\cos\theta} $$
Therefore $$ (y')^2  = \frac{\sin^2\theta}{(1-\cos\theta)^2} = \frac{1+\cos\theta}{1-\cos\theta} $$
Now plugging everything back into \ref{1} and putting the integral in terms of $\theta$:
$$T = \int_0^{\theta_1} \frac{\sqrt{1 + \frac{1+\cos\theta}{1-\cos\theta}}}{\sqrt{2g\frac{c_1}{2} (1 - \cos\theta)}} \frac{c_1}{2} (1-\cos\theta) d\theta$$
I tried solving this integral but I am having a hard time with it. I would appreciate some guidance on how to tackle this integral.
 [/INST] I did not check your calculations, but there are a few things which make the problem simpler
$$\sqrt{1+\frac{1+\cos (\theta)}{1-\cos (\theta)}}=\csc \left(\frac{\theta}{2}\right)$$ Simplifying,we have
$$I=\frac 12 \sqrt{\frac{c_1}{g}}\int \csc \left(\frac{\theta}{2}\right)\sqrt{1-\cos (\theta)} \,d\theta=\frac 12 \sqrt{\frac{c_1}{g}}\int \csc \left(\frac{\theta}{2}\right) \sqrt{2 \sin ^2\left(\frac{\theta}{2}\right) }\,d\theta$$
$$I=\sqrt{\frac{c}{2 g}} \int d\theta=\sqrt{\frac{c}{2 g}}\, \theta$$
</s>