How do I go about proving $f(x)=\sin(1/x)$ is not uniformly continuous?

(Or: different question, but same intention* how do I prove that $x\sin(x)$ is not uniformly continuous)

*I'm trying to grasp how one would prove $f$ is not uniformly continuous for functions other than the simple $x^n$. I have seen one technique being to set an $\epsilon$ and set $x, y$ in the form of $\delta$ (e.g. $\delta/2$, etc.) then subsequently proving that $f(x)-f(y)\ge\epsilon$

  • $\begingroup$ Sketching a graph would be edifying. Note that you can select an interval $(\delta_1,\delta_2)$ (''near 0'') of arbitrarily small length such that $|f(\delta_2)-f(\delta_1)|=2$. $\endgroup$ Commented Nov 6, 2011 at 21:57
  • $\begingroup$ You may attempt to prove why $\frac{1}{x}$ is not uniformly continuous. Since $Sin[x]$ is close to $x$, the proof should be easy manipulation of symbols. $\endgroup$
    – Kerry
    Commented Nov 6, 2011 at 23:09
  • 4
    $\begingroup$ @Changwei: $\sin(x)$ is close to $x$ when $x$ is small, but $\sin(1/x)$ is not close to $1/x$ when $x$ is small. I am not sure what you intend by your hint. $\endgroup$ Commented Nov 6, 2011 at 23:30
  • $\begingroup$ @Jonas Meyer: I do not mean to compare both functions when they are small. I mean the two functions are "similar". So an analogous proof should be able to constructed if the author notice $Sin[x]$ has a maximum difference of 2 near the point $\frac{1}{x}$ is not well-defined. In fact the author's statement is not clear, because by stating "is not uniformly continuous" one is assuming the function is in some underlying domain already. If it is an close interval with no singular points we may just apply Cantor's theorem. $\endgroup$
    – Kerry
    Commented Nov 7, 2011 at 0:48

3 Answers 3


Ultimately a very brief solution could be given to this problem, but I decided to write in some detail how you might approach it.

You want to negate the following: $$\forall \varepsilon>0,\exists\delta>0,\forall x,y, |x-y|<\delta\implies|f(x)-f(y)|<\varepsilon.$$

You can write out what that negation is rather mechanically, swapping universal and existential quantifiers, until you finally negate the implication by ensuring that $|x-y|<\delta$ and $|f(x)-f(y)|\geq \varepsilon$. See here for a discussion of dissecting analysis problems like this by Tim Gowers.

That is, you want to prove:

$$\exists \varepsilon>0,\forall\delta>0,\exists x,y,\text{ such that } |x-y|<\delta\text{ and }|f(x)-f(y)|\geq\varepsilon.$$

Before giving the final argument, it is a good idea to experiment in a "backwards" fashion; think about where you want to end up and how you can get there. Roughly, the conclusion "$|x-y|<\delta\text{ and }|f(x)-f(y)|\geq\varepsilon$" will be saying that $x$ and $y$ will be close while $f(x)$ and $f(y)$ will stay a distance $\varepsilon$ away. The property of $\sin(1/x)$ that allows this to happen is that it oscillates like crazy between $1$ and $-1$ over smaller and smaller intervals of $x$ values. So there will be "nearby" $x$ and $y$ such that $f(x)=-1$ and $f(y)=1$. The distance between the function values here is $2$, while the distance between the input values can be arbitrarily small. This leads to the conclusion that $\varepsilon = 2$ will be a sufficient choice.

Next, with $\varepsilon$ fixed at $2$, and $\delta>0$ arbitrary but fixed, you need to show that there are $x$ and $y$ with $|x-y|<\delta$ and $|f(x)-f(y)|\geq 2$. As indicated above, the last part can be achieved by ensuring that $f(x)=-1$ and $f(y)=1$. For what $x$ and $y$ is it true that $\sin(1/x)=-1$ and $\sin(1/y)=1$? Use what you know about the sine function to answer this question (I'll leave this to you). Notice that the choices of such $x$ and $y$ get arbitrarily close to $0$, and in particular you can choose such $x$ and $y$ with $0<x,y<\delta$, which implies that $|x-y|<\delta$.

Largely the same approach applies to $x\sin(x)$, except that its reason for not being uniformly continuous changes. Now the problem is where $x$ gets very large, and the rate of oscillation doesn't change, but the amplitude does. A hint is to consider the function values at $x=2\pi n$ and $y=2\pi n + c$, where $c>0$ is "small", as $n$ goes to infinity.

  • $\begingroup$ Just one question though: sin(1/y)=1 when $y=1/(2*pi*k+pi/2)$ and sin(1/x)=-1 when $x=1/(pi*k+pi/2)$ and when you take the the difference and take the limit_k->infinity you get 0, so as you said the x and y get arbitrarily close to 0. So I guess the "idea" is complete, which I get, but I don't know how one would close the actual "proof" $\endgroup$ Commented Nov 6, 2011 at 23:42
  • $\begingroup$ MathMathCookie: For $x$ I think you want $1/(2\pi k-\pi/2)$. If you took $k=2$ in your formula for example, you get $\sin(1/x)=1$. As a step toward finishing the proof you could invoke the fact that for all $\delta>0$, there exists a positive integer $k$ such that $1/(2\pi k-\pi/2)$ and $1/(2\pi k +\pi/2)$ are less than $\delta$. (This is essentially a restatement of the fact that the sequences converge to $0$, but stated in a precise way to get the desired $x$ and $y$ such that $0<x,y<\delta$.) $\endgroup$ Commented Nov 6, 2011 at 23:58
  • $\begingroup$ thank you for your helpful explanation on how to think about it. But I am failing to see why we will choose $x= 1/(2πk−π/2)$ . I know that we want something $sin(1/x)=1$ and $sin(1/y)=-1$, but how did you get that answer. Would you mind elucidating on your motivation? Also, I am struggling to get an intuitive idea to work with continuous uniform problems. I understand the definition, but am failing to work with it. Thanks $\endgroup$
    – user43901
    Commented Oct 7, 2012 at 16:07
  • 2
    $\begingroup$ @Ramit: If somebody doesn't know that $\sin(1/x)$ osciallates when $x$ approaches $0$, that person should learn more about $\sin$ and $1/x$ and $\sin(1/x)$. There is no need to start the proof before seeing what type of object you're dealing with. How to check it depends on the function. E.g., for $\cos(x)/x$, presumably you mean on the domain $\mathbb R\setminus\{0\}$, but it is enough to consider $(0,1)$ as the domain. Near $x=0$ this function behaves like $1/x$. If you can show that $1/x$ is not uniformly continuous on $(0,1)$, then you can probably extend the proof to $\cos(x)/x$. $\endgroup$ Commented Jul 30, 2013 at 17:14
  • 1
    $\begingroup$ Here is a useful general fact. If $a<b$ are real numbers and $f:(a,b)\to\mathbb R$ is a uniformly continuous function, then $\lim\limits_{x\searrow a}f(x)$ and $\lim\limits_{x\nearrow b}f(x)$ exist. This implies that neither $\sin(1/x)$ nor $\cos(x)/x$ is uniformly continuous on $(0,1)$. $\endgroup$ Commented Jul 30, 2013 at 17:18

Choose two sequences $T_n = \frac{1}{n}$ and $S_n = \frac{1}{n+\pi}$. Their difference goes to zero as $n$ goes to infinity. But $|f(S_n)-f(T_n)|=\left|2 \sin\left(\frac{n+\pi-n}{2}\right)\cos\left(\frac{n+\pi+n}{2}\right)\right|=\left|2 \cos\left(n+\frac{\pi}{2}\right)\right|=\left|2\sin(n)\right|>0$ for $n \in \mathbb{N}$, so the function is not uniformly continuous.


Assume $\ f(x)$= $\sin\left(\frac1x\right)$ is uniformly continuous on $(0,1)$.

Then, for every Cauchy sequence $\{x_n\}$ in $(0,1)$, the corresponding sequence $\{f(x_n)\}$ is also a Cauchy sequence.

Now take $ x_n =\frac{2}{nπ}$. Then $\{x_n\}$ is a Cauchy sequence but the sequence $\{f(x_n)\} = \{0,1,0,-1,...\}$ diverges; so, it is not Cauchy.

This proves by contradiction that $f$ is not uniformly continuous on $(0,1)$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .