Rewrite the function:
\[
\int \sin ^5 x d x=\int \sin x \sin ^4 x d x=\int \sin x\left(\sin ^2 x\right)^2 d x=\int \sin x\left(1-\cos ^2 x\right)^2 d x
\]
Now use \(u=\cos x, d u=-\sin x d x\) :
\[
\begin{aligned}
\int \sin x\left(1-\cos ^2 x\right)^2 d x &=\int-\left(1-u^2\right)^2 d u \\
&=\int-\left(1-2 u^2+u^4\right) d u \\
&=-u+\frac{2}{3} u^3-\frac{1}{5} u^5+C \\
&=-\cos x+\frac{2}{3} \cos ^3 x-\frac{1}{5} \cos ^5 x+C .
\end{aligned}
\]