# f continuously differentiable implies f is Lipschitz on compact subsets

It is a more general form of the question here, only here $U$ is not a convex set but an open and connected subset of $\mathbb{R}^n$. I need to show that $f$ is $M$ Lipschitz on any compact $K \subset U$.

My attempt goes like this:
$U$ is an open connected set, and $K \subset U$ so for any two points $x,y \in K$ there is a finite set of points $\{x_i\}_{i=1}^{r}\in K$ and we'll denote $x_1:=x, x_r:=y$ so for every $i=2,3,...,r$ the straight segment $[x_{i-1},x_{i}]$ is contained by $K$.

By the mean value theorem for several variables, $\forall i=2,3,...,r:\ \lvert f(x_{i-1})-f(x_i) \rvert= \lVert f'(s_i) ( x_{i-1} - x_i ) \rVert$ when $s_i\in U$. Notice that since $s_i ,\ i=2,3,...,r$ is finite thus bounded, $f'$ exists and continuous - thus $\exists T := \max_{i=1,2,..,r} \{ \lVert f'(s_i) \rVert \}$, and because $K$ is compact, $\exists D:= \ diam \{ K \} \geq \max_{i=2,3,...,r} \{ \lVert x_{i-1} -x_i \rVert \}$ hence: $$\lvert f(x)-f(y) \rvert=\lvert f(x_{1})-f(x_2) +f(x_2)-f(x_3)+.... +f(x_{r-1})-f(y)\rvert \leq TB\cdot r$$ and since the diameter of $K$ is finite, every $x \neq y \ \in K$ have a real positive number $t$ so that $\lVert x-y \rVert \cdot t = B$ and that gives $||f(x)-f(y)|| \leq T \cdot t \cdot||x-y||$.

Is it o.k?

• I don't think it is ok: the Lipschitz constant seems to be dependent on $x,y$, while it shouldn't be. Commented Apr 17, 2015 at 16:59
• Why do you think $K$ contains any line segments at all? $K$ could be a weird Cantor-like set.
– zhw.
Commented Apr 17, 2015 at 17:09
• @zhw. If a set is open and connected (region) then it is polygonally connected math.stackexchange.com/questions/847337/polygonally-connected Commented Apr 18, 2015 at 7:31
• But $K$ is an abitrary compact subset of $U,$ and may contain no line segments at all.
– zhw.
Commented Apr 18, 2015 at 16:21
• I can't see how. Do you have any concrete example in mind for a situation like this? Commented Apr 18, 2015 at 16:29

Suppose the desired conclusion is false. Then for every $m\in \mathbb {N},$ there exist $x_m,y_m \in K$ with $|f(x_m)-f(y_m)|> m |x_m-y_m|.$ Now $K$ is compact, so there is a subsequence $m_k$ such that $x_{m_k}\to x,y_{m_k}\to y$ for some $x,y\in K.$ By continuity, $f(x_{m_k})\to f(x), f(y_{m_k})\to f(y).$ If $x\ne y,$ you get $|f(x)-f(y)| = \infty,$ contradiction. Thus $x=y.$ Choose $r > 0$ such that $\overline {B(x,r)}\subset U.$ Now you're in a nice compact convex set, where you know $f$ is Lipschitz, and yet $x_{n_k},y_{n_k} \in \overline {B(x,r)}$ for large $k$ and $|f(x_{m_k})-f(y_{m_k})|>m_k|x_{m_k}-y_{m_k}|,$ contradiction.

• You seem to assume that $x\in U$ when you write that $\overline{B(x,r)} \subset U$, don't you? Commented May 23, 2016 at 16:54
• $x,y$ are both in $K$, which is a subset of $U.$
– zhw.
Commented May 23, 2016 at 17:12
• Of course... I have a extension problem in mind but that's not the question. Commented May 23, 2016 at 17:17
• By the way, what does "M Lipschitz" mean?
– zhw.
Commented May 23, 2016 at 17:18
• You started with the assumption 'desired conclusion is false', but for the case $x=y$, how tcan you say 'Now you're in a nice compact convex set, where you know $f$ is Lipschitz' ?
– Riaz
Commented Nov 27, 2020 at 0:26