f(x)=sin²x+cosx-0.5
= 1-cos²x+cosx-0.5
= -cos²x+cosx + 0.5
= -(cosx-0.5)² + 0.75
当cosx=0.5时
f(x﹚取最大值= -(0.5-0.5)² + 0.75
最大值是0.75
f(x)=sin²x+cosx-0.5
= 1-cos²x+cosx-0.5
= -cos²x+cosx + 0.5
= -(cosx-0.5)² + 0.75
当cosx=0.5时
f(x﹚取最大值= -(0.5-0.5)² + 0.75
最大值是0.75