integral of cos^2(n pi x) dx between 0 and 1