f(x)=1+2根号3sinxcosx-2sin²x
=根号3sin2x+cos2x
=2(根号3/2sin2x+1/2cos2x)
=2(cosπ/6sin2x+sinπ/6cos2x)
=2sin(2x+π/6)
把f(x)向右平移π/6个单位得到函数g(x)
g(x)=f(x-π/6)=2sin(2(x-π/6)+π/6)=2sin(2x-π/6)
g(X)所在区间[-π/2,0] x∈[-π/2,0]
2x-π/6∈[-7π/6,-π/6]
sin(2x-π/6)∈[-1,1/2]
故g(X)所在区间[-π/2,0]上的最大值为1,最小值为-2