Find $\nabla\cdot (\frac{x}{|x|})$

36 Views Asked by At

I saw this in an analysis book and was curious how to calculate such a function. My thought is the following:

Let $x\in \mathbb{R}^{n}\backslash\{0\}$ \begin{eqnarray*} \nabla \cdot \left(\frac{x}{|x|}\right)&=& \sum_{i=1}^n\partial_i\left(\frac{x_i}{|x|}\right)\\ &=& \sum_{i=1}^n|x|^{-1}+x_i\left(-\frac{x_i}{|x|^3}\right)\\ &=&\frac{n}{|x|}-\frac{1}{|x|}\\ &=&\frac{n-1}{|x|}. \end{eqnarray*}

My question is when looking at the divergence in the first equality, does the denominator see the index? That is, should it look like "$\frac{x_i}{|x_i|}$"? This is a trivial question but I haven't worked with this is quite some time. Thank you for your insight.