y=(sinx)^2+ 2√3sinxcosx+3(cosx)^2
=(1-cos2x)/2+√3sin2x+3(1+cos2x)/2
=cos2x+√3sin2x+2
=2sin(2x+π/6)+2
ymax=4
2x+π/6=2kπ+π/2 ,x=kπ+π/3
y=(sinx)^2+ 2√3sinxcosx+3(cosx)^2
=(1-cos2x)/2+√3sin2x+3(1+cos2x)/2
=cos2x+√3sin2x+2
=2sin(2x+π/6)+2
ymax=4
2x+π/6=2kπ+π/2 ,x=kπ+π/3