# Uniform continuity of $f(x) = x\cos(x)$

Is it uniformly continuous? $f: [0,\infty]$

$$f= x\cos(x)$$

I proved that if

$$|x_1 -x_2| \rightarrow 0 \quad \mathrm{then}\quad |f(x_{1})-f(x_{2})| \rightarrow 1$$

so it is not uniformly continuous, right?

-
No, that's not true, that would mean $f$ is not continuous. Maybe you mean something else? – Thomas Andrews Jan 14 '13 at 18:49
How did you prove your statement? If we take $x_2=-x_1$ and look at the limit as $x_1\to 0$, then $f(x_1)-f(x_2)\to0$, not $1$. – Clayton Jan 14 '13 at 18:49
In case you weren't sure, uniformly continuous means that given any $\varepsilon>0$, we can find a $\delta>0$ such that $|x-y|<\delta$ implies $|f(x)-f(y)|<\varepsilon$. So, if you are wanting to show something is not uniformly continuous, you have to find a pair of points (depending on what $\varepsilon$) such that $|x-y|<\delta$ but $|f(x)-f(y)|\geq \varepsilon$. Intuitively, you might think of the function $1/x$ near $0$. – Clayton Jan 14 '13 at 18:55
Surely you mean $[0,\infty)$ rather than $[0,\infty]$, right? – Andrés Caicedo Jan 14 '13 at 19:14
Better to work near the points where $\cos x$ has the largest derivatie, that is points of the form $(2n+1)\pi$. – Harald Hanche-Olsen Jan 14 '13 at 19:15

Assume the function is uniformly continuous. This means that for a fixed $\varepsilon > 0$ we can find $\delta > 0$ so that: $$\forall x_1, x_2 \in [0, \infty) : |x_1 - x_2| < \delta \implies \left|x_1 \cos(x_1) - x_2 \cos(x_2)\right| < \varepsilon$$

Pick any $x_1$ and $x_2$ that satisfy $|x_1 - x_2| < \delta$. We can add $2\pi n$ to both and maintain that $|x_1 - x_2| < \delta$. However:

\begin{align*} \left|f(x_1 + 2\pi n) - f(x_2 + 2\pi n)\right| &= \left|(x_1 + 2\pi n)\cos(x_1 + 2\pi n) - (x_2 + 2\pi n)\cos(x_2 + 2\pi n)\right| \\ &= \left|\left(f(x_1) - f(x_2)\right) + 2\pi n\left(\cos(x_1) - \cos(x_2)\right)\right| \\ &\ge 2\pi n\left|\cos(x_1) - \cos(x_2)\right| - \varepsilon \end{align*}

By making $n$ as large as necessary, we can make $\left|f(x_1 + 2\pi n) - f(x_2 + 2\pi n)\right| > \varepsilon$. Hence, $f$ is not uniformly continuous.

-

If $f'(x)$ were bounded you could conclude that $f$ is uniformly continuous. Since $f'(x)$ is unbounded for $x\to\infty$ you cannot conclude anything from looking merely at the derivative. Note that $x\mapsto\sqrt{x}$ is uniformly continuous on ${\mathbb R}_{>0}$, but its derivative is unbounded.

In order to prove that the given $f$ is not uniformly continuous on ${\mathbb R}_{>0}$ we have to produce an $\epsilon_0>0$ and point pairs $x$, $y>0$ arbitrarily close to each other with $|f(y)-f(x)|\geq\epsilon_0$.

Choose $\epsilon_0:=1$ and put $$x_n:=2n\pi+{3\pi\over2}\,\qquad y_n:=x_n+{\pi\over n}\qquad(n\geq3)\ .$$ Then $y_n-x_n={\pi\over n}$. Furthermore there is a $\xi\in[x_n,y_n]$ with $$f(y_n)-f(x_n)={\pi\over n}f'(\xi)={\pi\over n}\bigl(\cos\xi-\xi\sin\xi\bigr)\geq{\pi\over n}\>\xi\>{1\over2}\geq\pi^2>\epsilon_0\ .$$

-