\(y=4\left(1-sin^2x\right)+2sinx+2=-4sin^2x+2sinx+6\)
Đặt \(sinx=t\in\left[-1;1\right]\Rightarrow y=f\left(t\right)=-4t^2+2t+6\)
\(-\dfrac{b}{2a}=\dfrac{1}{4}\in\left[-1;1\right]\)
\(f\left(-1\right)=0\) ; \(f\left(\dfrac{1}{4}\right)=\dfrac{25}{4}\); \(f\left(1\right)=4\)
\(\Rightarrow y_{max}=\dfrac{25}{4}\) khi \(sinx=\dfrac{1}{4}\)
\(y_{min}=0\) khi \(sinx=-1\)
Ta có: \(y=4cos^2x+2sinx+2=4-4sin^2x+2sinx+2=-4sin^2x+2sinx+6=-\left(4sin^2x-2sinx+\dfrac{1}{16}-\dfrac{1}{16}-6\right)=-\left(2sin^2x-\dfrac{1}{4}\right)^2+\dfrac{97}{16}\)
Ta có: \(-\left(2sin^2x-\dfrac{1}{4}\right)^2\le0\Rightarrow y\le\dfrac{97}{16}\)
Vậy \(y_{max}=\dfrac{97}{16}\)