# Uniform continuity on a union of sets

Let $$f: X \rightarrow Y$$ be a function on metric spaces. Let $$E_{1}, ..., E_{n}$$ be a finite collection of subsets of $$X$$, a metric space, such that $$d(x,y) >1$$ whenever $$x \in E_{i}$$ and $$y \in E_{j}$$ with $$(i \neq j)$$. Show that if $$f$$ is uniformly continuous on each of the sets $$E_{i}$$ independently, then it is uniformly continuous on $$\bigcup_{i=1}^{n}E_{i}$$.

Starting: Since $$f$$ is uniformly continuous on each $$E_{i}$$, we know that to every $$\epsilon > 0$$ there corresponds a $$\delta_{i} > 0$$ such that $$d(f(x), f(y)) < \epsilon$$ for all $$x, y \in E_{i}$$ such that $$d(x,y) < \delta_{i}$$.

The challenge is to come up with a $$\delta >0$$ that does what we want. Let's try: $$\delta = \min \{\delta_{1}, \delta_{2}, ..., \delta_{n}\}$$.

Let $$x, y \in \bigcup_{i=1}^{n} E_{i}$$. If $$x, y \in E_{i}$$, then our $$\delta$$ finishes the job.

Suppose $$x \in E_{i}$$ and $$y \in E_{j}$$. Then $$y$$ is an isolated point of $$E_{i}$$. Since $$f$$ must be continuous at any isolated point, we know that there exists a $$\delta^{*} > 0$$ such that for all $$x \in E_{i}$$ with $$d(x,y) < \delta^{*} \implies d(f(x), f(y)) < \epsilon$$.

I can go back and make an adjustment to my $$\delta$$ by considering $$\delta = \min \{\delta_{1}, ...., \delta_{n}, \delta^{*} \}$$. But I am not certain about whether this choice of $$\delta$$ depends only on the $$\epsilon$$ especially the $$\delta^{*}$$, which is really my question here. I will welcome any other ideas.

It seems there is indeed a problem with your proof. You have to be able to give an immediate $$\delta$$ for a given $$\epsilon$$. Your $$\delta$$ seems to depend on other things than $$\epsilon$$. Use $$\delta =\min\{\delta_1, \dots \delta_n,1\}$$ instead.
If $$d(x,y)< \delta$$, then $$x$$ and $$y$$ must lie in the same $$E_i$$ (since $$d(x,y) < 1$$) and you will be done