This exercise is from my textbook:
Let $f : \mathbb{R}^2 \rightarrow \mathbb{R}$ such that $\frac{\partial f}{\partial x}(x,y) = \frac{\partial f}{\partial y}(x,y)$ for all $(x,y)\in\mathbb{R}^2$. Show that there exists $g : \mathbb{R} \rightarrow \mathbb{R}$ such that $g$ is differentiable and $f(x,y) = g(x + y)$ for all $(x,y)\in\mathbb{R}$.
I think that the key is to define $g(x) := f(x,0)$, but I'm not sure how to show that $f$ satisfies $g(x + y) = f(x + y, 0) = f(x,y)$, Can you give me some hint? I found the same question here but I'm not allowed to use the chain rule for the composition of two functions $f\circ g$ where $f:\mathbb{R}^n \rightarrow \mathbb{R}$ and $g : \mathbb{R}^m \rightarrow \mathbb{R}^n$ that is used in the answer.