How does one prove that if function's partial derivative respect to every variable is zero, function is constant? How does one prove that if function's partial derivative respect to every variable that the function defines over is zero function is constant function? I just noticed it, but I cannot prove it.
Suppose the function $f(x,y)$ is non-constant and its partial derivatives exist everywhere. Then we have some $(x,y)$ and $(x',y')$ such that $f(x,y)\ne f(x',y')$. If $f(x,y)=f(x',y)=f(x,y')$ then these are distinct from $f(x',y')$, otherwise one of $f(x',y)$ or $f(x,y')$ is not $f(x,y)$. This means we only have to worry about one of the two variables! Lets say $f(x,y)\ne f(x',y)$ (the other cases are identical). By the Mean Value Theorem, we have some $c\in (x,x')$ such that
$$\frac{\partial f}{\partial x}(c,y)=\frac{f(x',y)-f(x,y)}{x'-x}\ne 0$$
thus the partial derivatives are not everywhere $0$.

You should be able to extend this to arbitrarily many variables on your own.
Let $f(x_1,x_2,...,x_n)$ be a function such that $\frac{\partial f}{\partial x_i}=0\,\forall i=1,2,\dots,n$.

Because $\frac{\partial f}{\partial x_1}=0$, the function does not depend on $x_1$

Because $\frac{\partial f}{\partial x_2}=0$, the function does not depend on $x_2$ either.

Continuing this, we come to conclusion that the function does not depend on any of the variables, and hence it is a constant.