# Integration of powers of the $\sin x$

I have to evalute $$\int_0^{\frac{\pi}{2}}(\sin x)^z\ dx.$$ I put this integral in Wolfram Alpha, and the result is $$\frac{\sqrt{\pi}\Gamma\left(\frac{z+1}{2}\right)}{2\Gamma\left(\frac{z}{2}+1\right)},$$ but I don't know why. If $z$ is a positive integer, then one can do integration by parts, many times. Eventually, this yields $$\int_0^{\frac{\pi}{2}}(\sin x)^{2z}\ dx=\frac{(2z-1)!!}{(2z)!!}\frac{\pi}{2},$$ where $(2n-1)!!=1\cdot 3\cdots (2n-1)$, and $(2n)!!=2\cdot 4\cdots 2n$. I appreciate your help.

-
Did you look at the Wikipedia page on the Gamma-function? Everything you need for solving this problem is there. –  t.b. Jul 9 '11 at 3:53
Beta-function... –  Andrew Jul 9 '11 at 5:41
Yeah, of course. That is the thing. Thank you :) –  leo Jul 9 '11 at 5:51
This is too easy for to be a post. Should I delete this post? What do you think @Theo and @Andrew? –  leo Jul 9 '11 at 5:58
@leo: I don't think you should delete it. Why don't you write up your own solution and post them as an answer? If you ping me, I'll have a look. –  t.b. Jul 9 '11 at 8:26

The answer provided by Leo is the first one that comes to mind, but here is one starting directly from the definition of $\Gamma(s)$.

From the definition of Gamma:

Consider

$$\Gamma(s)\Gamma(z)=\int_{0}^{\infty}\int_{0}^{\infty}t^{s-1}u^{z-1}e^{-(t+u)}dtdu.$$

Let $t=x^{2}$, $u=y^{2}$. Then we have

$$\Gamma(s)\Gamma(z)=4\int_{0}^{\infty}\int_{0}^{\infty}x^{2s-1}y^{2z-1}e^{-(x^{2}+y^{2})}dtdu.$$

Change to polar coordinates and set $y=r\sin\theta$, $x=r\cos\theta$, to get

$$\Gamma(s)\Gamma(z)=4\left(\int_{0}^{\pi/2}\cos^{2s-1}\theta\sin^{2z-1}\theta d\theta\right)\left(\int_{0}^{\infty}r^{2s+2z-1}e^{-r^{2}}dr\right).$$

Letting $\eta=r^{2}$ we get

$$2\int_{0}^{\infty}r^{2s+2z-1}e^{-r^{2}}dr=\int_{0}^{\infty}\eta^{s+z-1}e^{-\eta}d\eta=\Gamma(s+z).$$

Hence

$$\frac{\Gamma(s)\Gamma(z)}{\Gamma(s+z)}=2\left(\int_{0}^{\pi/2}\cos^{2s-1}\theta \sin^{2z-1}\theta d\theta\right).$$

Setting $s=\frac{1}{2}$ and $z=\frac{x+1}{2}$ then yields your identity.

Hope that helps,

-
That's nice, as usual when you're manipulating these functions! –  t.b. Jul 10 '11 at 1:39
Nice one @Eric. –  leo Jul 10 '11 at 6:05

Just, following the Theo's hint \begin{align*} \int_{0}^{\frac{\pi}{2}}{(\sin\psi)^x}d\psi&= \int_{0}^{\frac{\pi}{2}}{(\sin\psi)^{2\cdot \frac{1}{2}(x+1)-1}(\cos\psi)^{2\cdot \frac{1}{2}-1}}d\psi\\ &=\frac{1}{2}B\left( \frac{x+1}{2},\frac{1}{2} \right)\\ &= \frac{1}{2}\cdot \frac{\Gamma\left(\frac{x+1}{2}\right)\Gamma\left(\frac{1}{2}\right)}{\Gamma\left( \frac{x}{2}+1 \right)}\\ &=\frac{\sqrt{\pi}\Gamma\left(\frac{x+1}{2}\right)}{2\Gamma\left( \frac{x}{2}+1 \right)}. \end{align*}

-
Well, that's it (assuming that you understood all the identities you used). Also, have you verified that this is what you already knew in the case where $x$ is an integer? –  t.b. Jul 10 '11 at 0:24
yep, and thaks @Theo. –  leo Jul 10 '11 at 6:05