\(y=-sin^2x-cosx+2 \\=cos^2x-cosx+1=(cosx-\dfrac{1}{2})^2+\dfrac{3}{4}\ge\dfrac{3}{4} \\Đẳng\ thức\ xảy\ ra\ khi\ x=\dfrac{\pi}{3}+2k\pi\ (k\ nguyên) \\Vậy\ Miny=\dfrac{3}{4}\ (khi\ x=\dfrac{\pi}{3}+2k\pi\ (k\ nguyên)) \\y=-sin^2x-cosx+2 \\=cos^2x-cosx+1\le1-(-1)+1=3 \\Đẳng\ thức\ xảy\ ra\ khi\ x=\pi+2k\pi\ (k\ nguyên) \\Vậy\ Maxy=3\ (khi\ x=\pi+2k\pi\ (k\ nguyên)).\)