TITLE: Generalization of intermediate value theorem for derivative
QUESTION [7 upvotes]: Let $f: \Bbb R^n \to \Bbb R $ be a differentiable function (not necessarily  smooth), and $C$ is a connected set. Is $\nabla f(C)$  connected subset of $\Bbb R^n?$

REPLY [4 votes]: I do not know what happens in dimension 2, but the answer to your question is negative in higher dimensions: 
Theorem. For every $n\ge 3$ there exists a differentiable function $f: R^n\to R$ and a path-connected subset $C\subset R^n$ such that $\nabla f(C)$ is disconnected. 
Proof. First of all, for every $n\ge 2$ there exists a  differentiable function $f: R^n\to R$ such that $\nabla f({\mathbf 0})={\mathbf 0}$ and 
$$
G= \nabla f^{-1}(B({\mathbf 0}, 1))
$$
has Hausdorff dimension 1. In particular, $\nabla f(R^n)$ has nonempty intersection with the complement of the unit ball $B({\mathbf 0}, 1)$. 
This is Theorem 1.2 in 
M. Zelený, The Denjoy-Clarkson property with respect to Hausdorff measures for the gradient mapping of functions of several variables, 
Annales de l'institut Fourier, 58 no. 2 (2008), p. 405-428. 
I will also need: 
Lemma. If $n\ge 3$ then for every subset $E\subset R^n$ of Hausdorff dimension $\le 1$, the complement $A:= R^n -E$ is path-connected. 
Proof.
For each point $p\in R^n - E$, $n\ge 3$, almost every (in the sense of the Lebesgue measure on the projective space $RP^{n-1}$) straight line through $p$ is disjoint from $E$. This is an application of Theorem 6.8 in 
P. Mattila, Hausdorff dimension, orthogonal projections and intersections with planes,
Ann. Acad. Sci. Fenn. Ser. A I Math. 1 (1975), no. 2, 227–244.
Now, pick two points $p, q\in A$. Let $S_p, S_q$ be the unions of lines through $p, q$ respectively, which have nonempty intersection with $E$. Then $S_p, S_q$ have zero $n$-dimensional Lebesgue measure: This is a consequence of Mattila's theorem. Hence, their union also has zero measure. 
Thus, there exists a point $x\in R^n -(S_p \cup S_q)$. Let $L_p, L_q$ denote the lines passing through $p, x$ and $q, x$ respectively. Then $L_p\cup L_q$ is path-connected, contains $p$ and $q$, and is disjoint from $E$. 
qed
I will apply this lemma to the set $E= G -\{{\mathbf 0}\}$. Its complement $A$ is path-connected.  On the other hand, its image under $\nabla f$ is disconnected: It contains ${\mathbf 0}$ and some points in $R^n - B({\mathbf 0}, 1)$ but no points in $B({\mathbf 0}, 1)- \{{\mathbf 0}\}$. qed