integrate cos x from -pi to pi