#int cos^n x dx=(1/n)cos^(n-1)x sin x + (n-1)/n int cos^(n-2)x dx#.
To derive the reduction formula, rewrite #cos^n x# as #cos x cos^(n-1)x# and then integrate by parts.
Let #I_n# denote #int cos^n x dx#
#I_n=sin x cos^(n-1)x - int (sin x )(n-1)cos^(n-1)x(-sin x)dx#
followed by using #sin^2x=1-cos^2x# to get the #sin^2# back to a cosine
But this gives you #(n-1)int cos^nx dx# somewhere on the right:
#I_n=sin x cos^(n-1)x + (n-1)I_(n-2)-(n-1)I_n#.
Do not panic that you appear to have got back to #I_n#! All you need to do is cancel the #I_n#s and move the #-nI_n# to the left hand side:
#n int cos^n x dx=sin x cos^(n-1)x + (n-1) int cos^(n-2)x dx# .
Dividing through by #n# gives the reduction formula.
For any particular small positive value of #n# you can apply this repeatedly to get down to the integral either of #1# or of #cos x#.