y=(sinx)^2+sinxcosx+3(cosx)^2
=2(cosx)^2+(1/2)sin2x+1
=(1/2)sin2x+cos2x+2
=(√5/2)sin(2x+p)+2
最大值是2+√5/2,最小值是2-√5/2.