f(x)=1-2sin²x+2cosx
=1-2(1-cos²x)+2cosx
=2cos²x+2cosx-1
=2(cosx+1/2)²-3/2.
∴cosx=-1/2时,f(x)|min=-3/2;
cosx=1时,f(x)|max=3.