I have this question from an old exercise sheet whose answers I don't have.
Let $\Omega = \mathbb{R}\setminus \{0\}$. For which continuously differentiable functions $g:(0,\infty) \to \mathbb{R}$ does the following vector field $$f: \Omega \to \mathbb{R}^2, f(x)= g(||x||) \frac{x}{||x||}$$ have $div(f) = 0$
Unfortunately, the paper doesn't give me any hints.
My ideas on how this can be solved
Since we know $div(f) = \partial_1f_1 + \partial_2 f_2$ We can then calculate $div(f)$: $$div(f) = \partial_1\left(g(||x||) \frac{x_1}{||x||}\right) + \partial_2 \left(g(||x||) \frac{x_2}{||x||}\right) = 0$$
This then implies
$$\partial_1\left(g(||x||) \frac{x_1}{||x||}\right) = - \partial_2 \left(g(||x||) \frac{x_2}{||x||}\right)$$
So now comes the tricky party... I am not sure if this is correct:
$$\int\left(g(||x||) \frac{x_1}{||x||}\right) dx_2 = - \int \left(g(||x||) \frac{x_2}{||x||}\right)dx_1$$ this implies $$x_1 \int\left( \frac{g(||x||)}{||x||}\right) dx_2 = - x_2\int \left( \frac{g(||x||)}{||x||}\right)dx_1$$ But from here on I don't know how to proceed.
another approach would be to use the other definition of divergence which our textbooks says is $div(f)(p) = \lim_{h \to 0}\int_{\partial( p + [0,h]^2)}f \cdot d\vec{n}$. but I am not sure how to use this formula.
Thank you so much for your help.
Toy just have to differentiate. I will work in $\Bbb R^n$. Let $r=\|x\|=\Bigl(\sum_{i=1}^nx_i^2\Bigr)^{1/2}$. We have $$ \frac{\partial r}{\partial x_i}=\frac12\Bigl(\sum_{i=1}^nx_i^2\Bigr)^{-1/2}(2\,x_i)=\frac{x_i}{r}. $$ Then (I leave the computations to you) $$ \operatorname{div}\Bigl(g(r)\,\frac{x}{r}\Bigr)=\sum_{i=1}^n\frac{\partial }{\partial x_i}\Bigl(g(r)\,\frac{x_i}{r}\Bigr)=g'(r)+\frac{n-1}{r}\,g(r). $$ This leads to $$ \frac{g'(r)}{g(r)}=\frac{1-n}{r}. $$