\[y = \left\{ \begin{matrix}\frac{1}{2}x;если\ x \leq 4 \\2;\ \ \ если\ x > 4 \\\end{matrix} \right.\ \]