TITLE: Integral of $\int_0^{\pi/2} \ (\sin x)^7\ (\cos x)^5 \mathrm{d} x$
QUESTION [8 upvotes]: I am trying to find this by using integration by parts but I am not sure how to do it.
$$\int_0^{\pi/2}  (\sin x)^7 (\cos x)^5 \mathrm{d} x$$
I tried rewriting as 
$$\int_0^{\pi/2} \sin x\cdot\ (\sin x)^6\cdot\ (\cos x)^5 \mathrm{d} x = \int_0^{\pi/2}\sin x(1-\ (\cos x)^3)\cdot\ (\cos x)^5 \mathrm{d} x$$
but that seems to only give me a very, very long loop that doesn't help me at all. How do I proceed?
$$\int_0^{\pi/2} \sin x\cdot (\sin x)^6\cdot (\cos x)^5 \mathrm{d} x = \sin x(1- (\cos x)^3)\cdot (\cos x)^5 \mathrm{d} x$$
$u = \cos x$, then $du = -\sin xdx$
$\int \frac{-u^6}{6} \mathrm{d} u - \int \frac{-u^9}{9} \mathrm{d} u$
From here it looks like I have an incredibly long string of $u$ substitutions to make to get to something I can find an antiderivative for.

REPLY [2 votes]: I'm going to expand on Valentin's answer:
$$I(a,b)=\int_0^{\pi/2}\sin^ax\ \cos^bx\ dx$$
$t=\sin^2x$:
$\therefore dt=2\sin x\cos x\ dx\\\therefore dx=\frac12t^{-1/2}(1-t)^{-1/2}dt\\\therefore x=0\mapsto t=0\\\therefore x=\pi/2\mapsto t=1$
$$I(a,b)=\int_0^1 t^{a/2}(1-t)^{b/2}\frac12t^{-1/2}(1-t)^{-1/2}dt$$
$$I(a,b)=\frac12\int_0^1 t^{\frac{a-1}2}(1-t)^{\frac{b-1}2}dt$$
$$I(a,b)=\frac12\int_0^1 t^{\frac{a+1}2-1}(1-t)^{\frac{b+1}2-1}dt$$
Note the definition of the Beta function:
$$B(a,b)=\int_0^1t^{a-1}(1-t)^{b-1}dt=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}=B(b,a)$$
Thus
$$I(a,b)=\frac{\Gamma(\frac{a+1}2)\Gamma(\frac{b+1}2)}{2\Gamma(\frac{a+b}2+1)}=I(b,a)$$