solve cos(x) = 0 for x between 0 and pi