y=cos^2x+1/2sin2xy=(1+cos2x)/2+1/2sin2x=1/2(cos2x+sin2x)+1/2=1/2sin(2x+π/4)+1/2所以最大值=1/2+1/2=1最小值=-1/2+1/2=0