How do you integrate the reciprocal of square root of cosine? I encountered this integral in physics and got stuck. 
$$\int_{0}^{\Large\frac{\pi}{2}} \dfrac{d\theta}{\sqrt{\cos \theta}}.$$  
 A: Another approach:
Consider Beta function
$$
\text{B}(x,y)=2\int_0^{\Large\frac\pi2}(\sin\theta)^{2x-1}(\cos\theta)^{2y-1}\ d\theta=\frac{\Gamma(x)\cdot\Gamma(y)}{\Gamma(x+y)}.
$$
Rewrite
$$
\int_0^{\Large\frac\pi2}\frac{d\theta}{\sqrt{\cos\theta}}=\frac12\cdot2\int_0^{\Large\frac\pi2}\cos^{\Large-\frac12}\theta\ d\theta,
$$
then
\begin{align}
\int_0^{\Large\frac\pi2}\frac{d\theta}{\sqrt{\cos\theta}}&=\frac12\cdot\frac{\Gamma\left(\dfrac12\right)\cdot\Gamma\left(\dfrac14\right)}{\Gamma\left(\dfrac34\right)}\\
&=\frac12\cdot\frac{\sqrt{\pi}\cdot\Gamma^2\left(\dfrac14\right)}{\Gamma\left(\dfrac34\right)\cdot\Gamma\left(\dfrac14\right)}\tag1\\
&=\frac{\sqrt{\pi}}2\cdot\frac{\Gamma^2\left(\dfrac14\right)}{\dfrac{\pi}{\sin\dfrac\pi4}}\tag2\\
&=\color{blue}{\frac{\Gamma^2\left(\dfrac14\right)}{2\sqrt{2\pi}}\approx2.62205755}.
\end{align}

Note :
$\color{red}{(1)}\ \ $ $\Gamma\left(\dfrac12\right)=\sqrt\pi$ and multiply by $\frac{\Gamma\left(\dfrac14\right)}{\Gamma\left(\dfrac14\right)}$
$\color{red}{(2)}\ \ $ Euler's reflection formula for the Gamma function: $\Gamma(z)\cdot\Gamma(1-z)=\dfrac{\pi}{\sin\pi z}$.
A: Gar gave you an answer and I shall provide you other appoaches for the same result. First $$\int \dfrac{d\theta}{\sqrt{\cos \theta}}=2 F\left(\left.\frac{t}{2}\right|2\right)$$ where appears the elliptic integral. So, $$\int_{0}^{\frac{\pi}{2}} \dfrac{d\theta}{\sqrt{\cos \theta}}=\sqrt{2} K\left(\frac{1}{2}\right)$$
Another approach uses Weierstrass substitution and then $$\int_{0}^{\frac{\pi}{2}} \dfrac{d\theta}{\sqrt{\cos \theta}}=\int_{0}^{1} \frac{2\ dt}{\sqrt{1-t^4}}$$ Since $$\int \frac{2\ dt}{\sqrt{1-t^4}}=2 F\left(\left.\sin ^{-1}(t)\right|-1\right)$$ then $$\int_{0}^{1} \frac{2\ dt}{\sqrt{1-t^4}}=\frac{2 \sqrt{\pi } \Gamma \left(\frac{5}{4}\right)}{\Gamma \left(\frac{3}{4}\right)}$$
A: Substituting $y=\cos{\theta}$
\begin{align*}
  \int_{0}^{\frac{\pi}{2}} \dfrac{d\theta}{\sqrt{\cos \theta}} &= \int_{0}^{1} \, \frac{1}{\sqrt{y\, \left(1-y^2\right)}}\, dy \\
  &= \frac{1}{2}\int_{0}^{1} \, t^{-3/4}\left(1-t\right)^{-1/2}\, dt \tag{where $t=y^2$} \\
  &= \frac{1}{2}\mathrm{B}\left(\frac{1}{4}, \frac{1}{2}\right) \\
  &= \frac{\sqrt\pi}{2}\frac{\Gamma\left(1/4\right)}{\Gamma\left(3/4\right)} \approx 2.62205755429212
\end{align*}
Look up Beta and Gamma functions.
