integrate 1/[1 + A*sin theta + B*cos theta] dtheta