# Does there exist an example of such a pathological continuous function?

Suppose $$\ f:[0,1]\to\mathbb{R}\$$ is continuous and let $$\ \varepsilon>0.$$

For each $$\ x\in[0,1],\$$ find the supremum $$\ \delta>0\$$ such that

$$\ f(\ B_{\delta}(x)\ \cap [0,1]\ )\ \subseteq B_{\varepsilon}(\ f(x)\ )\ \subset \mathbb{R}.\quad$$ [The reason I say supremum $$\ \delta\$$ rather than maximum $$\ \delta\$$ for each $$\ x\$$ is because I'm not sure a maximum $$\ \delta\$$ is attained for each $$\ x.$$]

Note that in finding $$\ \delta\$$ for each $$\ x,\$$ we can think of $$\ \delta\$$ as a function of $$\ x,\$$ $$\delta = \delta(x).$$

Now my question is, can we have

$$(1)\quad \inf\{\ \delta(x): x\in [0,1]\ \} = 0,\$$ or is it always the case that $$\ \inf\{\ \delta(x): x\in [0,1]\ \} > 0$$ ?

At first I thought that the following would be an example satisfying $$\ (1)\$$:

$$f(x)= \begin{cases} x\sin\left(\frac{1}{x}\right)&\text{if}\,\ 0

with $$\ \varepsilon = 0.01,\$$

but now I realise this doesn't satisfy $$\ (1).$$

In trying to come up with a example satisfying $$\ (1).\$$ Something like the Weierstrass function comes to mind, but I'm not sure the Weierstrass function is pathological enough, but maybe it is? If it is, how would we prove it is?

Also, this may have something to do with uniform continuity because a standard example of a non-uniformly continuous function is $$\ y = x^2,\$$ which would satisfy $$\ (1)\$$ (even for any $$\ \varepsilon>0\ )\$$ if our function's domain was $$\ \mathbb{R}\$$ rather than $$\ [0,1].$$

The semi-circle $$\ f(x) = \sqrt{\frac{1}{4} - \left(x-\frac12\right)^2}\$$ or other similar tries don't satisfy $$\ (1)\$$ either for any value of $$\ \varepsilon>0.$$

Aha! The answer is no, there are no examples of functions $$\ f\$$ and $$\ \varepsilon>0\$$ that satisfies $$\ (1).$$

Rudin PMA Theorem $$4.19:$$ Let $$\ f\$$ be a continuous mapping of a compact metric space $$\ X\$$ into a metric space $$\ Y.\$$ Then $$\ f\$$ is uniformly continuous on $$\ X.\$$

This means that, no matter what $$\ \varepsilon\$$ was chosen to be, we can find one number $$\ \delta>0\$$ which will do for all points $$\ x\in [0,1].\$$ Therefore $$\ \inf\{\ \delta(x): x\in [0,1]\ \} \geq \delta > 0,\quad$$ and we see that $$\ (1)\$$ cannot be satisfied.