Show that Urysohn function of two closed sets $F$ and $G$, with $d(F,G)>0$, is uniformly continuous. Let $(X,d)$ is a metric space, $F$ y $G$ two closed sets of $X$. If $d(F,G)>0$, then I have to show that the Urysohn function $f$ defined from $X$ to $[0,1]$ is uniformly continuous, where the Urysohn function is
$$
f(x) = \frac{d(x,F)}{d(x,F)+d(x,G)}, \qquad x\in X.
$$
 A: To ease on the notation, I will write $d_A(x) = d(x,A)$. Now, if $x,y \in X$,
$$
|f(x) - f(y)| = \big|\frac{d_F(x)(d_F(y)+d_G(y)) - d_F(y)(d_F(x) + d_G(x))}{(d_F(x)+d_G(x))(d_F(y)+d_G(y))}\big| = \\
= \big|\frac{d_F(x)d_G(y) - d_F(y)d_G(x)}{(d_F(x)+d_G(x))(d_F(y)+d_G(y))}\big| \leq  \\
\leq \frac{d_F(x)|d_G(y)-d_G(x)|}{(d_F(x)+d_G(x))(d_F(y)+d_G(y))} + \frac{d_G(x)|d_F(x)-d_F(y)|}{(d_F(x)+d_G(x))(d_F(y)+d_G(y))} \leq \\
\leq \frac{d_F(x)d(x,y)}{(d_F(x)+d_G(x))(d_F(y)+d_G(y))} + \frac{d_G(x)d(x,y)}{(d_F(x)+d_G(x))(d_F(y)+d_G(y))} = \\
= \frac{d(x,y)}{d_F(y)+d_G(y)} \leq \frac{d(x,y)}{d(F,G)}
$$
which proves the uniform continuity. Here we're using that 
(i) given any $x,y \in X$, $A\subseteq X$, $|d_A(x) - d_A(y)| \leq d(x,y)$.
(ii) for any $y \in X$, $0 < d(F,G) \leq d_F(y) + d_G(y)$. This is because 
$$
d(F,G) \leq d(a,b) \leq d(y,a) + d(y,b) \quad (\forall a \in F, \forall b \in G) 
$$
Taking infimum at both sides on $a \in F$ we get $d(F,G) \leq d_F(y) + d(y,b)$, and now taking infimum on $b \in G$ gives the desired result.
