4. Given $\left\{\begin{array}{l}1 \leqslant x+y \leqslant 3, \\ -1 \leqslant x-y \leqslant 1 \text {. }\end{array}\right.$ Then the maximum value of $2 x^{2}-3 y$ is $\qquad$ .
4.5.

Let $z=2 x^{2}-3 y$. Then
$$
y=\frac{2}{3} x^{2}-\frac{z}{3} \text{. }
$$

The shaded area in Figure 2 is the plane region represented by
$$
\left\{\begin{array}{l}
1 \leqslant x+y \leqslant 3, \\
-1 \leqslant x-y \leqslant 1
\end{array}\right.
$$

When the parabola $y=\frac{2}{3} x^{2}-\frac{z}{3}$ passes through the point $(2,1)$, $-\frac{z}{3}$ achieves its minimum value $-\frac{5}{3}$, so, the maximum value of $z$ is 5.