<s>[INST] how to evaluate $\int_0^{\frac{\pi}{2}}\frac{1}{\sqrt{\sin x}}\text{d}x$ I was solving a physics problem and eventually the problem boiled down to solving the following integral:
$$\int_0^{\frac{\pi}{2}}\frac{1}{\sqrt{\sin x}}\text{d}x$$
I have already tried substitutions like $\sin x=t^2$ , $\sin x=t$ and have tried using the properties of definite integrals given on http://www.sosmath.com/calculus/integ/integ02/integ02.html but I could not solve this integral. Please help!
 [/INST] $$
\begin{aligned}
\int_0^{\frac{\pi}{2}} \frac{d x}{\sqrt{\sin x}} & =\int_0^{\frac{\pi}{2}} \sin ^{2\left(\frac{1}{4}\right)-1 }\theta \cos^{ 2\left(\frac{1}{2}\right)-1 }\theta d\theta\\
& =\frac{1}{2} B\left(\frac{1}{4}, \frac{1}{2}\right) \\
& =\frac{1}{2} \cdot \frac{\Gamma\left(\frac{1}{4}\right) \Gamma\left(\frac{1}{2}\right)}{\Gamma\left(\frac{3}{4}\right)} \\
& =\frac{\sqrt{\pi}}{2} \cdot \frac{\Gamma\left(\frac{1}{4}\right) \cdot \Gamma\left(\frac{1}{4}\right)}{\Gamma\left(\frac{3}{4}\right) \cdot \Gamma\left(\frac{1}{4}\right)} \\
& =\frac{\sqrt{\pi}}{2} \cdot \frac{\Gamma^2\left(\frac{1}{4}\right)}{\pi \csc \left(\frac{\pi}{4}\right)} \\
& =\frac{1}{2 \sqrt{2 \pi}} \Gamma^2\left(\frac{1}{4}\right)
\end{aligned}
$$
where the last step comes from the reflection property of Gamma function.
</s>