Strategy for showing function is not uniformly continuous

Consider the function $f: \mathbb{R} \rightarrow \mathbb{R} : x \mapsto x^2$. I need to show this function is not uniformly continuous.

So I need to show that: $$\exists \epsilon > 0, \forall \delta > 0, \exists x, y \in \mathbb{R}: |x - y | < \delta \quad \text{and} \quad |x^2 - y^2 | \geq \epsilon.$$

I pick $\epsilon = 1$. Then I see that for example $$| x^2 - y^2 | = |x + y | | x - y | \geq 1$$ will hold if I let $y = 0$ and $x = 2$. But I also want that $| x - y | = | 2 | < \delta$. However, the definition requires that I need to have this for all $\delta > 0$, and here I'm already restricting $\delta$ to be greater than $2$, which is a loss of generality in my opinion.

So how to pick $x$ and $y$ in general so that $| x - y | < \delta$ holds in all cases?

• The problem arises when $x,y\to\infty$. So, as you chose $\epsilon=1$, then there should be some $\delta>0:\,\forall x,y: \, |x-y|\leq \delta$ you should have $|f(x)-f(y)|\leq 1$. But for $|x-y|=\delta/2$ this is $|x^2-y^2|=|x+y||x-y|=|x+y|\frac{\delta}{2}\to \infty$ when $x,y\to \infty$ – Svetoslav Feb 28 '16 at 14:05

$\newcommand{\Reals}{\mathbf{R}}\newcommand{\eps}{\varepsilon}$It may help to think of uniform continuity as an adversarial game. Here, the referee supplies a function $f:X \to \Reals$, with $X$ a non-empty set of real numbers. Your opponent, Player $\eps$, chooses a positive number. Your task as Player $\delta$ is to choose a positive real number $\delta$ such that if $x$ and $y$ are elements of $X$ satisfying $|x - y| < \delta$, then $|f(x) - f(y)| < \eps$.

If you have a winning strategy against a perfect opponent, we say "$f$ is uniformly continuous on $X$". If instead Player $\eps$ has a winning strategy, then $f$ is not uniformly continuous on $X$.

Your difference-of-squares observation shows that the squaring function $f(x) = x^{2}$ is uniformly continuous on every bounded subset of $\Reals$. Indeed, if $X \subset [-M, M]$ for some positive $M$, you can choose $\delta = \frac{1}{2M}\, \eps$. For this choice, $|x - y| < \delta$ implies $$|f(x) - f(y)| = |x^{2} - y^{2}| = |x - y| \cdot |x + y| \leq |x - y| \cdot 2M < \tfrac{1}{2M}\, \eps \cdot 2M = \eps.$$

Where does this argument go astray if $X = \Reals$? Let's say your opponent chooses $\eps = 1$. Your task is to choose a positive real number $\delta$ such that if $x$ and $y$ are real numbers satisfying $|x - y| < \delta$, then $|x - y| \cdot |x + y| < 1$.

You asked what if you let $y = 0$ and $x = 2$, but that's not the information you're free to specify in this game: You can only constrain $x$ and $y$ by enforcing $|x - y| < \delta$.

If you can't see why Player $\delta$ loses in general, try the game with specific $\delta$. Let's try $\delta = 0.01$. Your task as Player $\delta$ is to ensure $0.01|x + y| < 1$ for all real $x$ and $y$ with $|x - y| < 0.01$. Uh-oh. If $x = 100$ and $y = 100 + 0.005$, then $|x - y| < 0.01$, but $|f(x) - f(y)| > 1$. If you can make this idea work for a general positive $\delta$, you have a proof that $f(x) = x^{2}$ is not uniformly continuous on $\Reals$.

I do not know why you have to assume $\delta>2$

we have $1\leq |x+y||x-y|<\delta |x+y|$ i.e., $|x+y|>\frac{1}{\delta}$.

Given $\delta$ you can always choose $x,y$ such that $|x+y|>\frac{1}{\delta}$ for example you can choose $x=y=\frac{1}{\delta}$ for this $|x-y|=0<\delta$