Prove that $\int_{0}^{\frac{\pi}{2}}(\sin x)^ndx = \int_{0}^{\frac{\pi}{2}}(\cos x)^ndx $

150 Views Asked by At

Prove that

$$\int_{0}^{\frac{\pi}{2}}(\sin x)^ndx = \int_{0}^{\frac{\pi}{2}}(\cos x)^ndx.$$

My work.

Let's consider: $x = \frac{\pi}{2}-x$

So

$$-\int_{0}^{\frac{\pi}{2}}\left(\sin\left(\frac{\pi}{2}-x\right)\right)^{n}dx=- \int _{0}^{\frac{\pi}{2}}(\cos x)^ndx.$$

What did wrong that I am getting with $-$?

2

There are 2 best solutions below

0
On

Consider $\mathcal{I}=\int_0^{\pi/2} (\sin x)^n\mathrm dx$, Substitute $x=\frac{\pi}{2}-u$. Then $\mathrm du=-\mathrm dx$. When $x=0$, $u=\pi/2$ and when $x=\pi/2$, then $u=0$, so we get: $\mathcal{I}=\int_{\pi/2}^0 (\cos u)^n(-\mathrm du)=\int_0^{\pi/2}(\cos x)^n\mathrm dx$.

0
On

Alternatively, using Beta function, $$\int_0^{\pi/2}\cos^n x\, \mathrm dx=\frac{1}{2}B\bigg(\frac{1}{2},\frac{n+1}{n}\bigg)$$ and $$\int_0^{\pi/2}\sin^n x\, \mathrm dx=\frac{1}{2}B\bigg(\frac{n+1}{2},\frac{1}{2}\bigg)$$ Using the relation between Beta and Gamma Function, both can be shown to be equal to: $$\frac{2\sqrt{\pi}\,\Gamma\bigg(\frac{n+1}{2}\bigg)}{n\, \Gamma\bigg(\frac{n}{2}+1\bigg)}$$ Reference: https://en.wikipedia.org/wiki/Beta_function