Multivariate differentiable function on a compact is a Lipschitz function? Let $n,m\in\mathbb{N}$, such that $E=(\mathbb{R}^n,\|\cdot\|_E)$ and $F=(\mathbb{R}^m,\|\cdot\|_F)$ with $\|\cdot\|_E$ and $\|\cdot\|_F$ two norms (we do not care which one since $n,m\in\mathbb{N}$).
I have a little doubt about the "lipschitzness" of a mapping $f$. Assuming $f:E\rightarrow F$, differentiable over $E$ (thus continuous over $E$). If $C\subset E$ is compact, then $f$ is $k$-lipschitz for a given $k>0$ over $C$, right ?
If $n=m=1$, I know that is true, but I didn't find the same result in multivariate fashion (maybe because it is too obvious) and I did not go further on this question since it's been a while I do not have pratice math.
Since $\mathbb{R}^n$ has very good topological properties, I think that this result is true. Am I wrong ?
Thanks !
Edit : Nice counter examples below !
The aforementioned statement is right only if $f$ is $C^1$.

It’s not true, even for $m = n = 1$. Note, for a differentiable function, Lipschitzness is equivalent to having a bounded derivative. So, we just need a differentiable function with an unbounded derivative. Let:
$$f(x) = \begin{cases}x^{5/3} \sin\left(\frac1x\right) & \text{if } x \neq 0 \\ 0 & \text{if } x = 0.\end{cases}$$
The derivative exists at $x \neq 0$, as it is a product and composition of differentiable functions. Using the usual derivative rules, we get
$$f’(x) = \frac{5}{3}x^{2/3} \sin\left(\frac{1}{x}\right) - x^{-1/3}\cos\left(\frac{1}{x}\right).$$
For $x = 0$, we use the limit definition:
$$f’(0) = \lim_{h \to 0} \frac{f(h) - f(0)}{h} = \lim_{h \to 0} h^{2/3} \sin\left(\frac{1}{h}\right),$$
where the above expression of $h$ is sandwiched between $\pm h^{2/3}$, both of which tend to $0$ as $h \to 0$. Thus, $f’(0) = 0$. So, the function is defined everywhere, including every compact set containing $0$ in its interior.
We just need to show that $f’$ is unbounded around $0$. If we take $x_n = \frac{1}{2n\pi}$, then $x_n \to 0$ and
$$f’(x_n) = \frac{5}{3}x_n^{2/3} \sin(2\pi n) - \sqrt[3]{2\pi n}\cos(2\pi n) = -\sqrt[3]{2\pi n} \to -\infty$$
as $n \to -\infty$. Thus, $f$ cannot be Lipschitz on any compact set containing $0$ in its interior, e.g. $[-1, 1]$.
