Let $f:\mathbf{R}^k\to \mathbf{R}$ be a function such that all partial derivatives exists on all of $\mathbf{R}^k$.
If $D_i f(\vec{x})=0$ for all $\vec{x}\in\mathbf{R}^k$ and all $i$, show that there exists $c\in\mathbf{R}$ such that $f(\vec{x})=c$ for all $\vec{x}$.
Let $\vec{x}=(x_1,\ldots,x_k)\in\mathbf{R}^k$. Define for all $1\leqslant i\leqslant k$, $g_i:\mathbf{R}\to\mathbf{R}$ by $g_i(t)=f(x_1,\ldots,t,\ldots,x_k)$ with $t$ on the $i$-th place. Then $g'(x_i)=D_i f(\vec{x})=0$. Since $\vec{x}$ and thus $x_i$ is arbitrary, this implies that $g_i \equiv c_i\in\mathbf{R}$ according to some theorem in my textbook.
The thing is, how do I now use this information to conclude that $f$ itself is constant?