a.
Đặt \(cos2x=t\Rightarrow t\in\left[-1;1\right]\)
Xét hàm \(y=f\left(t\right)=2t^2+2t-4\) trên \(\left[-1;1\right]\)
\(-\dfrac{b}{2a}=-\dfrac{1}{2}\in\left[-1;1\right]\)
\(f\left(-1\right)=-4\) ; \(f\left(-\dfrac{1}{2}\right)=-\dfrac{9}{2}\) ; \(f\left(1\right)=0\)
\(\Rightarrow y_{min}=-\dfrac{9}{2}\) khi \(t=-\dfrac{1}{2}\) hay \(cos2x=-\dfrac{1}{2}\)
\(y_{max}=0\) khi \(cos2x=1\)
b. Đặt \(tanx=t\Rightarrow t\in\left[-1;\sqrt{3}\right]\)
Xét hàm \(f\left(t\right)=t^2-2\sqrt{3}t-1\) trên \(\left[-1;\sqrt{3}\right]\)
\(-\dfrac{b}{2a}=\sqrt{3}\in\left[-1;\sqrt{3}\right]\)
\(f\left(-1\right)=2\sqrt{3}\) ; \(f\left(\sqrt{3}\right)=-4\)
\(y_{min}=-4\) khi \(x=\dfrac{\pi}{3}\) ; \(y_{max}=2\sqrt{3}\) khi \(x=-\dfrac{\pi}{4}\)