I know that this question has been asked before ($|\nabla f (x)| =1$ implies $f$ linear?) but I struggle to fill in the details of the step by step "proof" given in the answer. What I've tried is here under, but there are still some holes. For example, I can't show $x \cdot u = 0 \implies x \in S$, and overall, I find the proof rather ugly. Such a simple problem ($|\nabla(f)| = 1$) with such a simple solution ($f$ linear), yet so not straightforward) Could anyone please make this more rigorous? Thanks in advance!
--
First, note that the paths of steepest ascent/descent are straight lines. Indeed, these are defined to be the solutions to the ODE $\gamma'(t) = (\nabla f)(\gamma(t)) $, and if we let $t_1, t_2 \in \mathbb{R}$ be arbitrary but different, we can apply the mean value theorem to $t \to f(\gamma(t))$ to obtain $$\frac{|f(\gamma(t_2)) - f(\gamma(t_1))|}{|t_2 - t_1|} = | (f\circ \gamma)'(t_0)| = |(\nabla f)(\gamma(t_0)) \cdot \gamma'(t_0)| = 1.$$ By $K$-Lipschitz continuity of $f$ this implies $$ |\gamma(t_2) - \gamma(t_1)| \geq |t_2 - t_1|.$$ Since $t_2$ and $t_1$ were arbitrary and since $\gamma$ has a constant speed of $1$, this can only be if $\gamma$ is a straight line.
Now let $S$ be the level surface where $f(x) = 0$. Let $p \in S$ be a point and $L$ the line of steepest ascent/descent through $p$. Let $u$ denote the unit vector which determines the direction of $L$, or $u = \nabla f(p)$. Now perform a translation on the coordinate system such that $p=0$ (this changes nothing, we can always retranslate back at the end of the proof). Now, using the mean value theorem again in a similar manner, we can find that $|f(ut)| = |t|$ and by continuity and smoothness, it's either $f(ut) = t$ for all $t\in \mathbb{R}$, or $f(ut) = -t$ for all $t \in \mathbb{R}$. Hence, by $f$ being $1$-Lipschitz, we have $$|tu - s| \geq |t|,$$ for all $s \in S$ and all $t \in \mathbb{R}$. This implies $u \perp s $:
Indeed, let $s \in S$ and write $s = a + b$ where $a \perp u$ and $b \parallel u$ but suppose $b \neq 0$. Write $b = t_b u$ for some $t_b \in \mathbb{R} \setminus \{0\}$. By the Pythagorean theorem and the above, $$(t-t_b)^2 + |a|^2 = |tu - t_b u|^2 + |a|^2 =|tu - a - b|^2 \geq t^2$$ for all $t \in \mathbb{R}.$ This is a contradiction because if we pick $|t|$ large enough, and give $t$ the opposite sign of $t_b$, the left hand side will become greater than the right hand side.
Hence, we can find that $S = \{x \mid x \cdot u = 0\}$ or that $S$ is a plane. With some more work, we can find that all the level surfaces of $f$ are planes parallel to $S$. Depending on whether $f(ut) = t$ or $f(ut) = -t$ was the case earlier, we find $$S + ut = \{x \mid f(x) = t\} \text{ or } \{x \mid f(x) = -t\}.$$ And then, $f(x) = \pm (u_1 x_1 + \ldots + u_n x_n)$, what we wanted to show. (Retranslating the coordinate system yields the constant term in the formula for $f(x).$)