How should I calculate the divergence for $$\vec{V}=\frac {\vec{r}}{r^2}$$ Is it possible to convert it from spherical coordinates to cartesian?
Divergence of vector in spherical coordinates
3.8k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
You certainly can convert $\bf V$ to Cartesian coordinates, it's just ${\bf V} = \frac{1}{x^2 + y^2 + z^2} \langle x, y, z \rangle,$ but computing the divergence this way is slightly messy.
Alternatively, you can use the formula for the divergence itself in spherical coordinates. If we write the (spherical) components of $\bf V$ as $${\bf V} = \langle V^r, V^{\theta}, V^{\phi} \rangle,$$ then $$\text{div } {\bf V} = \frac{1}{r^2} \partial_r (r^2 V^r) + \frac{1}{r \sin \theta} \partial_{\theta} (V^{\theta} \sin \theta) + \frac{1}{r \sin \theta} \partial_{\phi} V^{\phi}.$$
In our case, the components of $\bf V$ are $$V^r = \frac{1}{r}, V^{\theta} = 0, V^{\phi} = 0,$$ so its divergence is $$\text{div } {\bf V} = \frac{1}{r^2} \partial_r \left(r^2 \cdot \frac{1}{r}\right) = \frac{1}{r^2} \partial_r r = \frac{1}{r^2}.$$
Suppose its $n$ dimension, note that $\overrightarrow{r}=(x_1,x_2,\cdots,x_n)$ and $\frac{\partial r}{\partial x_i}=\frac{x_i}{r}$, so $$\frac{\partial}{\partial x_i}(\frac{x_i}{r^2})=\frac{1}{r^2}-\frac{2x_i^2}{r^4}$$ $$\text{div}\overrightarrow{V}=\sum_{i=1}^n\frac{\partial}{\partial x_i}(\frac{x_i}{r^2})=\frac{n}{r^2}-\frac{2\sum_{i=1}^nx_i^2}{r^4}=\frac{n-2}{r^2}$$