sin^2 X = 1/2 - (1/2)cos(2X))
so f(x) = -1 + cos(2x) + sqrt(3)sin2x + 1
= 2sin(2x+pi/6)
when x belongs to -pi/6,pi/3,
2x + pi/6 belongs to -pi/6 to 5pi/6
fmin = -0.5
fmax = 1
sin^2 X = 1/2 - (1/2)cos(2X))
so f(x) = -1 + cos(2x) + sqrt(3)sin2x + 1
= 2sin(2x+pi/6)
when x belongs to -pi/6,pi/3,
2x + pi/6 belongs to -pi/6 to 5pi/6
fmin = -0.5
fmax = 1