I'm supposed to integrate
pi
∫ (cos nx)(cosx)^2 dx
0
how do i integrate this?
First, use the half angle identity to get rid of the cos^2(x).
$\displaystyle \cos^2{x} = \frac{1}{2}(1+\cos{2x})$
Multiplying this with \cos{nx} will get you
$\displaystyle \frac{1}{2} \int (\cos{nx} + \cos{nx}\cos{2x}) dx$
First one should be easy. For the second one, you can use either integration by parts or the product to sum identity:
$\displaystyle \cos{a}\cos{b} = \frac{1}{2}(\cos{(a-b)}+\cos{(a+b)})$