$\frac{\partial f(x,y)}{\partial x} = n \cdot \frac{\partial f(x,y)}{\partial y} \implies f(x,y) = g(nx+y)$ for some differentiable function $g$ Does $\frac{\partial f(x,y)}{\partial x} = n \cdot \frac{\partial f(x,y)}{\partial y} \implies f(x,y) = g(nx+y)$ for some differentiable function $g$?
I found the proof here but it uses directional derivatives. Is there a more elementary way to do this?
Can we do something like this:
Consider some $(a,b)$ and the line $nx+y = na+b$ it belongs to. We will show that every $(x,y)$ on this line maps to the same real number. For brevity, let $na+b = c$.
Let $h(x) = U(x,c-nx)$. Then
\begin{align*}\frac{\partial U(x,y)}{\partial x} = n \cdot \frac{\partial U(x,y)}{\partial y} &\implies \frac{dh(x)}{dx} = n \cdot \frac{dh(x)}{dy} = n \cdot \frac{dh(x)}{d(c-nx)} = \frac{dh(x)}{dx} \cdot (-1)  
\\ &\implies h'(x) = 0
\end{align*}
This tells us that $h$ is constant as desired.
Is this proof correct?
 A: I will staudy the case $n \geq 2$. Let $(u, v) = (x + y, n x + y)$ and :
$$f(x, y) = g(u, v)$$
By the chain rule :

*

* $\dfrac{\partial f}{\partial x} = \dfrac{\partial g}{\partial u} \dfrac{\partial u}{\partial x} + \dfrac{\partial g}{\partial v} \dfrac{\partial v}{\partial x} = \dfrac{\partial g}{\partial u} + n \dfrac{\partial g}{\partial v}$

* $\dfrac{\partial f}{\partial y} = \dfrac{\partial g}{\partial u} \dfrac{\partial u}{\partial y} + \dfrac{\partial g}{\partial v} \dfrac{\partial v}{\partial y} = \dfrac{\partial g}{\partial u} +  \dfrac{\partial g}{\partial v}$

We have :
$$\dfrac{\partial f}{\partial x} = n \dfrac{\partial f}{\partial y}$$
then :
$$\dfrac{\partial g}{\partial u} + n \dfrac{\partial g}{\partial v} = n \dfrac{\partial g}{\partial u} + n \dfrac{\partial g}{\partial v}$$ 
We deduce that :
$$\dfrac{\partial g}{\partial u} = n \dfrac{\partial g}{\partial u}$$ 
and because $n \geq 2$ :
$$\dfrac{\partial g}{\partial u} = 0$$
$g$ is then a function of $v$ only :
$$g(u, v) = h(v)$$
which means :
$$f(x, y) = g(u, v) = h(v) = h(n x + y)$$
