[Math] Prove $f$ is uniformly continuous

multivariable-calculusreal-analysisuniform-continuity

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$.

Best Answer

$\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.)