Let $(M,d)$ be a metric space and $f,g:(M,d) \rightarrow \mathbb{R}$ be continuous functions. Show the set $A=\{x \in M: f(x)<g(x)\}$ is an open set in $(M,d)$.

To show the statement we need to take a point $x_0$ and show that there exist a ball around $x_0$ which is contained in $A$. My proof is the following but it does not reasonable to me that I have to have the condition $\epsilon_1>\epsilon_2$.

Let $x_0 \in A \rightarrow f(x_0)<g(x_0)$

Since $f$ is continuous $\forall \epsilon_1>0\,\,\exists\,\,\,\delta_1>0\,\,\,\text{s.t.} \,\,\,d(x,x_0)<\delta_1 \,\,\,\rightarrow |f(x)-f(x_0)|<\epsilon_1$ and $$ -\epsilon_1<f(x)-f(x_0)<\epsilon_1 \,\, \Rightarrow f(x)-f(x_0)<\epsilon_1 \tag{1} $$

And since $g$ is continuous $\forall \epsilon_2>0\,\,\exists\,\,\,\delta_2>0\,\,\,\text{s.t.} \,\,\,d(x,x_0)<\delta_2 \,\,\,\rightarrow |g(x)-g(x_0)|<\epsilon_2$ and $$ -\epsilon_2<g(x)-g(x_0)<\epsilon_2 \,\, \Rightarrow -\epsilon_2 <g(x)-g(x_0)\tag{2} $$

let $\delta=\min (\delta_1,\delta_2)$ so using (1) and (2) $$ f(x)-f(x_0)-\epsilon_2<\epsilon_1 +g(x)-g(x_0) \Rightarrow -\epsilon_2+\epsilon_1< g(x)-f(x) $$ Since $f(x_0)-g(x_0)<0$.

Therefore, if $ \epsilon_1>\epsilon_2 \Rightarrow 0< g(x)-f(x)$ so $d(x,x_0)<\delta$ is contained in $A$.

Could you help me to get rid of this confusion. I understand that because $f,g$ are continuous those statement should be held for all $\epsilon$ but having this condition does not make sense to me.

  • $\begingroup$ .... so using (1) and (2): how do you infer the next inequality (at that point in your text)? I do not see it. $\endgroup$
    – Jimmy R.
    Nov 5 '18 at 6:24
  • $\begingroup$ I summed over (1) and (2). $\endgroup$
    – Saeed
    Nov 5 '18 at 16:48

Your set is $$(g-f)^{-1}(]0,\infty[)$$

This is open, as inverse image of an open set under a continuous function.


Since you're not proving continuity, but using continuity, you want to pick a specific $\epsilon$.

Case in point: if $f(x)=0, g(x)=x, x_0=1$ and $\epsilon=2$, then your $\delta$ becomes $2$, and $(-1,3)$ is certainly not a subset of your set. So an arbitrary $\epsilon$ isn't going to do you any good.

I claim that $\epsilon=\frac{g(x_0)-f(x_0)}2$ works. Let $\delta_f>0$ be such that for any $x_1\in M$ with $d(x_0,x_1)<\delta_f$, we have $|f(x_0)-f(x_1))|<\epsilon$, and let $\delta_g$ be defined analogously. Pick $\delta=\min\{\delta_f,\delta_g\}$. Then, for any $x_1\in M$ with $d(x_0,x_1)<\delta$, we have $$ f(x_0)+\frac{g(x_0)-f(x_0)}2=g(x_0)-\frac{g(x_0)-f(x_0)}2\\ f(x_0)+\epsilon=g(x_0)-\epsilon\\ f(x_1)<f(x_0)+\epsilon=g(x_0)-\epsilon<g(x_1) $$ where the first inequality is because $d(x_0,x_1)<\delta_f$ and the second one because $f(x_0,x_1)<\delta_g$.

  • $\begingroup$ The result is true for any topological space $M$. $\endgroup$ Nov 5 '18 at 8:39
  • 1
    $\begingroup$ @DanielWainfleet And the proof is much easier in a topological context. But, alas, we are given a metric space and the $\epsilon$-$\delta$ definition of continuity. $\endgroup$
    – Arthur
    Nov 5 '18 at 8:52
  • $\begingroup$ @Arthur Actually, can we look at the proof if M was a generic topological space? I was thinking if $f$ and $g$ are continuous functions, $h(x) = (f - g)(x)$ is a continuous function. If $x_0 \in M$, and if I were to define an open neighborhood of $x_0$, $N(x,\epsilon)$, could we say that $h(N(x,\epsilon))$ is an open set that contains the interior point $x_0$? $\endgroup$ Jan 30 '20 at 5:01
  • $\begingroup$ @Overachiever If $M$ were a generic topological space, we would have to discard the idea of $\varepsilon$-$\delta$ altogether. In that case, the function $h$ is continuous, so by definition of continuous (inverse image of any open is open), the set of points in $M$ where $h$ is strictly negative is open. So it's actually a lot easier. See the other answer. $\endgroup$
    – Arthur
    Jan 30 '20 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.