Explanation:
f'(x)=-2sin(x)+2cos(2x)=0
as cos(2x)=2sin(x)cos(x),
-2sin(x)+4cos(x)sin(x)=0
sin(x)-2cos(x)sin(x)=0
(sin(x))(1-2cos(x))=0
-> x = 0, pi/3
testing these values along with the end points of the interval,
f(0)=2
f(pi/3)=1+(0.5sqrt(3))
f(pi/2)=0
so the min is 0 and the max is 2.