How to calculate $\int_0^{\pi/2} \sin^a x \cos^b x \,\mathrm{d} x$

$$\int_0^{\pi/2} \sin^a x \cos^b x \,\mathrm{d} x = \frac{\Gamma\left(\frac{1+a}{2}\right)\Gamma\left(\frac{1+b}{2}\right)}{2 \Gamma\left(1 + \frac{a + b}{2}\right)} \quad\quad\text{for } a, b > -1$$ according to Mathematica. Wikipedia also lists a recursive expression for the indefinite integral when $$a, b > 0$$. My question is how to derive the explicit formula given by Mathematica (preferably without using esoteric special functions, but complex analysis is fine).

• After a suitable change of variable, LHS can be written as the beta function. Then use the relationship between gamma function and beta function. I don't know if there is a direct way to prove this. – Eclipse Sun Dec 10 '18 at 17:35
• @grand_chat I don't think that this question is a duplicate of the one you indicate, as that question assumes that $a,b\in\mathbb{Z}$, which significantly simplifies matters. – Xander Henderson Dec 10 '18 at 20:25
• @XanderHenderson Yeah, I realized that as I looked more closely. How does one revoke a vote to close? – grand_chat Dec 10 '18 at 21:37
• Click on the "close (1)" link. Near the bottom, there is a button to retract your vote. @grand_chat – Xander Henderson Dec 10 '18 at 22:21

Okay first of all we make the substitution $$t=\sin^2x$$. Thus the integral becomes $$\frac12\int_0^1t^{\frac{a-1}2}(1-t)^{\frac{b-1}2}\mathrm dt=\frac12\int_0^1t^{\frac{a+1}2-1}(1-t)^{\frac{b+1}2-1}\mathrm dt$$ Then we recall the definition of the Beta function: $$B(x,y)=\int_0^1t^{x-1}(1-t)^{y-1}\mathrm dt=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$$ So we have our integral at $$\frac{\Gamma(\frac{a+1}2)\Gamma(\frac{b+1}2)}{2\Gamma(\frac{a+b}2+1)}$$