\(y'=-2sin2x+2cosx\)
\(y'=0\Rightarrow cosx-sin2x=0\Leftrightarrow cosx\left(1-2sinx\right)=0\)
\(\Rightarrow\left[{}\begin{matrix}cosx=0\\sinx=\frac{1}{2}\end{matrix}\right.\) \(\Rightarrow\left[{}\begin{matrix}x=\frac{\pi}{2}+k\pi\\x=\frac{\pi}{6}+k2\pi\\x=\frac{5\pi}{6}+k2\pi\end{matrix}\right.\)
\(y\left(0\right)=1\) ; \(y\left(\frac{\pi}{6}\right)=\frac{3}{2}\); \(y\left(\frac{\pi}{2}\right)=1\)
\(\Rightarrow y_1=2\) ; \(y_2=1\)