Divergence of $\frac{x}{||x||^n}$ identical zero? Currently I am stuck at an exercise about the Divergence Theorem
in which I am asked to prove:
$$
\int_{\partial A} \frac{\cos(\alpha(x, \nu))}{||x||^{n-1}}dS(x) = \operatorname{Vol}_{n-1}(S^{n-1}),
$$
where $A$ is a compact subset of $\mathbb{R}^n$ with "the origin in its center",
$\alpha(x,\nu)$ is the angle between $x$ and $\nu$, the normal unit vector on $\partial A$.
We should prove it by applying the Divergence Theorem on $F(x) = \frac{x}{||x||^n}$ on $A_\epsilon = \{x \in A|\,\,||x|| > \epsilon\}$.
I see how applying the Divergence Theorem on $F$ yields the statement
to prove, but when I calculate the Divergence of $F$, I always get
identical zero.
I am pretty sure I am missing something obvious, but I don't have any idea.
I hope you can help me!
 A: This is not a strict math proof - rather an illustration.
We have to evaluate $\int_{\partial A} \frac{\cos(\alpha(x, \nu))}{||x||^{n-1}}dS(x)=\oint_{\partial A} \frac{(\vec{r},d\vec{S})}{r^{n}}$, where $\vec{r}$ is radius vector from the origin, $r=|\vec{r}|$, and $d\vec{S}=\vec{n}dS$, where $\vec{n}$ is a normal unit vector on $\partial{A}$.
We can divide the subset $A$ into arbitrary layers covering the origin ($A=A_1\cup{A}_2\cup{A_3}...$) and, therefore we also get internal boundaries of these layers. We can notice that $\oint_{\partial A_k} \frac{(\vec{r},d\vec{S})}{r^{n}}=0$, as soon as $A_k$ does not include the origin.
Indeed, for all external layers (which covers but do not contain the origin) $\oint_{\partial A_k} \frac{(\vec{r},d\vec{S})}{r^{n}}=\int_{A_k} (\vec\nabla\frac{\vec{r}}{r^{n}})dV$
and in Cartesian coordinate system (summation over repeated indices is implied)
$$\vec\nabla\frac{\vec{r}}{r^{n}}=\frac{\partial}{\partial{x}_i}\frac{x_i}{r^n}=\frac{r^2\delta_{ii}-nx_ix_i}{r^{n+1}}=\frac{r^2n-n{r}^2}{r^{n+1}}=0$$
($\delta_{ik}$ - Kronecker symbol; $\delta{ii}=\sum_{i=1}^n1=n$).
On the other hand
$\oint_{\partial A_k} \frac{(\vec{r},d\vec{S})}{r^{n}}=\int_{\partial A_k (external)} \frac{(\vec{r},d\vec{S})}{r^{n}}+\int_{\partial A_k (internal)} \frac{(\vec{r},d\vec{S})}{r^{n}}$ - difference of total flows through external and internal surfaces of the layer $A_k$.
But $\int_{\partial A_k (internal)} \frac{(\vec{r},d\vec{S})}{r^{n}}=-\int_{\partial A_{k-1} (external)} \frac{(\vec{r},d\vec{S})}{r^{n}}$ - for the external boundary of second layer which is closer to the origin and shares the boundary with $A_k$ (we get a different sign because the normal for each layer points outward).
Due to arbitrary choice of $A_k$ it means that the integral flow through any external boundary of any layer is the same - as soon as the layer covers the origin. We can move as close to the origin as we want, and choose an arbitrary surface covering the origin - for example, it can be a shere $S_{n-1}$ of some radius $\epsilon\to0$
$$\oint_{\partial A} \frac{(\vec{r},d\vec{S})}{r^{n}}=\int_{\partial{R^n_\epsilon}}\frac{1}{\epsilon^{n-1}}dS_{\epsilon}=\frac{2\pi^{\frac{n}{2}}}{\Gamma(\frac{n}{2})}\frac{\epsilon^{n-1}}{\epsilon^{n-1}}=\frac{2\pi^{\frac{n}{2}}}{\Gamma(\frac{n}{2})} =\operatorname{Vol}_{n-1}(S^{n-1})$$
(surface area of a unit ball $R^n$ of dimension $n$)
