Let $S=\{(x_1,x_2):x_1^2+x_2^2\le 4\}$. Let $f(y)=\inf\{||y-x||:x\in S\}$. Find $f$ explicitly.
This is the $f(y)$ I got so far
$$\inf \left\{ \sqrt{(y_1-x_1)^2+(y_2-x_2)^2}:(x_1+x_2) \in S \right\}$$
How do I relate $f(y)$ with $x_1^2+x_2^2\le 4\}$?
$$f (\mathrm y) := \max \left( 0, \|\mathrm y\|_2 - 2 \right) = \begin{cases} 0 & \text{if } \|\mathrm y\|_2 \leq 2\\ \|\mathrm y\|_2 - 2 & \text{if } \|\mathrm y\|_2 \geq 2\end{cases}$$
Proof
The case $\|\mathrm y\|_2 \leq 2$ is trivial. If $\|\mathrm y\|_2 \geq 2$, the squared Euclidean distance between $\rm y$ and the disk is equal to the squared Euclidean distance between $\rm y$ and the disk's boundary, i.e., a circle of radius $2$.
$$\begin{array}{ll} \text{minimize} & \| \mathrm y - \mathrm x \|_2^2\\ \text{subject to} & \| \mathrm x \|_2 = 2\end{array}$$
Note that
$$\begin{array}{rl} \| \mathrm y - \mathrm x \|_2^2 &= \| \mathrm y \|_2^2 - 2 \langle \mathrm x , \mathrm y \rangle + \| \mathrm x \|_2^2 \\ &\geq \| \mathrm y \|_2^2 - 2 \| \mathrm x \|_2 \| \mathrm y \|_2 + 4\\ &= \| \mathrm y \|_2^2 - 4 \| \mathrm y \|_2 + 4\\ &= \left( \| \mathrm y \|_2 - 2 \right)^2\end{array}$$
where the Cauchy-Schwarz inequality was used. Hence, $$\| \mathrm y - \mathrm x \|_2 \geq \| \mathrm y \|_2 - 2$$