# Continuity and uniform continuity of $1/x$

I was reviewing lecture notes from a term I just finished, and my lecturer leaves an example that illustrates the difference between continuity and uniform continuity but I'm not sure I understand it.

We are told that on closed intervals uniform continuity = continuity and on open intervals uniform continuity is strong than continuity. i.e. Let $$f : (0,1] \to [1,\infty)$$. $$f$$ is continuous on $$(0,1]$$ but not uniformly continuous. Here is my proof, there are bits that are not correct and I'd like to clear up the confusion.

So we know that f is continuous if $$\exists c \in (0,1]$$ s.t $$\forall \epsilon > 0 \exists \delta>0$$ s.t if $$|x-c| < \delta \Rightarrow |f(x) - f(c)| < \epsilon$$. i.e. $$|x-y| < \delta \Rightarrow |1/x - 1/c| = |\frac{x-c}{xc}| < \epsilon$$

$$|\frac{x-c}{xc}| < |\frac{\delta}{xc}|$$ but from here do I set epsilon to $$|\frac{\delta}{xc}|$$ ? But then epsilon depends on $$x$$? Anyway if I could clean this up then i would be able to show its continuous, but I cant quite manage the last step. After I do this, how do I show its not uniformly continuous?

• More generally, if $f\colon \left(X,d\right) \rightarrow \left(Y,d^\prime\right)$ is a function from a compact metric space $X$ to a metric space $Y$ then $f$ is uniformly continuous. Since the closed and bounded subsets of $\mathbb{R}^n$ are exactly those that are compact, your result follows. I think you forgot to mention bounded. Commented Dec 17, 2013 at 0:30

Setting $\varepsilon$ to something doesn't make sense. You need to take $\varepsilon$ to be given, and find a value of $\delta$ that's small enough.

Continuity should not say $\exists c\in(0,1]$ etc., where $c$ is in the role you put it in. Rather, continuity at the point $c$ should be defined by what comes after that.

Uniform continuity says $$\forall\varepsilon>0\ \exists\delta>0\ \forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right).$$

Lack of uniform continuity is the negation of that: $$\text{Not }\forall\varepsilon>0\ \exists\delta>0\ \forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right). \tag 1$$

The way to negate $\forall\varepsilon>0\ \cdots\cdots$ to by a de-Morganesque law that says $\left(\text{not }\forall\varepsilon>0\ \cdots\cdots\right)$ is the same as $(\exists\varepsilon>0\ \text{not }\cdots\cdots)$, and similarly when "not" moves past $\forall$, then that transforms to $\exists$. So $(1)$ becomes $$\exists\varepsilon>0\text{ not }\exists\delta>0\ \forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 2$$ and that becomes $$\exists\varepsilon>0\ \forall\delta>0\text{ not }\forall x\in(0,1]\ \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 3$$ and that becomes $$\exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\text{ not } \forall y\in(0,1]\ \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 4$$ and that becomes $$\exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\ \exists y\in(0,1]\text{ not } \left(\text{if }|x-y|<\delta\text{ then }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 5$$ and that becomes $$\exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\ \exists y\in(0,1] \left(|x-y|<\delta\text{ and not }\left|\frac1x-\frac1y\right|<\varepsilon\right) \tag 6$$ and finally that becomes $$\exists\varepsilon>0\ \forall\delta>0\ \exists x\in(0,1]\ \exists y\in(0,1] \left(|x-y|<\delta\text{ and }\left|\frac1x-\frac1y\right|\ge\varepsilon\right). \tag 7$$

To show that such a value of $\varepsilon$ exists, it is enough to show that $\varepsilon=1$ will serve. You need to find $x$ and $y$ closer to each other than $\delta$ but having reciprocals differing by more than $1$. It is enough to make both $x$ and $y$ smaller than $\delta$ and then exploit the fact that there's a vertical asymptote at $0$ to make $x$ and $y$ far apart, by pushing one of them closer to $0$.

Or you could use the theorem of uniform continuity regarding Cauchy sequences. A theorem states that if $f$ is uniformly continuous on a set $S$ and $(s_n)$ is a Cauchy sequence in $S$, then $f(s_n)$ is a Cauchy sequence.

Choose $(s_n)=\frac{1}{n}$ (here $n\in\mathbb{N}$), which is a Cauchy sequence. However, $f(s_n)=n$. Since $f((s_n))=n$ is not Cauchy, $f$ is not uniformly continuous.

Both proofs that I have given are from Kenneth Ross's "Elementary Analysis".

• I am sort of doubful on this proof, however, since $s_n$ isn't a Cauchy sequence on $(0,1)$. $(s_n)$ is not really defined on the interval, I would think. Commented Dec 17, 2013 at 1:20
• Thank you for all your answers! But i must ask, how do i find a bound to show f is continuous on $(0,\infty]$ ? Commented Dec 17, 2013 at 13:21
• Commented Dec 17, 2013 at 19:40
• Commented Dec 17, 2013 at 19:40

The method in proving that $f(x)=\frac{1}{x}$ is not uniformly continuous is similar to the method in proving that $f(x)=\frac{1}{x^2}$. I will address $f(x)=\frac{1}{x^2}$ , and you can infer from it how to prove $f(x)=\frac{1}{x}$.

Assume that $f(x)=\frac{1}{x^2}$ is not uniformly continuous. This means that there exists $\varepsilon>0$ and $\delta>0$ such that $$\vert x-y\vert<\delta\Rightarrow\vert f(x)-f(y)\vert\geq\varepsilon \tag 1$$ (This is the reverse of the definition of uniform continuity)

As Michael Hardy pointed out, to prove that $f(x)$ is not uniformly continuous, we simply need to show that (1) is true for some value of $\varepsilon$. This is because the definition of uniform continuity is for all $\varepsilon$. Hence, we only need to show that uniform continuity fails (or that (1) holds) for one value of $\varepsilon$. Now, let $\varepsilon=1$ and let $y=x+\frac{\delta}{2}$ (the value of $\varepsilon$ and $y$ were chosen arbitrarily...we do this to change the equation to one variable which simplifies things). Thus we have

$$\vert f(x)-f(x+\frac{\delta}{2})\vert\geq 1$$

Thus we have that $$\left| \frac{1}{x}-\frac{1}{x+\frac{1}{\delta}}\right|\geq 1$$

We can rearrange the expression in the absolute values by using the fact that $f(x)-f(y)=\frac{(y-x)(y+x)}{x^2y^2}$ (let $y=x+\frac{\delta}{2}$)

Thus, we have that $$1\leq\frac{(x+\frac{\delta}{2}-x)(x+\frac{\delta}{2}+x)}{x^2(x+\frac{\delta}{2})^2}$$

Arbitrarily let $x=\delta$, then we have

$$\frac{5\delta^2}{9\delta^4}\geq 1$$. Note that we can pick a delta that satisfies such that the above inequality holds. For example, we could let $\delta=1/3$. Therefore, there exists $\delta$ such that (1) holds.

Take $\epsilon=1$. Let $\delta>0$. We can always choose $n$ sufficiently large and $x=\frac{1}{n}$ and $y=\frac{1}{n+1}$ so that $$x-y=\frac{1}{n\left(n+1\right)}<\delta.$$ However, $$\left|f\left(\frac{1}{n}\right)-f\left(\frac{1}{n+1}\right)\right|=\left|n-\left(n+1\right)\right|=1.$$