Solve cos x = sin(2x) on [0, 2pi)