f(x)=-√3sinx+cosx=-2[sinxcosπ/6-cosxsinπ/6]=-2sin(x-π/6)
∵-π/2≤x≤π/2
∴-2π/3≤x-π/6≤π/3
∴-1≤sin(x-π/6)≤√3/2
即-√3≤f(x)≤2
即值域为[-√3,2]
f(x)=-√3sinx+cosx=-2[sinxcosπ/6-cosxsinπ/6]=-2sin(x-π/6)
∵-π/2≤x≤π/2
∴-2π/3≤x-π/6≤π/3
∴-1≤sin(x-π/6)≤√3/2
即-√3≤f(x)≤2
即值域为[-√3,2]