y=1-(cos)^2+cosx+3
=-(cosx)^2+cosx+4
=-[(cosx-1/2)^2-1/4]+4
=-(cosx-1/2)^2+17/4
当cosx=1/2 x=2kπ±π/3时,y取得最大值17/4