OM=(1+cos2x,1)
ON=(1,√3sin2x+a)
y=1+cos2x+√3sin2x+a
=2sin(2x+π/3)+a+1
当0≤x≤π/2时,
π/3≤2x+π/3≤4π/3
-√3/2≤sin(2x+π/3)≤1
2+a+1=4
所以a=1
f(x)=2sin(2x+π/3)+2
y=2sin(x+π/6)
→周期变换为原来的一半→y=2sin(2x+π/6)
→左移π/12→y=2sin(2(x+π/12)+π/6)=2sin(2x+π/3)
→上移2个单位→y=2sin(x+π/6)+2即为f(x)