Answer
$$ \frac{1}{n+1}$$
Work Step by Step
Given
$$\int_{0}^{\pi / 2} \sin ^{n} x \cos x d x$$
For $n=0$
$$\int_{0}^{\pi / 2} \sin ^{n} x \cos x d x=\int_{0}^{\pi / 2} \cos x d x=\sin x \bigg|_{0}^{\pi/2}=1 $$
For n$\gt0$, let
$$ u=\sin x \ \ \ \Rightarrow \ \ \ du = \cos x dx$$
At $$ x= 0 \to u= 0, \ \ x= \pi/2\to u= 1$$
Then
\begin{aligned} \int_{0}^{\pi / 2} \sin ^{n} x \cos x d x &=\int_{0}^{1} u^{n} d u \\ &=\left.\frac{u^{n+1}}{n+1}\right|_{0} ^{1} \\ &=\frac{1}{n+1} \end{aligned}