f(x)=sqrt(3)sin2x-2sinx^2=sqrt(3)sin2x+cos2x-1=2sin(2x+π/6)-1
因为-π/6≤x≤π/3,所以-π/6≤2x+π/6≤5π/6
当2x+π/6=-π/6,即x=-π/6时,f(x)取得最小值:2*(-1/2)-1=-2
当2x+π/6=π/2,即x=π/6时,f(x)取得最大值:2*1-1=1
所以f(x)的值域:[-2,1]
f(x)=sqrt(3)sin2x-2sinx^2=sqrt(3)sin2x+cos2x-1=2sin(2x+π/6)-1
因为-π/6≤x≤π/3,所以-π/6≤2x+π/6≤5π/6
当2x+π/6=-π/6,即x=-π/6时,f(x)取得最小值:2*(-1/2)-1=-2
当2x+π/6=π/2,即x=π/6时,f(x)取得最大值:2*1-1=1
所以f(x)的值域:[-2,1]