Function whose gradient is of constant norm Let $f:\mathbb R^n\rightarrow \mathbb R$ be a smooth function such that $\|\nabla f(x)\|=1$ for all $x\in \mathbb R^n$ and $f(0)=0$.
I would like to prove that $f$ is linear.
I first looked at the solution of the O.D.E. $$\dfrac{d\gamma}{dt}(t)=\nabla f(\gamma(t))$$
I noticed that there exists only one solution $\gamma_x$ passing through $x\in \mathbb R^n$ at $t=0$, and such a solution is defined over $\mathbb R$. I also proved that $$\gamma_x(t)=x+t\nabla f(x)$$ and $$f(\gamma_x(t))=f(x)+t.$$
Furthermore, the following hint is given : 

Show that if $f(x)=f(y)$ then $\langle \nabla f(x),x-y\rangle=\langle \nabla f(y),x-y\rangle=0$.

I did it, but now, I don't understand why it follows that $f$ is linear.
Edit: I write here the proof of the hint;
Let $c:[0,1]\rightarrow \mathbb R^n$ be the (usual) parametrization of the segment $[x+t\nabla f(x),y]$. Since $f(x)=f(y)$, we get $$\begin{align*}|t|=|f(\gamma_x(t))-f(x)| & =|f(x+t\nabla f(x))-f(y)|\\ & =|\int_0^1 \langle \nabla f(c(s)),c'(s)\rangle ds| \\ & \leq \int_0^1 \|c'(s)\|ds \\ & =\|y-x-t\nabla f(x)\|\end{align*}$$
From this inequality, which is true for any $t\in \mathbb R$ and using the fact that $\nabla f(x)$ is a unitary vector, it follows that :
$$t^2\leq \|x-y\|^2 + t^2 +2t\langle x-y,\nabla f(x) \rangle$$
Dividing by $t$ and taking limits to $\pm \infty$ gives the hint.
 A: From your tags, I suppose I can use some geometric argument here. 
Because of the condition $\|\nabla f\| = 1$, the level set 
$$M = M_c = \{x\in \mathbb R^n: f(x) = c\}$$
is a smooth hypersurface for all $c\in \mathbb R$ and for all $x\in M$, 
$$T_xM = \{ y + x \in \mathbb R^n : \langle y, \nabla f (x) \rangle = 0\}.$$
Let $x\in M$ and $y \in M$ be closed to $x$. The condition 
$$\langle \nabla f(x), x-y \rangle = 0$$
says that $x-y$ lie in the tangent space of $T_x M$ for all $y\in M$. Then $y\in T_xM$ for all $y$ closed to $x$ (Some arguments are needed here). With some more argument, one can show that $M = T_xM$ for all $x\in M$. This mean that 


*

*For all $c$, $M_c = V + cw$, where $w\in \mathbb R^n$ is a vector with norm one and $V = \{ x: \langle x, w\rangle = 0\}$, 

*$f(u+ tw) = g(t)$, where $u\in V$ and $g:\mathbb R\to \mathbb R$ and $g'(t)=1$ for all $t$. 


The second claim show that $f$ is linear. 
A: I know this is a very old question, but the claim is not true. Take $f(x) = \|x\|$, which has gradient $\nabla f(x) = x/\|x\|$. Obviously, $\|\nabla f(x)\|=1$, but the function does not satisfy the properties of a linear function.
