Integral of cos^2(ax)