偶函数则sin(1/2*x+w)=sin(-1/2*x+w)恒成立
则1/2x+w=-1/2*x+w+2kπ或1/2x+w=-(-1/2*x+w)+2kπ+π
1/2x+w=-1/2*x+w+2kπ
x=2kπ,不是恒成立
1/2x+w=-(-1/2*x+w)+2kπ+π
1/2x+w=1/2*x-w+2kπ+π
w=kπ+π/2
所以w=kπ+π/2,k是整数
偶函数则sin(1/2*x+w)=sin(-1/2*x+w)恒成立
则1/2x+w=-1/2*x+w+2kπ或1/2x+w=-(-1/2*x+w)+2kπ+π
1/2x+w=-1/2*x+w+2kπ
x=2kπ,不是恒成立
1/2x+w=-(-1/2*x+w)+2kπ+π
1/2x+w=1/2*x-w+2kπ+π
w=kπ+π/2
所以w=kπ+π/2,k是整数