Let $f:\mathbb R^n \to \mathbb R$ be a map , $S$ be an open convex set in $\mathbb R^n$ such that for every $x \in S$ and $y \in \mathbb R^n$ , $f'(x;y)$ exists and equals $0$ ; then how to show that $f$ is constant on $S$ ?
(where $f'(x;y)=\lim_{h \to 0} \dfrac{f(x+hy)-f(x)}{h} $ )
By contradiction. Assume $f(x_1)\neq f(x_2)$. Define $y=x_2-x_1$, $g(t) = f(x_1+ty)$. You know that $g'(t)=f'(x_1+ty;y)=0$ for all $t\in[0,1]$. Lagrange theorem gives $g(1)-g(0) = g'(s)(1-0)$, with $s\in[0,1]$. But $g'(s)=0$ and $g(1)-g(0)=f(x_2)-f(x_1)\neq 0$. Contradiction.