Answer
$$\int \cos ^{n} x d x = \frac{1}{n} \cos^{n-1} x\sin x+\frac{(n-1)}{n} \int \cos^{n-2}x dx$$
Work Step by Step
Given $$ \int \cos ^{n-1} x d x$$
Let
\begin{align*}
u&= \cos^{n-1} x\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ dv=\cos xdx\\
du&= -(n-1)\cos^{n-2}x\sin xdx\ \ \ \ \ \ \ \ \ v=\sin x
\end{align*}
Then
\begin{align*}
\int \cos ^{n} x d x&= \cos^{n-1} x\sin x+(n-1) \int \cos^{n-2}x\sin ^2xdx\\
&= \cos^{n-1} x\sin x+(n-1) \int \cos^{n-2}x(1-\cos ^2x)dx\\
n\int \cos ^{n} x d x&= \cos^{n-1} x\sin x+(n-1) \int \cos^{n-2}x dx\\
\int \cos ^{n} x d x&= \frac{1}{n} \cos^{n-1} x\sin x+\frac{(n-1)}{n} \int \cos^{n-2}x dx\\
\end{align*}