$|\nabla f (x)| =1$ implies $f$ linear? Suppose $f: \mathbb{R}^n \to \mathbb{R}$ is smooth and $|\nabla f (x)| = 1$. Must $f$ be linear (up to an additive constant)? That is, must we have $f(x) = a\cdot x +b$ for constant $a,b\in\mathbb{R}^n$ with $|a| = 1$?
 A: Yes, this is true: smooth global solutions of the eikonal equation are affine. The proof is similar to Solution of eikonal equation is locally the distance from a hypersurface, up to a constant. It goes like this: 


*

*By the mean value theorem, $f$ is $1$-Lipschitz.

*Trajectories of steepest ascent/descent, i.e., solutions of the ODE $x'(t)=\nabla f(x(t))$ both forward and backward in time, are straight lines. Indeed, along such a curve we have 
$$|x(t)-x(s)| \ge |f(x(t))-f(x(s))|=|t-s|$$ which, the curve being unit speed, implies that it's a line. 

*Let $\Gamma$ be any level surface of $f$ (WLOG,  $G=\{f=0\}$), and $L$ a normal line to this set. By item 2  above, $L$ a path of steepest ascent/descent. Choose coordinates so that $L$ is the $x_1$-axis. The restriction of $f$ to $L$ is either $x_1$ or $-x_1$. The $1$-Lipschitz condition implies  $\operatorname{dist} (te_1,\Gamma)=|t|$ for all $t\in\mathbb{R}$. Hence, $\Gamma=\{x:x_1=0\}$. 

*Since all level surfaces are planes, and they are disjoint, they must be parallel. After rotation, $f$ is a function of $x_1$ only: more specifically,  either $x_1$ or $-x_1$. 

