Vector Calculus Computation: Finding the divergence [closed]

Mathematical Methods for Scientists and Engineers page 309, problem 6.

This question asks the reader to show that the divergence of (r/r $^3)=0$, provided that r is not 0. Well, r, I suppose, is the position vector r(x,y,z) = (x,y,z) and r is the magnitude of r.

I will show what I have below, and as I am sure there are multiple ways of solving this, but what I struggle with is finding the divergence of (1/r$^3$). I lack confidence dealing with vector calculus, as I feel as though I don't know all of the tricks and ways of flexibility of a problem. As experienced as I may be studying mathematics in a college classroom, I am not used to these types of questions, yet. If anyone has any tips for dealing with weird vector calc problems, let me know. Thanks in advance.

I have as follows...

$div$(r/r $^3)$ = $div$(r(1/r$^3$)) = r($div$(1/r$^3$)+(1/r$^3$)($div$r).

$div$r = $dx/dx+dy/dy+dz/dz = 3$

$div$(1/r$^3$) = $(d/dx)(1$/r$^3)+(d/dy)$(1/r$^3)+(d/dz)(1$/r$^3$) = ???

• Write out r in terms of the components and use the chain rule on it for the different terms of the divergence you don't know: $r = \sqrt{x^2 + y^2 + z^2}$. Does that give you a result you can interpret? – Finncent Price Aug 31 '18 at 19:39
• Welcome to the site! Please take a minute to read our guidelines for homework and exercise questions as well as check-my-work questions (and note that they hold regardless of the question's origins). We intend our questions to be potentially useful to a broader set of users than just the one asking, and we prefer conceptual questions over those just asking for a specific computation. – Emilio Pisanty Aug 31 '18 at 19:50
• Hello, thank you. And well, more than anything I am looking for tips and ways of dealing with r and r and the divergence of combinations of them. I don't really know, when you take the divergence of a combination of them what I am actually looking for (yes, the divergence is the rate of expansion of the gas/liquid) but my point being is not knowing how it is calculated won't even get me to understand the bigger picture, theoretical things.. – Pascal Aug 31 '18 at 20:26

you've done a subtle mistake in your identity

in your first term you should write gradient of $\dfrac{1}{r^3}i.e,\nabla \dfrac{1}{r^3}$

not diveregence $i.e, \nabla \cdot \dfrac{1}{r^3}$ (because divergence of scalar quantity is ambiguos)

you should solve as follows:

$\nabla \cdot\left(\dfrac{\mathbf{\vec r}}{r^3}\right)=\dfrac{1}{r^3} \ \nabla \cdot \mathbf{\vec r}\ \ + \ \ \mathbf{\vec r}\ \cdot \nabla \dfrac{1}{r^3}\implies\dfrac{3}{r^3}-3 \dfrac{\mathbf{\vec r\cdot \mathbf{\vec r}}}{r^5}= \dfrac{3}{r^3}-\dfrac{3 r^2}{r^5}=\dfrac{3}{r^3}-\dfrac{3}{r^3}=0$

footnote:

$\nabla r^{n}= nr^{n-2} \mathbf{\vec{r}}\ \ \ \ \ \ \ \forall \ \ n\neq -2$

• Thank you for the footnote. How, however, are the r s in the numerator able to cancel out with the r s in the denominator? – Pascal Aug 31 '18 at 21:38
• no. ${\bf r}$ is a vector and $r$ is a scalar. Sometimes you'll see ${\bf \hat{r}}/r^2$, but the normalization of the unit vector just adds more algebra to the derivative. – JEB Sep 1 '18 at 0:00

I would do this using one of the two following methods:

First Method:

Write your vector field in Cartesian coordinates ($x,y,z$). The $\vec{r}$-vector is: $$\vec{r}=x\hat{x}+y\hat{y}+z\hat{z}= \begin{pmatrix} x\\y\\z \end{pmatrix},$$

where the hat-vectors are the unit vectors (you might know them as $(\hat{i},\hat{j},\hat{k})$ instead). Next is the $r^3$:

$$r^3=(r^2)^{3/2}=\left(x^2+y^2+z^2 \right)^{3/2}$$

If we define the vector operator $\vec{\nabla}$ as: $$\vec{\nabla}= \begin{pmatrix} \frac{\partial}{\partial x}\\ \frac{\partial}{\partial y}\\ \frac{\partial}{\partial z} \end{pmatrix},$$ The divergence of a general vector field $\vec{F}= \begin{pmatrix} F_x\\F_y\\F_z \end{pmatrix}$ can be written neatly as:

$$\text{div}(\vec{F})=\vec{\nabla}\bullet\vec{F}=\frac{\partial F_x}{\partial x}+\frac{\partial F_y}{\partial y}+\frac{\partial F_z}{\partial z}$$ Remember, this formula is only true in Cartesian coordinates and, in particular, not in spherical coordinates.

Now to find your specific divergence:

\begin{align} \text{div}\left(\vec{r}/r^3 \right)&=\vec{\nabla}\bullet \left( \frac{1}{\left(x^2+y^2+z^2 \right)^{3/2}} \begin{pmatrix} x\\y\\z \end{pmatrix}\right)\\&=\frac{\partial}{\partial x}\left(\frac{x}{\left(x^2+y^2+z^2 \right)^{3/2}}\right)+\frac{\partial}{\partial y}\left(\frac{y}{\left(x^2+y^2+z^2 \right)^{3/2}}\right)+\frac{\partial}{\partial z}\left(\frac{z}{\left(x^2+y^2+z^2 \right)^{3/2}}\right) \\ &=3\left(x^2+y^2+z^2 \right)^{-3/2}-3(x^2+y^2+z^2)\left(x^2+y^2+z^2\right)^{-5/2}=0 \end{align}

The fact that $r\neq 0$ was used to cancel the parentheses here and there (and of course to allow you to divide by $r^3$ to begin with).

Second Method:

We will now work in spherical coordinates, where your vector field is:

$$\vec{F}= \begin{pmatrix} F_r\\F_{\theta}\\F_{\phi} \end{pmatrix} = \begin{pmatrix} 1/r^2\\0\\0 \end{pmatrix}$$ Here, $\theta$ is the polar angle and $\phi$ is the azimuthal angle. It is already looking much simpler. We only divide by $r^2$ since that is the actual field in the $\hat{r}$-direction. The extra $r$-factor in $r^3$ comes from normalizing the vector $\vec{r}=r\hat{r}$, thus giving $\vec{r}/r^3=\hat{r}r/r^3=\hat{r}/r^2$.

The general divergence in spherical coordinates is:

$$\text{div}(\vec{F})=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2F_r)+\frac{1}{r\sin(\theta)}\frac{\partial}{\partial \theta}(F_{\theta}\sin(\theta))+\frac{1}{r\sin(\theta)}\frac{\partial F_{\phi}}{\partial \phi}$$

Okay, now it is not looking that simple anymore. But notice that only the first term is non-zero, since $F_{\theta}=F_{\phi}=0$. Thus:

$$\text{div}(\vec{F})=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2F_r)=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2r^{-2})$$

Since $r\neq 0$:

$$\text{div}(\vec{F})=\frac{1}{r^2}\frac{\partial}{\partial r}(1)=0$$