# Continuity and uniformly continuous proof

Prove that the function $f(x)=x^2$ is continuous but not uniformly continuous on the interval $I=(0,\infty)$.

I always get confused proving uniform continuity because it is so similar to continuity.

My attempt:

I must prove $$\forall \epsilon > 0, \forall x \in X, \exists \delta > 0 : |x - y| < \delta \implies |f(x) - f(y)| < \epsilon$$ for continuity. Thus, let $\epsilon>0$, then for $\delta>0$ $\exists \ (x,x_0)\in I$ such that $$|x−x_0|<\delta \implies |f(x)−f(x_0)|<\epsilon$$ $\forall$ $x,x_0\in\mathbb{R}$.

Therefore we have, $|f(x)−f(x_0)|=|x^2−x_0^2|=|x+x_0||x−x_0|$ thus we have that $$2x_0-\delta\le x+x_0\le 2x_0+\delta.$$ How can I finish this up?

Also, for showing that it is not uniformly continuous I must show that $$\text{there exists} \ \epsilon >0 \ \forall \ \delta \ \exists \ (x_0,x)\in I:\{|x -x_0|<\delta \implies |f(x)-f(x)^2|\ge \epsilon\},$$ but how can I prove that?

Unless you are required to prove continuity using $\epsilon,\delta$, you can just argue that $f(x)=x^2$ is continuous on its domain since its the product of the continuous functions $g(x)=x$ with itself.
To show $f(x)$ is not uniformly continuous on $(0,\infty )$, notice that for all $x\in (0,\infty )$: $|(x+h)^2-x^2|=|2xh+h^2|=2xh(1+h)>2xh$.
So, given $\delta >0$, consider $h=\frac{\delta }{2}$, and then take $x>\frac{1}{2h}$. Then, for $y=x+h$, you'll have $|x-y|<\delta$ and $|f(x)-f(y)|>2xh>1$. This shows the failure of uniform continuity (with $\epsilon = 1$).
• I am sorry for being picky, but where did you get $(x+h)$, $h=\frac{\delta }{2}$ and $x>\frac{1}{2h}$ from? I am asking because I really want to understand this and all the places I go that gives examples of uniform continuity always take shortcuts and gets me lost. Commented Apr 22, 2013 at 8:45
• well, we are looking for two values, $x,y$, that are close to each other but such that $f(x),f(y)$ are far apart. I'm looking for $y$ in the form $x+h$ (since the $h$ then controls how far $y$ is from $x$), and I analyze the distance $|f(x)-f(x+h)|$ (second paragraph). That distance is bigger than $2xh$, so, to get $y$ and $x$ close I need small value for $h$, while to get distance between $f(x)$ and $f(y)$ large, I want a large value for $x$ (third paragraph). Commented Apr 22, 2013 at 9:30