2. $y=\arcsin ^{2} x-2 \arcsin x-2, y_{\max }=$ $\qquad$
2. $\frac{\pi^{2}}{4}+\pi-2$.

Let $t=\arcsin x$, then $-\frac{\pi}{2} \leqslant t \leqslant \frac{\pi}{2}, y=t^{2}-2 t-2=(t-1)^{2}-3 \cdot t=-\frac{\pi}{2}$ i.e., $x=-1$ and $y_{\max }=\left(-\frac{\pi}{2}-1\right)^{2}-3=\frac{\pi^{2}}{4}+\pi-2$