integral of 1/(1+(exp (i x))/2) for x=-pi,pi