Prove $x\frac{\partial f}{\partial x}+y\frac{\partial f}{\partial y}=0 $ $\rightarrow$ $f\equiv c$ for $f:\Bbb{R^2}\to\Bbb{R}, f\in C^1  $ and $x\frac{\partial f}{\partial x}+y\frac{\partial f}{\partial y}=0 $  for every $(x,y)\in \Bbb{R^2}$ then $f\equiv c\in\Bbb{R}$
I was thinking it's similar to $g:\Bbb{R} \to \Bbb{R}$ if $g'=0$ then $g\equiv c$ but I don't sure how to prove it. 
thanks 
 A: Hint: we may evaluate
$$
f(x,y) - f(0,0) = \int_c \nabla f(\vec s)\cdot d \vec s
$$
where $c$ is the radial line given by
$$
c(t) = (tx,ty) \quad t \in [0,1]
$$

Alternative: Apply the mean value theorem to the function
$$
g(t) = f(tx,ty) \quad t \in [0,1]
$$
A: You are exactly correct in thinking it's similar to the 1D case. Possibly putting things into terms that you have learned:
$$0 = x \cfrac{\partial f}{\partial x}+ y \cfrac{\partial f}{\partial y} = (x,y) \cdot \nabla f$$
You may have seen this as the definition of the directional derivative of f in $(x,y)$ direction: $D(f; (x,y))$. At this point, the formal way to prove what you're looking for would be to take the line integral of both sides along the straight vector $(x,y)$ as Omnom initially suggested. The fundamental theorem of calculus will tell you that $\int \nabla f \cdot ds = f|_{start}^{end}$.
However, it might be easier to grasp what's happening here if you think of this relation solely in terms of derivatives (or change). If the directional derivative of $f$ is 0 in every direction $(x,y)$, that means that $f$ does not change in any direction. This can only be true if your function $f$ is identically a constant in every direction. Therefore, your function $f$ is identically a constant.
