How do you solve cos2x=2cosx-1 in the interval [0, 2pi]?