mean value property of derivatives in high dimensions Let $E$ be a path-connected subset of $\mathbb{R}^n$ and $f$ a differentiable function on $E$. Prove or disprove:
for any $x,y\in E$, there exists $z\in E$ such that $f(x)-f(y)=\nabla f(z)\cdot (x-y)$. 
How to solve this? Thanks.
I have tried but failed: 
(1). Suppose $E$ is convex. Let $g(t)=f(x+t(y-x))$. Then $g'(t)=\nabla f(x+t(y-x))\cdot (y-x)$. By mean value theorem, there exists $t_0\in (0,1)$ such that  $g'(t_0)=g(1)-g(0)=f(y)-f(x)$. We choose $z=x+t_0(y-x)$. 
(2). In general, $E$ is only assumed path-connected. If I let $\gamma$ be a curve such that $\gamma(0)=x$ and $\gamma(1)=y$, and $g(t)=f(\gamma(t))$, then $g'(t)=\nabla f(\gamma(t))\cdot \gamma'(t)$. However,  $\gamma'(t)\neq y-x$. Hence I cannot solve...
 A: Hint: consider $t\to (\cos t, \sin t)$.
A: The claim is not true in general if the domain is not assumed to be convex.
As a counterexample, note that validity of your estimate would in particular imply
$$
|f(x) - f(y)| = |\nabla f(z) \cdot (x-y)| \leq \Vert \nabla f \Vert_\infty \cdot |x-y|,
$$
if the gradient of $f$ is bounded on $\Omega$, i.e. $f$ would be Lipschitz in that case. In the example below, $f$ will have bounded gradient, but will not be Lipschitz, so that your claim is not true for that $f$.
Take
$$
\Omega = [((-1,0) \cup (0,1)) \times (0,1)] \cup [(-1,1) \times (1/2, 1)]
$$
and note that $\Omega$ is indeed bounded, open and path-connected.
The idea is now to take $f \equiv 1$ on the "lower" part of the "left half" of $\Omega$ and $f \equiv 0$ on the "lower" part of the "right half" of $\Omega$ and to let $f$ vanish on the "upper" part of $\Omega$ to make everything smooth.
More precisely, take a smooth (at least $C^1$) function $g : \Bbb{R} \to \Bbb{R}$ with $g \equiv 0$ on $(-\infty, -2)$ and on $(1/4, \infty)$ and with $g \equiv 1$ on $(0, 1/8)$.
Define $f : \Omega \to \Bbb{R}$ by $f(x,y) = g(y)$ for $x \in (-1,0)$ and $f(x,y) = 0$ for $x \notin (-1,0)$. Note that $f$ with this definition is smooth with $\nabla f(x,y) = (0, g'(y))$ for $x \in (-1,0)$ and $\nabla f(x,y) = 0$ for $x \notin (-1,0)$, so that $\nabla f$ is bounded.
Now note
$$f(-\varepsilon, 1/16) = 1 \text{ and } f(\varepsilon, 1/16) = 0$$
for all $\varepsilon \in (0,1)$ which shows that $f$ is not Lipschitz.
