# Prove $f$ is uniformly continuous

I have a question about uniform continuity and want to verify what I did is correct. The question is

Suppose that $f : \mathbb{R}^2 \rightarrow \mathbb{R}$ and all first partial derivatives exist and bounded. Prove $f$ is uniformly continuous or give counter example.

I believe this is true statement. I tried this as follows.

Proof. Since the first partial derivatives of $f$ exist and bounded, then $\|\nabla f\| \leq M$ for some real number $M$. The Mean Value Theorem says that there exists $c \in \text{dom}(f)$ such that $f(x)-f(y) = \nabla f(c)(x-y)$. Caucy inequality shows that $\|f(x) - f(y)\| \leq \|\nabla f(c) \| \|x-y\| \leq M \|x-y\|$. Let $\delta = \frac{\epsilon}{M} > 0$ and $\epsilon > 0$. Then, for every $\epsilon > 0$, there exists $\delta > 0$ such that $\forall x,y \in \text{dom}(f)$, $\|x-y\| < \delta$ implies $\|f(x)-f(y)\| \leq M \|x-y\| < M \delta = \epsilon$.

Can anyone verify that this is correct?? It seems that it is not formally stated but I tried my best. Also one thing I am not sure about is that if I can use the mean value theorem for the function defined on $\mathbb{R}^2$. One variable mean value theorem can be applied to a function defined on a closed interval such as $[a,b]$. The textbook I am using defines the mean value theorem on a line segment with two end points $a,b$. So I was confused if I can use the mean value theorem to a function defined on $\mathbb{R}^2$.

• Uniform continuity of a function is equivalent to a function satisfying a Lipschitz condition. That is $\|f(x) - f(y) \| \leq M\|x - y\|$. The last bit of the argument is not required, but the proof is good. – Ben Mar 29 '15 at 22:21
• @ben Not equivalent, lipschitz is stronger than uniform continuity. math.stackexchange.com/questions/69457/… – Alan Apr 3 '15 at 9:54
• @ Alan, you are correct. I have been working with linear operators as of late, in normed spaces, my mistake. I had improper context on equivalence. – Ben Apr 3 '15 at 19:53

Yes, your proof is completely correct.

• Consider adding more detail to the answer, this meta post gives some good suggestions to make answers to these sort of questions better. – Paul Plummer Mar 30 '15 at 5:15
• It is only asked to check the proof which is perfect. So there is nothing else I can do more. – Math Wizard Mar 30 '15 at 5:58
• They specifically point out a result that they are not sure they can use in this situation, your "answer" does not address these concerns at all. – Paul Plummer Mar 30 '15 at 6:06
• Im satisfied with verifying my answer. Thanks! – eChung00 Mar 30 '15 at 14:31

$\newcommand{\Reals}{\mathbf{R}}$This answer is belated, but for posterity: Somewhere your proof needs to be explicit that the domain of $f$ is convex: If $x$ and $y$ are in the domain of $f$, so is the segment joining $x$ to $y$.

As noted in MickG's answer, you can apply the ordinary mean value theorem to the function $g:[0, 1] \to \Reals$ defined by $g(t) = f\bigl((1 - t)x + ty\bigr)$ and deduce there exists a $c$ on the segment joining $x$ and $y$ such that $$\left\lvert f(y) - f(x)\right\rvert = \left\lvert\nabla f(c)\right\rvert \cdot \left\lVert y - x\right\rVert.$$

Without this detail, your proof is suspicious: If $D$ is a connected, non-convex subset of $\Reals^{2}$ and $f:D \to \Reals$ has bounded, continuous first partials everywhere in $D$, it does not follow that $f$ is uniformly continuous in $D$. For a simple example, let $D$ be the region obtained by removing from $\Reals^{2}$ the negative horizontal axis and a closed disk of radius $r > 0$ about the origin, and let $f$ be the polar angle function. The gradient of $f$ is $$\nabla f(x, y) = \frac{(-y, x)}{x^{2} + y^{2}},$$ so $\|\nabla f\| \leq 1/r$ throughout $D$, but $f$ "jumps by $2\pi$" across the negative horizontal axis, so is not uniformly continuous: If $x_{n} = (-2r, 1/n)$ and $y_{n} = (-2r, -1/n)$, then $$\lim_{n \to \infty} |y_{n} - x_{n}| = 0,\quad \text{but |f(y_{n}) - f(x_{n})| > \pi for all n.}$$

(You can play the same game with $f(x) = x/|x|$ in $D = \Reals \setminus\{0\}$; the function $f$ has derivative identically $0$, but is not uniformly continuous in $D$. The difference in the plane is, a non-convex set $D$ can be connected. This type of detail tends to snag the unwary.)

Your proof seems correct to me.

As for your doubt about the Mean Value Theorem, the theorem is for single-variable functions. However, restricting a multi-variable function to a line segment gives you a single-variable function. More precisely, the segment between two points $x,y$ is given by $\{tx+(1-t)y:t\in[0,1]\}$. Therefore, once $x,y$ are fixed, the restriction of a function to that segment is a function of $t$ alone. You apply the mean value theorem to that function and find $t_0$ such that, if $g$ is the restriction of a given $f:\mathbb{R}^n\to\mathbb{R}$ defined on the segment (and maybe more than just the segment) to the segment, then $g'(t_0)=\frac{g(1)-g(0)}{1}=f(x)-f(y)$. If you calculate $g'$, you will probably find $g'(t)=\nabla f(tx+(1-t)y)\cdot(x-y)$, giving the multivariate mean value theorem. Hope that was clear.