# Show $g(a)= \operatorname*{arg}_{b \in B} \, f(a,b)=0$ is continuous when $g(a)$ is single-valued and $f$ continuous

Let $A$ and $B$ be two compact subsets of $\mathbb{R}$. Let $f:A \times B \to \mathbb{R}$ be a continuous function on $A \times B$.

For each $a\in A$, define $B_a=\{b\in B:f(a,b)=0\}$, and suppose each $B_a$ is a singleton, so we may define a $g:A\to\Bbb R$ such that $g(a)$ is the unique element of $B_a$ for each $a\in A$. Is $g$ a continuous function of $a$?

I tried the following. But I have the feeling it's not correct.

Assume $g$ is not continuous at $a \in A$, then there exists a sequence $\{a_n\} \subset A$ converging to $a$ in $A$, for which the sequence $\{b_n\}=\{g(a_n)\} \subset B$ does not converges to $b=g(a)$. Since $B$ is compact, by the Bolzano-Weierstrass theorem, $\{b_n\}$ has a subsequence $\{b'_n\}$ converging to some $b'\ne b$ as $\{b_n\}$ does not converges to $b$. Let $\{a'_n\} \subset A$ be the subsequence of $\{a_n\}$ induces by $\{b'_n\}$. Since $\{a_n\}$ converges to $a$ then every subsequence of $\{a_n\}$ converges to $a$ and $\{a'_n\}$ converges to $a$. Since $g(a)$ contains a unique element $b$, then $b'=b$ which is a contraction since $\{b'_n\}$ is a subsequence of $\{b_n\}$. (The previous sentence seems suspicious).
The claim follows.

-
Observe that, as you've defined it, $g$ is a function from $A$ into the power set of $\Bbb R$. To talk about convergence there, we need some notion of open sets. I am assuming that you intend to have $g:A\to\Bbb R$, so I will make an edit to reflect what it seems you're trying to do. Let me know if this isn't what you meant. – Cameron Buie Jun 27 '12 at 20:51
Further note that we cannot conclude that $b'\neq b$ simply because $b_n$ doesn't converge to $b$. Consider for example the sequence $b_n$ with $b_n=1$ for odd $n$ and $b_n=1/(n+1)$ for even $n$. The sequence $b_n$ doesn't converge, but has subsequences that converge to $0$. – Cameron Buie Jun 27 '12 at 20:59
@CameronBuie Thanks for your edit. You read my mind. I don't understand why, though, the $\arg_{b \in B}$ notation is not equivalent to the $B_a$ notation. – Nicolas Essis-Breton Jun 27 '12 at 21:49
It is equivalent. I was simply making explicit that it was a set of points that we're dealing with (though it happens to be a singleton), and not a point. One could indeed say that $$B_a=\arg_{b\in B}\bigl(f(a,b)=0\bigr),$$ instead. – Cameron Buie Jun 27 '12 at 21:52

Let's assume that $g$ is not continuous at $a$. Thus, there is a sequence $\{a_n\}$ such that $a_n$ converges to $a$, but such that $b_n:=g(a_n)$ fails to converge to $b:=g(a)$.

By definition, this means that there exists some $\epsilon$ such that for all $N$, there is some $n\geq N$ with $|b_n-b|>\epsilon$--that is, there are infinitely many $n$ such that $|b_n-b|>\epsilon$. Let $\{b_n'\}$ be a subsequence of $\{b_n\}$ with $|b_n'-b|>\varepsilon$ for all $n$ (possible by "infinitely many"), and observe that neither $\{b_n'\}$ nor any of its subsequences can converge to $b$ (I leave it to you to justify this).

Since $\{b_n'\}$ is a sequence of points of the compact set $B$, then by B-W, there is a convergent subsequence $\{b_n''\}$ of $\{b_n'\}$. As noted above, $\{b_n''\}$ must converge to something other than $b$. Observing that $\{b_n''\}$ is a subsequence of $\{b_n\}$, too, then we may assume without loss of generality that $b_n'=b_n''$ for all $n$, meaning that in fact $b_n'$ converges, say to $b'\neq b$. (The only thing you hadn't done is justified why we could assume that your chosen subsequence $\{b_n'\}$ converges. So close!)

Then we induce $\{a_n'\}$ from $\{b_n'\}$ and continue as you described.

-
Our answers are complementary. But You were of precious help and I think you deserve the points. I learn a lot. Thank you. – Nicolas Essis-Breton Jun 28 '12 at 22:30
You're very welcome. – Cameron Buie Jun 28 '12 at 22:32

I found the following proof by borrowing from Berge Maximum theorem proof strategy.
Do you think it's ok?
(The beginning is similar then my previous proof, I have indicated the new content)

I improved this paragraph per Cameron help
Assume $g$ is not continuous at $a \in A$, then there exists a sequence $\{a_n\} \subset A$ converging to $a$ and an $\epsilon>0$ such that for each $n$, $b_n=g(a_n)$ and $|b_n-b|>\epsilon$ where $b=g(a)$. Since $B$ is compact, by the Bolzano-Weierstrass theorem, $\{b_n\}$ has a subsequence $\{b'_n\}$ converging to some $b'\ne b$ as $\{b_n\}$ is never in the neighborhood $(b-\epsilon,b+\epsilon)$ of $b$.

Let $\{a_n'\} \subset A$ be the subsequence of $\{a_n\}$ induced by $\{b'_n\}$. Since $\{a_n\}$ converges to $a$ then every subsequence of $\{a_n\}$ converges to $a$ and $\{a'_n\}$ converges to $a$.
new content
Since $f$ is continuous then $f(a'_n,b'_n)$ converges to $f(a,b')$. Since $g(a)$ is the singleton $b$ then $b'$ is not a root of $f(a,\cdot)$. Whence, either $f(a,b')>f(a,b)$ or $f(a,b')<f(a,b)$. Since $B$ is compact there is sequence $\{\bar b_n\} \subset B$ converging to $b$. By continuity of $f$, $f(a'_n,\bar b_n)$ converges to $f(a,b)$.

If $f(a,b')>f(a,b)$, then there is an $n_0$ for which $f(a'_n,b'_n)>f(a'_n,\bar b_n)$ when $n \ge n_0$. Since $b'_n=g(a'_n)$, then $0>f(a'_n,\bar b_n)$ for $n \ge n_0$ and $0>f(a,b)$, which is a contradiction since $b$ is a root of $f(a,\cdot)$.
Similarly, we cannot have $f(a,b')<f(a,b)$ and hence $f(a,b')=f(a,b)$.
Since, $g(a)$ is the singleton $b$, $b=b'$, which is a contradiction. Thus, $g$ is continuous at $a$.

-
This proof suffers the same flaw that I pointed out in the comment above. I'm not saying the claim is false--merely that your reasoning isn't sufficient justification for it. – Cameron Buie Jun 28 '12 at 14:28
@CameronBuie I think I can correct the flaw as follow. Assuming $g$ is discontinuous at $a$, there is a sequence $a_n$ in $A$ converging to $a$ and an $\epsilon >0$ such that for each $n$, $b_n=g(a_n)$ and $|b_n-g(a)|>\epsilon$. – Nicolas Essis-Breton Jun 28 '12 at 17:52
Not quite--consider the example I gave in the comments above, supposing $g(a)=1$--but you're on the right track. We can say that there are infinitely many $n$ such that $|b_n-g(a)|>\epsilon$--that follows by negating the definition of sequence convergence. Now, the subsequence $\{b'_n\}$ with just those $n$ can't converge to $g(a)$, and neither can any of its subsequences. Do you see why? That should be enough to give you what you want. Think on that and fix your answer. Let me know when you've done it and I'll take another look. If it works, you can accept it, and I'll upvote. – Cameron Buie Jun 28 '12 at 18:10
@CameronBuie I improved the first paragraph of the proof. You are of great help. Thank you for sharing your insight. – Nicolas Essis-Breton Jun 28 '12 at 20:18
Alright. I've taken a look at the new content, now, and it looks just fine! Still haven't quite got the first bit fixed, though. I want to point out, though, that everything you're saying is correct. It simply isn't fully justified. Since you're so close (nice work, by the way), I will go ahead and put a more detailed explanation in an answer so I don't run out of room. Hopefully, it will help you out. – Cameron Buie Jun 28 '12 at 21:57