y=根号3×sinx+cosx
=2[(√3/2)sinx+(1/2)cosx]
=2sin(x+π/6)
因x∈[-π/2,π/2]
x+π/6∈[-π/3,2π/3]
所以sin(x+π/6)=1
y最大=2