Answer
$$\int \cos ^{n} x d x=\frac{\cos ^{n-1} x \sin x}{n}+\frac{n-1}{n} \int \cos ^{n-2} x d x$$
Work Step by Step
Given
$$\int \cos ^{n} x d x$$
Since
$$\int \cos ^{n-1} x\cos x d x$$
Use integration by parts , let
\begin{aligned}
u&=\cos ^{n-1} x \ \ \ \ \ \ \ \ \ &dv&= \cos x d x\\
du&=-(n-1)\cos ^{n-2} x\sin x \ \ \ \ \ \ \ \ \ & v&=\sin x
\end{aligned}
Then
\begin{aligned}
\int \cos ^{n-1} x\cos x d x &= \cos^{n-1}x\sin x +(n-1)\int \cos^{n-2}x\sin^2 xdx\\
&= \cos^{n-1}x\sin x +(n-1)\int \cos^{n-2}x(1-\cos^2 x)dx\\
&= \cos^{n-1}x\sin x +(n-1)\int \cos^{n-2}xdx+ (n-1)\int\cos^n xdx\\
n\int \cos ^{n-1} x\cos x d x &=\cos^{n-1}x\sin x +(n-1)\int \cos^{n-2}xdx\\
\int \cos ^{n-1} x\cos x d x&= \frac{\cos ^{n-1} x \sin x}{n}+\frac{n-1}{n} \int \cos ^{n-2} x d x
\end{aligned}