Prove that: $\int (\cos x)^{2n} \, dx = \frac{\sin x (\cos x)^{2n-1}}{2n} + \frac{2n-1}{2n} \int (\cos x)^{2n-2} \, dx$

Prove that: $$ \int (\cos x)^{2n} \, dx = \frac{\sin x (\cos x)^{2n-1}}{2n} + \frac{2n-1}{2n} \int (\cos x)^{2n-2} \, dx $$


Let $u = (\cos x)^{2n-1}$, $dv = \cos x \, dx$. Then $du = -(2n-1)(\cos x)^{2n-2} \sin x dx$, $v = \sin x$ and we obtain by the integration by parts formula \begin{align} \int (\cos x)^{2n} \ dx & = \sin x (\cos x)^{2n-1} + (2n-1) \int (\cos x)^{2n-2} (\sin x)^2 \ dx \\ & = \sin x (\cos x)^{2n-1} + (2n-1) \int (\cos x)^{2n-2} (1-(\cos x)^2) \ dx \\ & = \sin x (\cos x)^{2n-1} + (2n-1) \int (\cos x)^{2n-2} \ dx - (2n-1) \int (\cos x)^{2n} \ dx \\ \end{align} By putting the last integral on the RHS to the LHS, we obtain $$ 2n \int (\cos x)^{2n} \ dx = \sin x (\cos x)^{2n-1} + (2n-1) \int (\cos x)^{2n-2} \ dx \\\ $$ and by dividing by $2n$ we obtain the desired identity.

It's a very classical trick ; it is repeated several times for powers of $\sin$, $\cos$, $\tan$, $\sec$, $\csc$ and $\cot$ : they are called recursion formulas for integrals. You should really learn to try it out for powers of other trigonometric functions. Also, instead of $2n$, you could've just put $k \ge 2$ ; it also works. I never used in my proof the fact that the exponent of $\cos$ was even, I only used the fact that $2n-2 \ge 0$, or in other words, that $k \ge 2$ ; but the cases $k=1$ and $k=0$ are obvious, so this formula is not needed in those cases.

Hope that helps,