integrate sin^2(kx) dx from 0 to a