Lời giải:
$y=2(\cos ^2\frac{3x}{2}-\sin ^2\frac{3x}{2})+5\sin \frac{3x}{2}-1$
$=2(1-2\sin ^2\frac{3x}{2})+5\sin \frac{3x}{2}-1$
$=-4\sin ^2\frac{3x}{2}+5\sin \frac{3x}{2}+1$
Đặt $\sin \frac{3x}{2}=t$ ($t\in [-1;1]$) thì:
$y=-4t^2+5t+1$
$y'=-8t+5=0\Leftrightarrow t=\frac{5}{8}$
$y(1)=2; y(\frac{5}{8})=\frac{41}{16}; y(-1)=-8$
Vậy $y_{\max}=\frac{41}{16}; y_{\min}=-8$