Question. If $X\left(x,t\right)$ has continuous partial derivatives on a bounded closed area/set $\mathscr{D}\subset\mathbb{R}^n\times\mathbb{R}$, then prove or disprove that $X$ is a Lipschitz function for variable $x$.
I'm reading a lemma about prove a function to be Lipschitz, the lemma declared in a convex set $\mathscr{D}$ and used the mean value theorem. But what I'm thinking is: If "the convexity" is necessity? I know that the derivative of $X$ is bounded in the domain, but without the convexity, we cannot use the mean value theorem here. Intuitively, this seems correct.
thanks for anyone's answer before, I studied for hours for a satisfactory answer of this question, and I got a sophisticated counterexample, this counterexample constructed from cantor set, and modified many times to satisfied the condition sharply in 1 dimension. I rearranged my construction to make it more readable, please check and I will close this question.
suppose $k_{n}=2^{n}$, $l_{n}=1-\frac{1}{2^{n}}$(generally, I just suppose $k_n\to\infty$, $l_n\to 1$ in my draft), for any $n\in\mathbb{N}$, when $x\in\left[\frac{1}{2^{n+1}},\frac{2k_{n}-l_{n}-1}{2^{n+1}\left(k_{n}-l_{n}\right)}\right]$, define $f\left(x\right)=l_{n}\left(x-\frac{1}{2^{n+1}}\right)+\frac{1}{2^{n+1}}$, $f\left(0\right)=0$ to ensure that the domain of $f$ is closed, and $f\left(x\right)$ undefined for other $x$. easy to checked the derivative of each point in the domain other than $x=0$ is exists. Also $f'\left(0\right)=1$ is easy to check by the definition:
$$f'\left(0\right)=\lim_{D\left(f\right)\ni x\to0}\frac{f\left(x\right)}{x}=\lim_{n\to\infty,x\in I_{n}}\frac{l_{n}\left(x-\frac{1}{2^{n+1}}\right)+\frac{1}{2^{n+1}}}{x}=1,\quad I_{n}=\left[\frac{1}{2^{n+1}},\frac{2k_{n}-l_{n}-1}{2^{n+1}\left(k_{n}-l_{n}\right)}\right].$$
But, the difference quotients of the function f at endpoints of each interval is unbound, that is $$\frac{f\left(\frac{1}{2^{n}}\right)-f\left(\frac{2k_{n}-l_{n}-1}{2^{n+1}\left(k_{n}-l_{n}\right)}\right)}{\frac{1}{2^{n}}-\frac{2k_{n}-l_{n}-1}{2^{n+1}\left(k_{n}-l_{n}\right)}}=k_{n}\to\infty$$ as this counterexample is designed by this equation. I drawed a picture of this function using MMA as follows:

Here is a counterexample: $$ f(x,y) = \begin{cases} 0 & \text{when } -1 \le x \le 1 \text{ and } -1 \le y \le 0 \\ 1 & \text{when } 0 < x \le 1 \text{ and } x \le y \le 2x \\ \text{undefined} & \text{otherwise} \end{cases} $$
This satisfies all of the condition except convexity of the domain, at least if "has partial derivatives" means something it is possible for a function on a bounded closed set to satisfy. But it is not even continuous at the origin, and so in particular not Lipschitz.
Whoops. This is not really a counterexample because it doesn't have a definite $\partial f/\partial x$ at the point $(1,2)$. In one sense, this is a "boring" way to fail, because it is far from the point of real interest at the origin, so we can easily fix it by restricting everything to $y\le1.9$.
On the other hand, it doesn't really feel worth it to fix the example, because this very failure showcases that it is unexpectedly hard for a function to have all partial derivatives everywhere when it is defined on a closed bounded subset.
This means that the corrected claim
is, even though it is true, not a very interesting result for $m\ge 2$ because there are very few functions that satisfy the assumption. In particular, every $f$ that satisfies it can be made to stop satisfying it just by rotating the coordinate system by a random angle. It doesn't even apply to a constant function defined on the closed unit disk.
(See the comment thread where David C. Ullrich discusses various proposals for salvaging the claim).