integrate (sin(w*t))^2 dt from 0 to 2pi/w