\(y=1-cos2x+cos^22x=\left(cos2x-\frac{1}{2}\right)^2+\frac{3}{4}\ge\frac{3}{4}\)
\(\Rightarrow y_{min}=\frac{3}{4}\) khi \(cos2x=\frac{1}{2}\)
\(y=3+cos^22x-cos2x-2=3+\left(cos2x+1\right)\left(cos2x-2\right)\)
Do \(\left\{{}\begin{matrix}cos2x+1\ge0\\cos2x-2< 0\end{matrix}\right.\) \(\Rightarrow\left(cos2x+1\right)\left(cos2x-2\right)\le0\)
\(\Rightarrow y\le3\Rightarrow y_{max}=3\) khi \(cos2x=-1\)