# how to prove $f(x)=x^2$ is uniformly continuous on $[n,n+1/n^2]$

So far here's what I got. Set $\delta=1/(n^2-1)$ then $|x-y|<\delta\implies(x,y)=(n,n+1/n^2)$ then $|x^2-y^2|=(2n^3+1)/n^4<\epsilon$ for some $\epsilon$. At this point I'm stuck. Do you know how I can move forward or have a better approach?

Thank you very much in advance!

## 2 Answers

A continuous function on a compact interval is uniformly continuous.

If $x,y\in [n,n+1/n^2]$, $|x^2-y^2|=|x-y||x+y|\leq 2(n+1)|x-y|$. For every $c>0$, $x,y\in [n,n+1/n^2]$ and $|x-y|<{c\over{2n+2}}$ implies that $|x^2-y^2|<c$.

• can the proof be done in the epsilon delta way tho? :S Mar 19, 2017 at 23:44

Though the more general theorem may be used, I assume you are practicing, so this is the argument in the same vein as your approach.

For $x \in [n,n+1/n^2]$, $x \leq n + \frac{1}{n^2}$. Now, for any $\epsilon>0$

$$|f(x)-f(y)| = |x^2-y^2| = |x+y||x-y| \leq 2(n+1/n^2)|x-y| < 2(n+1/n^2) \delta$$ whenever $|x-y|<\delta$. So if we require $\delta < \frac{\epsilon}{2(n+1/n^2)}$, then $|f(x)-f(y)| <\epsilon$, as desired.