I have the vector field \begin{align*} X:\mathbb R^d&\to\mathbb R^d\\ x&\mapsto\frac{x}{\|x\|} \end{align*} which is a differentiable vector field outside of the origin, and I am interested in its divergence. After some easy computation we get $$ \mathrm{div}(X)=\left\{\begin{array}{ll} 2\delta_0&d=1\\ \frac{d-1}{\|x\|}&d\geq 2. \end{array}\right. $$ The problem with the above computation is that the dimension 1 case is computed as a distributional derivative and the case of bigger dimension is computed classically. This is a problem because for the longest time I thought that $$ \mathrm{div}(X) $$ should have a Dirac delta in the origin in any dimension, and I still believe it has to have it.
The reasons I do believe it has a Dirac delta component in the origin is because for $X$ infinite integral curves start from the origin. To put it differently, if we were to look at $-X$, if one were to search for the solutions to the continuity equation for $-X$, i.e. $$ \partial \mu_t+\mathrm{div}((-X)\mu_t)=0 $$ one would see how mass accumulates at the origin.
Question 1): did I make a mistake in my computations and $\mathrm{div}(X)$ has a Dirac delta in the origin? Or more correctly, if my computation isn't wrong classically but is wrong distributionally, how would I carry out that computation? Because it still doesn't yield a singular part when I evaluate with polar coordinates.
Question 2): is my intuition wrong and in reality in dimension bigger than one there is never a Dirac delta in that computation even distributionally?
Any help or literature is appreciated. Maybe it is all because my differential geometry skills are very rusty.
The divergence you wrote is correct distributionally as well. To see this, let $\phi$ be any test function, then using the definition of distributional divergence, dominated convergence, and the divergence theorem, we get \begin{align} \langle\text{div}(X),\phi\rangle&:=-\sum_{i=1}^n\langle X^i,\partial_i\phi\rangle\\ &=-\sum_{i=1}^n\int_{\Bbb{R}^n}X^i\partial_i\phi\,dV\\ &=-\lim_{\epsilon\to 0^+}\sum_{i=1}^n\int_{B_{\epsilon}(0)^c}X^i\partial_i\phi\,dV\tag{DCT}\\ &=\lim_{\epsilon\to 0^+}\sum_{i=1}^n\int_{B_{\epsilon}(0)^c}[(\partial_iX^i)\phi - \partial_i(X^i\phi)]\,dV\\ &=\lim_{\epsilon\to 0^+}\left[\int_{B_{\epsilon}(0)^c}\frac{n-1}{\|x\|}\phi\,dV +\int_{S_{\epsilon}(0)}\phi\,dA \right]\tag{$*$}. \end{align} Notice that in this last equality, I used the divergence theorem, and beware that the outward normal to the boundary of $B_{\epsilon}(0)^c$ actually points into the origin, i.e is $-X$, so this extra minus sign cancels the minus sign which is already present. Now, in the first term, $\frac{1}{\|x\|}$ is integrable in a neighborhood of the origin in $\Bbb{R}^n$ for $n\geq 2$, so we can use the dominated convergence theorem to say the first limit is $\int_{\Bbb{R}^n}\frac{n-1}{\|x\|}\phi\,dV$. For the second term, since $n\geq 2$, the 'surface area' of the sphere $S_{\epsilon}(0)$ grows like $\epsilon^{n-1}$, which vanishes as $\epsilon\to 0^+$. So, the fact that $\phi$ is a test function means the intergal over the sphere vanishes too. Hence, the final result is \begin{align} \langle\text{div}(X),\phi\rangle&=\int_{\Bbb{R}^n}\frac{n-1}{\|x\|}\phi\,dV+0= \left\langle\frac{n-1}{\|x\|},\phi\right\rangle. \end{align} Thus, even in the distributional sense, we have $\text{div}(X)=\frac{n-1}{\|x\|}$ for $n\geq 2$.
Note, the proof follows through up to $(*)$ even for $n=1$. To proceed further, note that if $n=1$, the first integral vanishes (this is just reflecting that $\frac{x}{|x|}$ is constantly equal to $\pm 1$ away from the origin, so the derivative vanishes there). In the 1-dimensional case, the "boundary sphere $S_{\epsilon}(0)$" really consists of a 2-point set $\{-\epsilon,\epsilon\}$, and the integral over this set just means adding the values of $\phi$ at these points $\phi(-\epsilon)+\phi(\epsilon)$. Now, taking the limit $\epsilon\to 0^+$, and using continuity of $\phi$, we get $2\phi(0)= \langle 2\delta_0,\phi\rangle$, as expected.