-2cos^2(x)-cosx+a+2=0
y=cosx, [-1,1]
-2y^2-y+a+2=0
a=2y^2+y-2
=2(y+1/4)^2-17/8
a1=-17/8, a2=1
a取值范围[-17/8, 1]