Is My Calculation of the Divergence of a Vector Correct?

  • Thread starter Thread starter meteorologist1
  • Start date Start date
  • Tags Tags
    Divergence Vector
Click For Summary
SUMMARY

The discussion centers on calculating the divergence of a radius vector in Cartesian, cylindrical, and spherical coordinates. The correct divergence in Cartesian coordinates is confirmed as 3, derived from the expression \nabla \cdot \vec{r} = \frac{\partial x}{\partial x} + \frac{\partial y}{\partial y} + \frac{\partial z}{\partial z}. In cylindrical coordinates, the divergence is expressed as \nabla \cdot \vec{r} = \frac{1}{\rho}\frac{\partial}{\partial \rho}(\rho \rho) + \frac{\partial z}{\partial z} = 3, while in spherical coordinates, it is \nabla \cdot \vec{r} = \frac{1}{r^2}\frac{\partial}{\partial r}(r^2 r) = 3. The discussion also highlights that the unit vectors in cylindrical and spherical coordinates are not constant, affecting the constancy of vector fields.

PREREQUISITES
  • Understanding of vector calculus, specifically divergence.
  • Familiarity with Cartesian, cylindrical, and spherical coordinate systems.
  • Knowledge of partial derivatives and their application in vector fields.
  • Basic concepts of vector fields and their properties in different coordinate systems.
NEXT STEPS
  • Study the derivation of divergence in cylindrical coordinates using vector functions.
  • Explore the implications of non-constant unit vectors in spherical coordinates.
  • Learn about vector field transformations between Cartesian and polar coordinate systems.
  • Investigate the physical interpretations of divergence in fluid dynamics and electromagnetism.
USEFUL FOR

Students and professionals in mathematics, physics, and engineering who are working with vector calculus, particularly those focusing on divergence in various coordinate systems.

meteorologist1
Messages
98
Reaction score
0
Hi, I'm doing a problem of finding the divergence of a radius vector from the origin to any point in Cartesian, cylindrical, and spherical coordinates. The answers look kind of strange to me. I just want to make sure what I did was correct.

To find: \nabla\cdot \vec{r}

Cartesian: r = (x, y, z). I got the answer to be 3.

Cylindrical: r = (rho, phi, z). I got the answer to be 3 + 1/rho

Spherical: r = (r, theta, phi). I got the answer to be 3 + (1/r sin(theta))(sin(theta) + theta cos(theta) + 1).

Thanks.
 
Physics news on Phys.org
3 ?! Could you show how you got to that answer please?
 
quasar987 said:
3 ?! Could you show how you got to that answer please?

That is correct since \vec{\nabla} \cdot \vec{r} = \frac{\partial x}{\partial x} + \frac{\partial y}{\partial y} + \frac{\partial z}{\partial z} = 3

marlon
 
The answer "3" is very good.I'm curious about the other 2 answers.

Daniel.
 
all answers should be the same...
 
For the Cartesian:

\nabla\cdot \vec{r} = (\vec{i}\partial/\partial x + \vec{j}\partial / \partial y + \vec{k}\partial / \partial z) \cdot (\vec{i} x + \vec{j} y + \vec{k} z) =
\partial/\partial x (x) + \partial/\partial y (y) + \partial/\partial z (z) = 1 + 1 + 1 = 3

The other two cylindrical and spherical, I did the same way. But I used the \nabla\cdot \vec{r} for cylindrical and spherical which I referred to in a handbook.
 
Last edited:
Could you show me how to get "3" for the cylindrical and spherical? Thanks.
 
meteorologist1 said:
Cylindrical: r = (rho, phi, z). I got the answer to be 3 + 1/rho

Spherical: r = (r, theta, phi). I got the answer to be 3 + (1/r sin(theta))(sin(theta) + theta cos(theta) + 1).

Thanks.
In cylindrical coordinates:
\vec r = \rho \hat \rho + z \hat z
and
\nabla \cdot \vec v(\rho,\phi,z) = \frac{1}{\rho}\frac{\partial}{\partial \rho}(\rho v_{\rho})+\frac{1}{\rho}\frac{\partial v_{\phi}}{\partial \phi}+\frac{\partial v_z}{\partial z}
For some vector function v=\langle v_{\rho},v_{\phi},v_z \rangle

In spherical coordinates:

\vec r = r\hat r
and
\nabla \cdot \vec v(r,\theta,\phi)=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2v_r)+\frac{1}{r\sin \theta}\frac{\partial}{\partial \theta}(\sin \theta v_{\theta})+\frac{1}{r\sin \theta}\frac{\partial v_{\phi}}{\partial \phi}
for some vector function v=\langle v_r,v_{\theta},v_{\phi} \rangle

Both give 3 as well:

\nabla \cdot \vec r(\rho,\phi,z) =\frac{1}{\rho}\frac{\partial}{\partial \rho}(\rho \rho)+\frac{\partial z}{\partial z}=\frac{1}{\rho}2\rho+1=3

\nabla \cdot \vec r(r,\theta,\phi)=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2 r)=\frac{1}{r^2}3r^2=3

You can't use the divergence in cylindrical or spherical coordinates when r=0 though.
 
Last edited:
Thanks very much. It looks like the reason I got the wrong answers is because I got the r vectors wrong in cylindrical and spherical coordinates. I need to get this straight.

I would like to ask another question related to these two coordinates:
In cylindrical coordinates,
If \vec{A} = a\vec{\rho} + b\vec{\phi} + c\vec{z} where a, b, c are constants, is \vec{A} a constant vector?

Similarly in spherical coordinates,
If \vec{A} = a\vec{r} + b\vec{\theta} + c\vec{\phi} where a, b, c are constants, is \vec{A} a constant vector?
 
  • #10
your question doesn't make any sense, if a,b,c are constant, sure A is constant. If not, it's not...
 
  • #11
I'm asking because when I converted A to Cartesian coordinates, it doesn't look constant anymore. Another way of asking the question is: Is \vec{A} a uniform vector field?
 
  • #12
vincentchan said:
your question doesn't make any sense, if a,b,c are constant, sure A is constant. If not, it's not...

Not exactly and not always true.U need the unit vectors (basis vectors) to be constant in all systems of coordinates.Par éxample,write the second law of dynamics for a free body moving on a spere in cartesian coordinates and in spherical coordinates.
\vec{F}=m\vec{a} =0

Tell me if u notice something weird...
meteorologist1 said:
I'm asking because when I converted A to Cartesian coordinates, it doesn't look constant anymore

Voilà.My point exactly.It all depends on whether the g_{ij}'s are constant or not.

Daniel.
 
  • #13
his question is, in the following case...
\vec{A} = a\vec{\rho} + b\vec{\phi} + c\vec{z}

is A constant or not, sure we assume \vec{\rho}, \vec{\phi}, \vec{z} define as usual which IS constant...
 
  • #14
vincentchan said:
his question is, in the following case...
\vec{A} = a\vec{\rho} + b\vec{\phi} + c\vec{z}

is A constant or not, sure we assume \vec{\rho}, \vec{\phi}, \vec{z} define as usual which IS constant...

What do u mean,"the usual way"??If they are constant and the components are constant,then the whole cevor is constant,of course.

Daniel.
 
  • #15
meteorologist1 said:
Thanks very much. It looks like the reason I got the wrong answers is because I got the r vectors wrong in cylindrical and spherical coordinates. I need to get this straight.

I would like to ask another question related to these two coordinates:
In cylindrical coordinates,
If \vec{A} = a\vec{\rho} + b\vec{\phi} + c\vec{z} where a, b, c are constants, is \vec{A} a constant vector?

Similarly in spherical coordinates,
If \vec{A} = a\vec{r} + b\vec{\theta} + c\vec{\phi} where a, b, c are constants, is \vec{A} a constant vector?

I think confusion has arised because of the way the question is posted.
I think you meant to say: "Is \vec A a constant vector field. The answer is no.
This is because spherical and cylindrical coordinates have at least one unit vector which is not constant. The Cartesian coordinate system is the only one for which all three unit vectors are constant.

It's for example easy to see for the field:

\vec A(r,\theta,\phi) = \hat r
This is a radial field. The magnitude is 1 everywhere, but the direction changes. It points along the +x-axis in the point (1,0,0), but it points along the +y direction in the point (0,1,0).
 
  • #16
Thanks all for the clarification, but, in the spherical coordinates system, how the second part went to zero?

I mean this whole part:

\frac{1}{r\sin \theta}\frac{\partial}{\partial \theta}(\sin \theta v_{\theta})+\frac{1}{r\sin \theta}\frac{\partial v_{\phi}}{\partial \phi}
[/tex]
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 11 ·
Replies
11
Views
1K
  • · Replies 9 ·
Replies
9
Views
813
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 24 ·
Replies
24
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
1K
Replies
8
Views
1K