integrate using midpoint method sin^2(x) from -pi to pi