a/
\(0\le sin^2x\le1\Rightarrow-2\le f\left(x\right)\le1\)
\(f\left(x\right)_{min}=-2\) khi \(sin^2x=1\)
\(f\left(x\right)_{max}=1\) khi \(sin^2x=1\)
b/
\(g\left(x\right)=1-cos^2x+3cosx-2=-cos^2x+3cosx-1\)
\(=-cos^2x+3cosx-2+1=\left(cosx-1\right)\left(2-cosx\right)+1\)
Do \(-1\le cosx\le1\Rightarrow\left\{{}\begin{matrix}cosx-1\le0\\2-cosx>0\end{matrix}\right.\)
\(\Rightarrow\left(cosx-1\right)\left(2-cosx\right)\le0\Rightarrow g\left(x\right)\le1\)
\(g\left(x\right)_{max}=1\) khi \(cosx=1\)
\(g\left(x\right)=-cos^2x+3cosx+4-5=\left(cosx+1\right)\left(4-cosx\right)-5\)
\(\left(cosx+1\right)\left(4-cosx\right)\ge0\Rightarrow g\left(x\right)\ge-5\)
\(g\left(x\right)_{min}=-5\) khi \(cosx=-1\)