Finding the most general class of solutions to $x\partial_{y}f = y\partial_{x}f$ Consider the following PDE for $f(x, y)$:
$$
x\frac{\partial f}{\partial y} = y\frac{\partial f}{\partial x}\tag{1}
$$
Clearly, one can separate the variables, so take $f(x, y) = p(x)q(y)$:
$$
xp(x)q'(y) = yq(y)p'(x)\implies \frac{p'(x)}{xp(x)}=\frac{q'(x)}{yq(x)}=C
$$
Then:
$$
\frac{p'}{p}=Cx\implies d(\ln p) = d(Cx^2/2)\implies p(x) = e^{Cx^2/2}
$$
Similarly for $y$, so we have that $f(x, y) = e^{C(x^2 + y^2)/2}$. Now here's the thing, one could notice here that in fact $f(x, y) = g(u(x, y)), u(x,y) = C(x^2 + y^2)$ for any $g$ solves the equation as:
$$
\frac{\partial g}{\partial x} = \frac{\partial g}{\partial u}2Cx \quad\quad \frac{\partial g}{\partial y} = \frac{\partial g}{\partial u}2Cy
$$
Which clearly solves $(1)$. By separating the variables, of course I've eliminated the possibility of finding solutions such as $f(x, y) = x^2 + y^2$, so what I want to know is whether or not there's any method of solving $(1)$ that finds the most general class of solutions $g(x^2 + y^2)$?
 A: Geometrically, this is setting the angular derivative of the scalar field to zero.
Observe that in polar coordinates,
$$e_r \cdot \nabla = \partial_r = \frac{x \partial_x + y \partial_y}{\sqrt{x^2 + y^2}}$$
and
$$e_\theta \cdot \nabla = r \partial_\theta = x \partial_y - y \partial_x$$
So you're given, essentially, that $\partial g/\partial \theta = 0$ (where $g$ is $f$ expressed in polar coordinates), and so $g$ can be seen as a function of $r$ alone--i.e. $g = g(r)$.  By ruling out $\theta$ dependence in this way, the problem becomes suitable for ODE methods, which is the method of characteristics.
A: Here is another approach: one can write $ \dfrac{\partial}{x\partial x }f = 2\dfrac{\partial}{\partial(x^2)} f,$
and similarly $\dfrac{\partial}{y\partial y} f = 2\dfrac{\partial}{\partial(y^2)} f.$  Thus, if we change variables to $s = x^2, t = y^2$, the PDE reduces to $\dfrac{\partial}{\partial s} f = \dfrac{\partial}{\partial t} f.$  From this it is immediate that the directional derivative (at any point) of $f$ in the $(1,-1)$-direction vanishes, i.e. that $f$ is constant along the lines $s +t =$ constant.  
Changing back to the original variables, we see that $f$ is constant along the curves $x^2 + y^2 =$ constant, i.e. it is a function of $x^2 + y^2$.
