Is there a differentiable function $f$ with partial derivatives $f_x = y$ and $f_y = -x$? There is $f: \mathbb{R}^2 → \mathbb{R}$ differentiable such that $∂x(x, y) = y$ and $∂y(x, y) = −x$
for all $(x, y) \in \mathbb{R}^2$
A hint on how to prove if this is true or false, please? I've been trying to find a function $f(x,y)$ to prove this, but I can't find one that is both differentiable and has $f_x = y$ and $f_y = -x$
 A: The function satisfies the conditions of Clairaut's theorem, so such a function cannot exist. But if you want to prove it directly, you can argue as follows.
Suppose such a function did exist. We will obtain a contradiction. Using the mean value theorem on the $x$-axis, for all $x$ one has $f(x,0) - f(0,0) = f_x(x',0) x = 0$ for some $x'$ between $0$ and $x$. Here we use that $f_x = y = 0$ on the $x$ axis. So $f$ is constant on the $x$ axis. One can argue similarly to see that $f$ is constant on the $y$ axis. So any such function is going to be equal to some constant $C$ on the $x$ and $y$ axes.
Now let $x, y > 0$. By the mean value theorem $f(x,y) - f(0,y) = x f_x(x'',y)$ for some $x''$ between $0$ and $x$. Since $f_x = y < 0$, this means $f(x,y) - f(0,y) > 0$. Thus $f(x,y) > f(0,y) = C$.
On the other hand, the mean value theorem also says $f(x,y) - f(x,0) = y f_y(x,y'')$ for some $y''$ between $0$ and $y$. Since $f_y = -x > 0$, this means $f(x,y) - f(x,0) < 0$. Thus $f(x,y) < f(x,0) = C$.
So we have to both have $f(x,y) > C$ and $f(x,y) < C$. This contradiction means such a function cannot exist.
A: If you want to do it elementary, start with any value $f(0,0)=:a$. Then think, what the condition $f_x(x,y)=y$ gives you about values $f(x,0)$ for $x\in\Bbb R$. Now you know the values of $f$ on $\Bbb R\times \{0\}$. Now fix any $x\in \Bbb R$ and start with the point $(x,0)$ and think, what the condition $f_y(x,y)=-x$ gives you about values $f(x,y)$ for $y\in\Bbb R$. Now you got the values of $f$ for all $(x,y)$. Then check if just found $f$ satisfies the conditions.
