# How to prove $\sin(1/x)$ is not uniformly continuous

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$

-
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$. –  David Mitra Nov 6 '11 at 21:57
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. –  Kerry Nov 6 '11 at 23:09
@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. –  Jonas Meyer Nov 6 '11 at 23:30
@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. –  Kerry Nov 7 '11 at 0:48

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.

-
Thank you so much. I really appreciate the time you took to explain the way of thinking behind this instead of just a brief proof. –  MathMathCookie Nov 6 '11 at 23:25
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" –  MathMathCookie Nov 6 '11 at 23:42
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$.) –  Jonas Meyer Nov 6 '11 at 23:58
@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$. –  Jonas Meyer Jul 30 '13 at 17:14
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)$. –  Jonas Meyer Jul 30 '13 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)|=2|\cos n|$. Thus, can't find sigma for any epsilon greater than zero (from definition).

-