Question about total derivative If $z=f(x,y)$, then total derivative is $\mathrm{d}z=\frac{\partial f}{\partial x}\mathrm{d}x+\frac{\partial f}{\partial y}\mathrm{d}y$. If $\mathrm{d} z=0$, how do you show that $z$ is a constant?

If $df = 0$, then $\frac{\partial f}{\partial x} \ dx = -\frac{\partial f}{\partial y} \ dy$. I guess one could solve for $f(x,y)$ to get $f(x,y) = g(x-y)$ since $(f_x+f_y)g(x-y) = g'(x-y)+(-1)g'(x-y) = 0$ identically for some $g \in C^1$. 
