y=cos2x-cosx+3
=2cosx^2-1-cosx+3
=2cosx^2-cosx+2
=2(cosx-1/4)^2+2-1/8
=2(cosx-1/4)^2+17/8
因为-1≤cosx≤1
所以当cosx=1/4时有最小值17/8