\(x\in\left[-\frac{\pi}{2};\frac{2\pi}{3}\right]\Rightarrow3x\in\left[-\frac{3\pi}{2};2\pi\right]\)
\(\Rightarrow-1\le y\le1\)
\(y_{min}=-1\) khi \(x=\left\{-\frac{\pi}{6};\frac{\pi}{2}\right\}\)
\(y_{max}=1\) khi \(x=\left\{-\frac{\pi}{2};\frac{\pi}{6}\right\}\)