How would one go about solving $\int_{0}^{\pi/2} \sqrt{\cos(x)} dx$? Why does the gamma function show up in the answer? Wolfram Alpha says the answer is $\sqrt{\frac{2}{\pi}} \Gamma(\frac{3}{4})^2$, but that just seems so strange. How does an integral with finite bounds relate to a function where one of the bounds is infinity? How would you go about solving this? Any and all help is greatly appreciated!
 A: Substituting $u=\sqrt{\cos(x)}$ and $v=u^4$ gives
$$ \int_0^{\pi/2}\sqrt{\cos(x)}dx=\int_0^1\frac{2u^2}{\sqrt{1-u^4}}du=\frac{1}{2}\int_0^1\frac{v^{-1/4}}{\sqrt{1-v}}dv=\frac{1}{2}\beta\left(\frac{3}{4},\frac{1}{2}\right)=\frac{\Gamma\left(\frac{3}{4}\right)\Gamma\left(\frac{1}{2}\right)}{2\Gamma\left(\frac{5}{4}\right)} $$
But $\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$ and $\Gamma\left(\frac{5}{4}\right)\Gamma\left(\frac{3}{4}\right)=\frac{\Gamma\left(\frac{3}{2}\right)}{\sqrt{2}}=\frac{1}{2}\sqrt{\frac{\pi}{2}}$ because of $\Gamma(s)\Gamma\left(s+\frac{1}{2}\right)=2^{1-2s}\Gamma(2s)$ so that
$$ \int_0^{\pi/2}\sqrt{\cos(x)}dx=\sqrt{\frac{2}{\pi}}\Gamma^2\left(\frac{3}{4}\right)$$
A: Comments have already pointed to the identity$$\int_0^{\pi/2}\cos^{2a-1}x\sin^{2b-1}xdx=\frac12B(a,\,b)=\frac{\Gamma(a)\Gamma(b)}{2\Gamma(a+b)},$$so the given integral is$$\frac{\Gamma(1/2)\Gamma(3/4)}{2\Gamma(5/4)}=\frac{2\sqrt{\pi}\Gamma^2(3/4)}{\Gamma(1/4)\Gamma(3/4)}.$$I've inserted redundant factors of $\Gamma(3/4)$ so we can use the Gamma function's reflection formula:$$\Gamma(s)\Gamma(1-s)=\pi\csc\pi s\implies\Gamma(1/4)\Gamma(3/4)=\pi\sqrt{2}.$$(@Tuvasbien uses an alternative approach, the Legendre duplication formula.) So the integral is $\sqrt{\frac{2}{\pi}}\Gamma^2(3/4)$, as claimed.
