Is My Calculation of the Divergence of a Vector Correct?

In summary, the conversation revolves around finding the divergence of a radius vector from the origin to any point in Cartesian, cylindrical, and spherical coordinates. The answers for each coordinate system are 3, 3+1/rho, and 3+(1/r sin(theta))(sin(theta)+theta cos(theta)+1) respectively. The accuracy of these answers is questioned and explanations are provided for how to obtain the correct answer. The concept of a constant vector field in different coordinate systems is also discussed, with the conclusion that the Cartesian coordinate system is the only one where all three unit vectors are constant.
  • #1
meteorologist1
100
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: [tex] \nabla\cdot \vec{r} [/tex]

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
  • #2
3 ?! Could you show how you got to that answer please?
 
  • #3
quasar987 said:
3 ?! Could you show how you got to that answer please?

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

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

Daniel.
 
  • #5
all answers should be the same...
 
  • #6
For the Cartesian:

[tex] \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) = [/tex]
[tex] \partial/\partial x (x) + \partial/\partial y (y) + \partial/\partial z (z) = 1 + 1 + 1 = 3 [/tex]

The other two cylindrical and spherical, I did the same way. But I used the [tex] \nabla\cdot \vec{r} [/tex] for cylindrical and spherical which I referred to in a handbook.
 
Last edited:
  • #7
Could you show me how to get "3" for the cylindrical and spherical? Thanks.
 
  • #8
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:
[tex]\vec r = \rho \hat \rho + z \hat z[/tex]
and
[tex]\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}[/tex]
For some vector function [itex]v=\langle v_{\rho},v_{\phi},v_z \rangle[/itex]

In spherical coordinates:

[tex]\vec r = r\hat r[/tex]
and
[tex]\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}[/tex]
for some vector function [itex]v=\langle v_r,v_{\theta},v_{\phi} \rangle[/itex]

Both give 3 as well:

[tex]\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[/tex]

[tex]\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[/tex]

You can't use the divergence in cylindrical or spherical coordinates when r=0 though.
 
Last edited:
  • #9
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 [tex] \vec{A} = a\vec{\rho} + b\vec{\phi} + c\vec{z} [/tex] where a, b, c are constants, is [tex] \vec{A} [/tex] a constant vector?

Similarly in spherical coordinates,
If [tex] \vec{A} = a\vec{r} + b\vec{\theta} + c\vec{\phi} [/tex] where a, b, c are constants, is [tex] \vec{A} [/tex] 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 [tex] \vec{A} [/tex] 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.
[tex] \vec{F}=m\vec{a} =0 [/tex]

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...
[tex] \vec{A} = a\vec{\rho} + b\vec{\phi} + c\vec{z} [/tex]

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

is A constant or not, sure we assume [tex] \vec{\rho}, \vec{\phi}, \vec{z} [/tex] 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 [tex] \vec{A} = a\vec{\rho} + b\vec{\phi} + c\vec{z} [/tex] where a, b, c are constants, is [tex] \vec{A} [/tex] a constant vector?

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

I think confusion has arised because of the way the question is posted.
I think you meant to say: "Is [itex]\vec A[/itex] 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:

[tex]\vec A(r,\theta,\phi) = \hat r[/tex]
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]
 
Back
Top