# Function $\mathbb{R}\to\mathbb{R}$ that is continuous and bounded, but not uniformly continuous [duplicate]

I found an example of a function $f: \mathbb{R}\to\mathbb{R}$ that is continuous and bounded, but is not uniformly continuous. It is $\sin(x^2)$. I think it's not uniformly continuous because the derivative is bigger and bigger as $x$ increases. But I don't know how to prove this is uniformly continuous. Is $\sin(x^2)$ uniformly continuous then? if it isn't, can you guys think of any other examples? thanks

-

## marked as duplicate by Jonas Meyer, Jean-Claude Arbaut, Asaf Karagila, Joonas Ilmavirta, MicahDec 12 '14 at 21:19

To prove that $f(x)=\sin(x^2)$ is not uniformly continuous, let $\epsilon=\frac{1}{2}$. You want to show that for every $\delta\gt 0$ there exists $x$ and $y$ (which may depend on $\delta$) such that $|x-y|\lt \delta$, but $|f(x)-f(y)|\geq \frac{1}{2}$. Suggestion: try to pick a $y$ where $f(y)=0$, and a very nearby $x$ where $f(1)=\pm 1$. You want $y^2=n\pi$ for some integer $n$, and $x^2$ to be $\frac{1}{2}\pi$ away. If you cannot produce a pair explicitly, maybe you can show that you can pick them as close as you want anyway, provided $x$ and $y$ are large enough (which agrees with your observation that the derivative is unbounded).

-
yeah I'm thinking of the same thing but I'm stucked on finding （x,y) pair. It's intuitively understandable but I dont know how to construct a vigorous proof. – Lindsay Duran Mar 1 '11 at 2:23
@Christina Yang: You don't need to find one explicitly. Consider the sequence $y_n=\sqrt{n\pi}$ and $x_n=\sqrt{n\pi + \frac{1}{2}}$. Show that $\lim_{n\to\infty}(x_n-y_n)=0$ (pretty easy to do) to deduce that a pair that will work necessarily exists. – Arturo Magidin Mar 1 '11 at 4:22
thank you so much!! – Lindsay Duran Mar 5 '11 at 19:34

Let $T_n(x) = 1-n|x|$ for x in $[-1/n, 1/n]$. As $T_n$ is linear, the required $\delta$ is $\epsilon/n$. Try to construct a continuous function by using combinations of these $T_n$'s and constant (zero) functions. I'm imagining a graph where every once in a while there is a spike with graph $T_n$, but as you go out to infinity, the spikes get steeper.

-

As another example, consider the sequence $S_n = \sum\limits_{k = 1}^n {\frac{1}{k}}$, and a function $f$ such that $f(S_n)=1$ and $f\big(\frac{{S_n + S_{n + 1} }}{2}\big) = 0$. Further note that $$\frac{{S_n + S_{n + 1} }}{2} - S_n = \frac{1}{{2(n + 1)}} \to 0.$$

-
A key point here is that $S_n \to \infty$. – Shai Covo Feb 23 '11 at 23:36

By MVT $|\sin(x^2)-\sin(y^2)|=|2k \cos(k)||x-y|$,where $k$ is between $x$ and $y$ which is not always less than $|x-y|$, for all $x,y \in \mathbb{R}$. Thus $\sin(x^2)$ is not uniformly continuous on $\mathbb{R}$.

-

One option is to consider a simpler function, like $f(x)=x^2$. Can you prove it is not uniformly continuous?

-
I think Christina is looking for a bounded counterexample. – Andrés Caicedo Feb 23 '11 at 22:48
@Andres: ahhh, right. I missed that. – Mariano Suárez-Alvarez Feb 24 '11 at 1:45