Integrate[
      2 π/w (Cos[-w t] - Cos[k a - w t])^2, {t, 0, 
        2 π/w}]

Integrate[Cos[-w t]^2, {t, 0, 2 π/w}]

Integrate[Cos[k a - w t]^2, {t, 0, 2 π/w}]

Integrate[
      2 Cos[-w t] Cos[k a - w t], {t, 0, 2 π/w}]