Let $D\subset \Bbb{R}^n$ be an open set (non empty) and convex. Let $f:D\to \Bbb{R}$ be a $C^1(D)$ function s.t $\exists C \in \Bbb{R}$ s.t $\|\nabla f(x)\|\leq C \ \forall x \in D$. Show that $f$ is uniformly continuous on $D$. If someone could give a feedback on my proof, I would really appreciate it.
By contradiction suppose $f$ is not uniformly continuous. Thus, there exist $\epsilon>0$ s.t for all $k>0$ there are sequences $x^k,y^k$ in $D$ satisfying $\|x^k-y^k\|<1/k$ but $|f(x^k)-f(y^k)|>\epsilon$. Thus, $\|x^k-y^k\|\to 0$ as $k\to \infty$
As $D$ is convex and $f\in C^1(D)$ (so $[x^k,y^k]\subset D \ \forall k$), we can apply the mean value theorem. So for all $k$ there exist $z^k\in [x^k,y^k]$ s.t $|f(x)-f(y)|=|Df(z^k)(x^k-y^k)|\le \|Df(z^k)\|\|x^k-y^k\| \iff \frac{|f(x^k)-f(y^k)|}{\|x^k-y^k\|}\le \|Df(z^k)\| \iff \|Df(z^k)\|>\frac{\epsilon}{\|x^k-y^k\|}$. Taking the limit on RHS and LHS ($k\to \infty$) we get that $\|Df(z^k)\|\to \infty$ which is a contradiction (Clearly $z^k\in D$ for all $k$ by it's choice)