Show that two continuous non-negative functions satisfy this relation Assume that $f$ and $g$ are continuous non-negative functions on a compact metric space $M,$ where $\{x \in M: \ g(x) = 0\} \subset \{x \in M: \ f(x) = 0\}$
Prove that $\forall \varepsilon > 0\, \exists K(\varepsilon) \text{ s.t. } \forall x \in M$
$$f(x) \leq \varepsilon + K(\varepsilon)g(x)$$
I'm not quite sure how to generalize the subset to this formula. I see that $g(x) = 0$ in some subset, but I'm not sure how to get from that to the formula here. I initially thought that this was trivial because $g(x) = 0$, but that isn't true because there is a subset where $g(x) = 0$. So I'm not really sure where to start.
 A: Interesting! This problem appeared to me trivial at first, but then I quickly realized it is a bit trickier than that.
For any $\epsilon>0$, we define the following function $h$:
$$ h(x) := \frac{ f(x)-\epsilon}{g(x)} \mathbb{1}_{ f(x) \le \epsilon}$$
We can test the continuity of this function and it is continuous indeed. We just have show the continuity of $f$ at three different kind point $x_0,x_1,x_2$ such that:

*

*$f(x_0)>\epsilon$ ( clearly true )

*$f(x_1)= \epsilon$ (true because $f(x)-\epsilon$ converges to 0 at the neighborhood of $x_1$ while $g(x_1)>0$ hence $1/g$ is continous at such point)

*$f(x_2)<\epsilon$ ( also true 'cause there is a neighborhood if $x_2$ such that $f(x)<\epsilon$ )

So yeah, $h$ is a continuous function on a compact metric space, thus the conclusion.
Disclaimer : Surely, a more elaborate solution is needed to show but I guess having showed the idea of proof.
A: Let $\varepsilon > 0$, and let $Z_f =\lbrace x \in M, f(x)=0 \rbrace$ and $Z_g =\lbrace x \in M, g(x)=0 \rbrace$.
By continuity, there exists an open set $O$ (eventually empty) containing $Z_f$ such that $f(x) \leq \varepsilon$ for all $x \in O$. Because $Z_g \subset Z_f \subset O$, then $g(x) \neq 0$ for all $x \in M \setminus O$, so by continuity of $g$ over the compact $M \setminus O$, there exists $m > 0$ such that $g(x) \geq m$ for all $x \in M \setminus O$. By continuity of $f$ over the compact $M$, there exists also $m'>0$ such that $f(x) \leq m'$ for all $x \in M$. Define then$$K=\frac{m'}{m} > 0$$
Then

*

*if $x \in O$, one has $f(x) \leq \varepsilon \leq \varepsilon + Kg(x)$ ;

*and if $x \in M\setminus O$, then $f(x) \leq m'=Km \leq Kg(x) \leq \varepsilon + Kg(x)$.

In both cases, you are done.
