# Discontinuous optimizer but continuous optimal

Consider a locally-bounded, continuous, positive-semidefinite function $f: X \times Y \rightarrow \mathbb{R}_{\geq 0}$, where $X \subset \mathbb{R}^n$ is compact, $Y \subseteq \mathbb{R}^m$.

For each $y \in Y$, define:

$$f^*(y) := \min_{x \in X} f(x,y)$$

$$x^*(y) := \arg\min_{x \in X} f(x,y)$$

Assume that the optimal & optimizer always exist and are finite.

It is known that, under these conditions, $f^*$ is a continuous function.

1) Provide an example in which $x^*$ is not continuous (while $f^*$ necessarily does).

2) Provide an example in which $x^*$ is not continuous outside the origin.

-
What does it mean for $f: X\times Y\to\mathbb R_{\ge 0}$ to be positive semidefinite? – Generic Human Jun 23 '12 at 16:49
It means that $(x,y)=0 \Longrightarrow f(x,y)=0$. – Adam Jun 23 '12 at 17:39

It depend on what you mean by "the $\arg\min$ exists".
When $x^*$ is not unique, it can indeed be discontinuous: see $f(x,y)=1+xy$ with $X=Y=[-1,1]$, then $x^*(y)=-\operatorname{sgn} y$ when $y\ne 0$.
But when $x^*$ is unique, it is necessarily continuous. If $x^*(y)$ does not have a limit as $y\to y_0$, by compacity of $X$ we can find two points $x_1\ne x_2$ such that $x^*(y_i^{(n)})\to x_i$ and $y_i^{(n)}\to y_0$. Since $f^*(y_1^{(n)})=f\left(x^*(y_1^{(n)}),y_1^{(n)}\right)$, by continuity of $f$ and $f^*$, $f^*(y_0)=f(x_1,y_0)$. Likewise $f^*(y_0)=f(x_2,y_0)$. This means the $\arg\min$ can be any of $x_1$ or $x_2$, contradicting uniqueness of $x^*$.
Sorry, I should have written $x^*$ discontinuous outside the origin... please see also question (2). – Adam Jun 23 '12 at 17:40
Do you mean everywhere discontinuous, or just at a single $y_0\ne 0$? If the latter, I don't see the problem: take $f(x,y)=|y|(1+x(y-y_0))$, which further satisfies $f(0,0)=0$. – Generic Human Jun 24 '12 at 0:27
I meant just a single $y_0$, so you're right. – Adam Jun 24 '12 at 17:00