Solution (source code)

= Solution

Complete the square to write the objective as
$$
x^2-2x+y^2-4y=\|(x,y)-(1,2)\|^2-5.
$$
Let $z=(x,y)$ and $a=(1,2)$, so $\|a\|=\sqrt5$ while feasibility requires $\|z\|\geq\sqrt{20}=2\sqrt5$. The <reverse triangle inequality> gives
$$
\|z-a\|\geq\|z\|-\|a\|\geq\sqrt5.
$$
The objective is therefore at least zero. Equality is attained by $z=2a=(2,4)$, which lies on the boundary. Equality requires the <vectors> to have the same direction and $\|z\|=2\sqrt5$, so this minimizer is unique. Hence
$$
\boxed{(x_*,y_*)=(2,4),\qquad f_*=0.}
$$
It also satisfies the <Karush-Kuhn-Tucker conditions> with $\lambda=1/2$. The direct distance argument proves global optimality even though the exterior of a disk is not a <convex set>; this is <nearest-point minimization outside a Euclidean ball>.