I was studying a nice solution of how to apply the divergence theorem for a vector field with a singularity at the origin.
However, the solution doesn't give any concrete computations and just makes the claim that $\large\frac {\vec r}{|r|^3}$ is divergence-free; I am guessing that $\vec r$ is just a radius / position vector $(x,y,z)$.
So, I would like to check this, but I am slightly confused about how to differentiate the numerator.
The denominator is clearly $(x^2 + y^2 + z^2)^{\frac{3}{2}}$, so I know how to take derivatives of this term, w.r.t. either $x$, $y$, or $z$ - just have to be careful when using the chain rule to account for all the factors.
What about the numerator? Would the derivative of it, w.r.t., say, $x$, be ... $r_x$ just be... $1$? So, for simplicity just looking at $div \vec r$ gives $r_x + r_y + r_z$ = 1 + 1 + 1 = 3.
Am I ok with my computations?
Thanks,
$u=(x,y,z)$ and $f(x,y,z)=(x/\|u\|^3,y/\|u\|^3,z/\|u\|^3)$
$\partial_x(x/\|u\|^3)= 1/\|u\|^3-3 x^2/\|u\|^{5}$
$\partial_y(y/\|u\|^3)= 1/\|u\|^3-3 y^2/\|u\|^{5}$
$\partial_z(z/\|u\|^3)= 1/\|u\|^3-3 z^2/\|u\|^{5}$
$\partial_x(x/\|u\|^3)+\partial_y(y/\|u\|^3)+\partial_z(z/\|u\|^3)= 3/\|u\|^3-3(x^2+y^2+z^2)/\|u\|^{5}= 3/\|u\|^3-3(\|u\|^3)=0$