What is the explanation for the divergence of the vector function r^hat/r^2?

  • Thread starter guyvsdcsniper
  • Start date
  • Tags
    Divergence
In summary: Sure, I agree. If I do not misremember, it is actually the first example I have of a delta distribution in my book already in the first chapter on vector analysis. Then just introduced to be the canonical density function for a point charge. It is then treated more formally in subsequent chapters.
  • #1
guyvsdcsniper
264
37
Homework Statement
Find the divergence of (1/r^2)r^hat.
Relevant Equations
Divergence Theorem.
Screen Shot 2022-01-25 at 3.22.57 PM.png


Im having trouble understanding the divergence of this vector function. I am just getting lost at calculating the divergence. I get that 1/r^2 is a constant so you can pull it out, but where does r^2 x 1/r^2 come from?
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
##1/r^2## is certainly not a constant; remember that ##v_2## is a vector field on the whole of space (minus the origin), and ##r## varies depending on where you are!

You might not be aware that evaluating vector operators is not as straightforward when the basis vectors adapted to those coordinates depend on the position, as is the case for spherical coordinates. Ask if you'd like to know more, otherwise you can find lots of formulae here.
https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates#Del_formula
 
  • Like
  • Informative
Likes guyvsdcsniper, berkeman and PhDeezNutz
  • #3
##\frac{1}{r^2}## is not a constant. You can't "pull it out".

The divergence operator has different representations in different coordinate systems.

In spherical the literal definition of divergence is

## \nabla \cdot \vec{A} = \frac{1}{r^2} \frac{\partial }{\partial r }\left( r^2 A_r\right) + \frac{1}{r \sin \theta} \frac{\partial }{\partial \theta} \left( A_{\theta} \sin \theta \right) + \frac{1}{r \sin \theta} \left(\frac{\partial A_{\phi}}{\partial \phi} \right)##

Your field has purely radial dependence so you can ignore the last two components.
 
  • Like
  • Informative
Likes guyvsdcsniper and berkeman
  • #4
I understand where the all the components come from. The proof is very lengthy and I tried working it out as well. It definitely one of things you just accept and use lol. Thanks for the help
 
  • #5
quittingthecult said:
I understand where the all the components come from. The proof is very lengthy and I tried working it out as well. It definitely one of things you just accept and use lol. Thanks for the help
I don’t know what proof you have seen, but it certainly does not need to be lengthy. By definition of divergence:
$$
\oint_S \vec A\cdot d\vec S = \int_V \nabla\cdot \vec A \, dV
$$
(which is also just the divergence theorem if you happened to define divergence differently). For the volume ##V##, pick a small coordinate block (sides being coordinate surfaces). The contribution from the radial component of ##\vec A## to the left-hand side is then
$$
[A_r(r+dr) (r+dr)^2 - A_r(r) r^2]d\Omega
\simeq [\partial_r (r^2 A_r)] dr\, d\Omega
$$
where ##d\Omega## is the solid angle element. Since the right-hand side is
$$
(\nabla \cdot \vec A) dV = (\nabla \cdot \vec A) r^2 dr \, d\Omega
$$
it immediately follows that the radial contribution to the divergence is
$$
\frac 1{r^2} \partial_r (r^2 A_r).$$
The contributions from the other components are derived similarly.
 
  • Like
Likes PhDeezNutz
  • #6
@quittingthecult are you by chance encountering this for your upper level undergrad E&M course?

Perhaps

## \nabla \cdot \left( \frac{1}{r^2} \hat{r} \right) = 4 \pi \delta^3 \left( r \right)##

If so just use the divergence theorem and realize that the result is independent of size of the sphere. So if you shrink the sphere “infinitely” the integral needs to evaluate to the same thing, and same when you blow it up. Enter the Dirac-Delta.

It is a paradox of sorts because of you evaluate the divergence directly it will be 0, but if you evaluate the volume integral it’s ##4 /pi##. This is a really important paradox.
 
  • #7
PhDeezNutz said:
It is a paradox of sorts because of you evaluate the divergence directly it will be 0,
I don’t think it is that paradoxical to be honest. The form of the divergence is valid only where the coordinates are non-singular and spherical coordinates are singular at the origin so r=0 needs to be treated separately. That the Dirac delta appears is not very unintuitive either. The 1/r^2 field is the field of a point source and unsurprisingly divergence is zero where there is no source. The density for a point source is also formally infinite so the appearance of the delta distribution should also not come as a huge surprise as it describes exactly that - a finite source in a point.
 
  • Like
Likes PhDeezNutz
  • #8
Orodruin said:
I don’t think it is that paradoxical to be honest. The form of the divergence is valid only where the coordinates are non-singular and spherical coordinates are singular at the origin so r=0 needs to be treated separately. That the Dirac delta appears is not very unintuitive either. The 1/r^2 field is the field of a point source and unsurprisingly divergence is zero where there is no source. The density for a point source is also formally infinite so the appearance of the delta distribution should also not come as a huge surprise as it describes exactly that - a finite source in a point.

Fair enough, not paradoxical, but it is an important nuance that needs to be addressed.
 
  • #9
PhDeezNutz said:
Fair enough, not paradoxical, but it is an important nuance that needs to be addressed.
Sure, I agree. If I do not misremember, it is actually the first example I have of a delta distribution in my book already in the first chapter on vector analysis. Then just introduced to be the canonical density function for a point charge. It is then treated more formally in subsequent chapters.
 
  • Like
Likes PhDeezNutz
  • #10
Orodruin said:
Sure, I agree. If I do not misremember, it is actually the first example I have of a delta distribution in my book already in the first chapter on vector analysis. Then just introduced to be the canonical density function for a point charge. It is then treated more formally in subsequent chapters.

That sounds interesting. I’ve been meaning to nab a copy. As soon as I get a little bit of extra money.
 
  • #11
@Orodruin just read through your insight “birth of a textbook”…..beautiful hand written notes/pictures.
 
  • Like
Likes Orodruin
  • #12
Orodruin said:
I don’t know what proof you have seen, but it certainly does not need to be lengthy. By definition of divergence:
$$
\oint_S \vec A\cdot d\vec S = \int_V \nabla\cdot \vec A \, dV
$$
(which is also just the divergence theorem if you happened to define divergence differently). For the volume ##V##, pick a small coordinate block (sides being coordinate surfaces). The contribution from the radial component of ##\vec A## to the left-hand side is then
$$
[A_r(r+dr) (r+dr)^2 - A_r(r) r^2]d\Omega
\simeq [\partial_r (r^2 A_r)] dr\, d\Omega
$$
where ##d\Omega## is the solid angle element. Since the right-hand side is
$$
(\nabla \cdot \vec A) dV = (\nabla \cdot \vec A) r^2 dr \, d\Omega
$$
it immediately follows that the radial contribution to the divergence is
$$
\frac 1{r^2} \partial_r (r^2 A_r).$$
The contributions from the other components are derived similarly.
Yeah it was maybe a 12 minute video with some of the algebra omitted. I guess lengthy is subjective but after doing more research and your example I can see how it can be done faster.
 
  • #13
PhDeezNutz said:
@quittingthecult are you by chance encountering this for your upper level undergrad E&M course?

Perhaps

## \nabla \cdot \left( \frac{1}{r^2} \hat{r} \right) = 4 \pi \delta^3 \left( r \right)##

If so just use the divergence theorem and realize that the result is independent of size of the sphere. So if you shrink the sphere “infinitely” the integral needs to evaluate to the same thing, and same when you blow it up. Enter the Dirac-Delta.

It is a paradox of sorts because of you evaluate the divergence directly it will be 0, but if you evaluate the volume integral it’s ##4 /pi##. This is a really important paradox.
Yea my book does state this to a T and really emphasizes on the paradox part but what Orodruin said about it being not that paradoxical makes sense
 
  • Like
Likes PhDeezNutz
  • #14
If you have access to it, section 1.5.2 of 'Introduction to Electrodynamics: Fourth Edition' by Griffiths has a good explanation.

Initially, I solved in Cartesian coordinates, which is a bit of a process. First, you can say that ##\vec{v}= \frac{\vec{r}}{r^3}= \frac{x \hat{x}+y \hat{y} +z \hat{z}}{(x^2+y^2+z^2)^{\frac{3}{2}}}##

We know that ##\nabla \cdot \vec{v}= \frac{\partial v_x}{\partial x} + \frac{\partial v_y}{\partial y} + \frac{\partial v_z}{\partial z}##

Lets try ##\frac{\partial v_x}{\partial x}## to start. You want to say that ## v_x= x(x^2+y^2+z^2)^{-\frac{3}{2}} = uv##, where ##u=x## and ##v= (x^2+y^2+z^2)^{-\frac{3}{2}}##. From here, use the product rule.

Note that you will need to use the chain rule to find that ##\frac{\partial v}{\partial x}= -3x(x^2+y^2+z^2)^{-\frac{5}{2}}##

Applying the product rule gives ##\frac{\partial v}{dx}= (x^2+y^2+z^2)^{-\frac{3}{2}} - 3x^2(x^2+y^2+z^2)^{-\frac{5}{2}}##

Similarly, ##\frac{\partial v}{dx}= (x^2+y^2+z^2)^{-\frac{3}{2}} - 3y^2(x^2+y^2+z^2)^{-\frac{5}{2}}## and
##\frac{\partial v}{dx}= (x^2+y^2+z^2)^{-\frac{3}{2}} - 3y^2(x^2+y^2+z^2)^{-\frac{5}{2}}##

Adding these three values gives the divergence.
$$\nabla \cdot \vec{v}= \frac{3}{(x^2+y^2+z^2)^{-\frac{3}{2}}} - \frac{3(x^2+y^2+z^2)}{(x^2+y^2+z^2)^{-\frac{5}{2}}}$$
which simplifies down to zero. Note that ## (x^2+y^2+z^2)^{\frac{3}{2}}## is on the denominator.

In theory, this ends the problem. However, from graphing the function, we get the impression that the divergence should be positive. Note that, using the equation for the divergence in spherical coordinates, you also get zero. This is the method shown in the original post.

So lets have a look at the divergence theorem, which states that, if the surface you're integrating over acts as the boundary of the volume you're integrating over:
$$ \int (\nabla \cdot \vec{v})\, d\tau = \oint \vec v \cdot d \vec A$$

We can see from our solution for the divergence, that the solution to the left hand side should be zero.

So, to solve the right hand side, lets use spherical coordinates.
$$\oint \vec v \cdot d \vec A= \oint \frac{1}{R^2}\hat{r} \cdot (R^2 \sin\theta d \theta d \phi \hat{r})$$
Notice that ##R^2## cancels and just gives ##\int_0^{\pi} \sin\theta d \theta \int_0^{2\pi} d \phi = 4 \pi##
This is independent of R, implying that the entire contribution is from the origin. This could be why our divergence appears to be zero.

As mentioned earlier, in calculating our divergence we had ## (x^2+y^2+z^2)^{\frac{3}{2}}## on the denominator. If we are at the origin, this will lead to a division by zero error. Thus, we can see that the divergence is zero everywhere except the origin, where the entire contribution comes from. In order for our divergence theorem to be true, we need ## \int (\nabla \cdot \vec{v})\, d\tau = 4 \pi##.

This property of being zero everywhere except the origin is explained by the Dirac Delta distribution. In order for the divergence theorem to be correct, the divergence must be

$$(\nabla \cdot \vec{v}) = 4 \pi \delta^3(r)$$.

Hopefully this helps! Apologies if there are any errors in either working or formatting. The reasoning for this is, once again, found in section 1.5.2 of 'Introduction to Electrodynamics: Fourth Edition' by Griffiths (apart from the Cartesian working, so sorry if that's wrong). I think the main thing is to realise that the entire contribution to the divergence is from the origin, and then division by zero errors lead to an answer of zero, as well as some knowledge of the divergence theorem and the Dirac Delta distribution.
 
Last edited:
  • Like
Likes vanhees71 and PhDeezNutz

FAQ: What is the explanation for the divergence of the vector function r^hat/r^2?

What is the vector function r^hat?

The vector function r^hat represents a unit vector in the direction of the position vector r.

What is the significance of r^2 in the divergence of the vector function?

The r^2 term in the divergence of the vector function represents the squared magnitude of the position vector r, which is used to calculate the divergence at a specific point in space.

How is the divergence of the vector function calculated?

The divergence of the vector function r^hat/r^2 is calculated using the formula div(r^hat/r^2) = (1/r^2) * (d/dr)(r^2 * r^hat).

What does the divergence of the vector function indicate?

The divergence of the vector function indicates the rate of change of the vector field at a specific point in space. A positive divergence indicates an outward flow, while a negative divergence indicates an inward flow.

What is the explanation for the divergence of the vector function r^hat/r^2?

The divergence of the vector function r^hat/r^2 is caused by the variation in the magnitude and direction of the position vector r at different points in space. This results in a change in the flow of the vector field, which is represented by the divergence value.

Similar threads

Replies
2
Views
456
Replies
4
Views
1K
Replies
16
Views
1K
Replies
2
Views
882
Replies
1
Views
5K
Replies
1
Views
3K
Back
Top