May I please ask how to prove that $f(x)=x^2$ is uniformly continuous on any bounded interval? I know that there is a theorem saying that every continuous function on a compact set is uniformly continuous. But on the real line, "compactness"="closed and bounded". Why is that true that boundedness itself is sufficient for uniform continuity?
-
5$\begingroup$ Hint: Every bounded interval is contained in a closed bounded interval. $\endgroup$ – Guy May 1 '17 at 10:44
-
1$\begingroup$ In a bounded intervall you have a bounded derivative and so $x\mapsto x^2$ is even Lipschitz continuous. $\endgroup$ – Frieder Jäckel May 1 '17 at 10:47
By the mean value theorem, $f(x)-f(y)=f'(\xi)(x-y)$, for some $\xi\in[x,y]$. So, since $f'$ is continuous in $\mathbb{R}$, in a bounded domain $B$ we have $\forall x\in B\ f'(x)\leq C$, for some $C>0$ ($\bar{B}$ must be compact). It follows that $|f(x)-f(y)|\leq C|x-y|$ for all $x,y\in B$.
Next, take $\epsilon >0$. If $|x-y|<\frac{\epsilon}{C}$ then $|f(x)-f(y)|\leq C|x-y|<C\frac{\epsilon}{C}=\epsilon$.
Let $(a,b)$ any interval with $a<b$ (it could be, $[a,b),\ [a,b],\ (a,b]$, this fashion an interval looks like, all of them are bounded), we need to show, for each $\epsilon>0$ there exists a $\delta>0$ such that if $x, \ y\in(a,b)$ and $0<|x-y|<\delta$ then $|f(x)-f(y)|<\epsilon$. Now, note if $x,\ y \in(a,b)$ than $a<y<b$ and $a<x<b$ (if $b\neq0$), and:
$$|f(x)-f(y)|=|x^2-y^2|=|(x+y)(x-y)|=|x+y|\cdot|x-y|\stackrel{*}{<}2|b|\cdot|x-y|$$
Now, let $\epsilon>0$ given, choose $\delta(\epsilon)=\frac{\epsilon}{2|b|}>0$ if $x,\ y \in(a,b)$ and $0<|x-y|<\delta$ then $$|f(x)-f(y)|<2|b|\cdot|x-y|<2|b|\cdot\delta=\epsilon$$ Observe that $\stackrel{*}{<}$ it's beacuse $a<y<b$ and $a<x<b$ implies $2a<x+y<2b$. Now if $b=0$, then $2a<x+y<0<-2a \Rightarrow |x+y|<-2a$, and you can choose $\delta(\epsilon)=-\frac{\epsilon}{2a}>0$.
Two solutions:
Using the theorem you quoted, $f$ is uniformly continuous on $[a,b]$ and hence on any subset of $[a,b]$.
Since $f(x)-f(y)=(x+y)(x-y)$, $f$ is Lipschitz on any bounded set.