Let $f:\mathbb{R}^2\to \mathbb{R}$ be a $\mathcal{C}^1$ function. I would like to solve the partial differential equation: $$x\frac{\partial f}{\partial x}+y\frac{\partial f}{\partial y} = \gamma f,$$ where $\gamma$ is a fixed real number.
I tried doing it with a polar change of variables: let $g(r,\theta) = f(r\cos(\theta),r\sin(\theta))$. Then I find $$r\frac{\partial g}{\partial r} = \gamma g.$$
First, is it correct? And then how to go from there on?
First of all $$r\frac{\partial g}{\partial r} = \gamma g\implies \dfrac{\dfrac{\partial g}{\partial r}}{g}=\dfrac{\gamma}{r}.$$ Integrating with respect to $r$ we have
$$\ln \dfrac{g(r,\theta_0)}{g(r_0,\theta_0)}=\gamma\ln \dfrac{r}{r_0}.$$
Thus it is
$$g(r,\theta_0)=g(r_0,\theta_0)\left(\frac{r}{r_0}\right)^{\gamma}.$$
Finally, since $\theta_0$ is arbitrary we have
$$g(r,\theta)=g(r_0,\theta)\left(\frac{r}{r_0}\right)^{\gamma}.$$