integral of cos(x/2) from pi to 3*pi