# Question on Divergence in Cylindrical Coords

1. May 14, 2005

### Spectre5

Hey, I have a question on a derivation

The following is in my textbook (V = vector):

$$\nabla \cdot V = \frac {1}{r} \frac {\partial{(rV_{r}})}{\partial{r}} + \frac {1}{r} \frac {\partial{V_{\theta}}}{\partial{\theta}} + \frac {\partial{V_{z}}}{\partial{z}}$$

where:

$$\nabla = \hat {r} \frac {\partial}{\partial {r}} + \hat {\theta} \frac {1}{r} \frac {\partial}{\partial {\theta}} + \hat {k} \frac {\partial}{\partial {z}}$$

and

$$V = \hat {r}V_{r} + \hat {\theta}V_{\theta} + \hat {k}V_{z}$$

This is, obviously, in cylindrical coordinates.

However, I would expect the result to be as follows:

$$\nabla \cdot V = \frac {\partial{V_{r}}}{\partial{r}} + \frac {1}{r} \frac {\partial{V_{\theta}}}{\partial{\theta}} + \frac {\partial{V_{z}}}{\partial{z}}$$

Where did I go wrong? The second two terms I get the same thing, but I am confused on where that first term comes from in the given formula. Thanks in advance.

2. May 14, 2005

### arildno

Remember that the radial and angular unit VECTORS are also functions of the angular variable. That's where your mistake lies..

3. May 14, 2005

### Spectre5

Don't we just multiply the components in the r, theta, and z direction and add the results just like we do in the x, y, z space?

4. May 14, 2005

### Spectre5

I do know that

$$\frac {\partial{\hat {r}}}{\partial{\theta}} = \hat {\theta}$$

and

$$\frac {\partial{\hat {\theta}}}{\partial{\theta}} = - \hat {r}$$

I would assume I need these, but I have no idea where to use them or exactly why.

5. May 14, 2005

### arildno

Nope, here's one way of doing this:
In a slightly different notation than yours, we have:
$$\nabla=\vec{i}_{r}\frac{\partial}{\partial{r}}+\vec{i}_{\theta}\frac{\partial}{r\partial\theta}+\vec{i}_{z}\frac{\partial}{\partial{z}},\vec{V}=v_{r}\vec{i}_{r}+v_{\theta}\vec{i}_{\theta}+v_{z}\vec{i}_{z}$$
Furthermore, we have the orthogonality relations:
$$\vec{i}_{r}\cdot\vec{i}_{\theta}=\vec{i}_{r}\cdot\vec{i}_{z}=\vec{i}_{\theta}\cdot\vec{i}_{z}=0$$
Along with the differential relations:
$$\frac{\partial\vec{i}_{r}}{\partial{r}}=\frac{\partial\vec{i}_{\theta}}{\partial{r}}=\frac{\partial\vec{i}_{z}}{\partial{r}}=\frac{\partial\vec{i}_{r}}{\partial{z}}=\frac{\partial\vec{i}_{\theta}}{\partial{z}}=\frac{\partial\vec{i}_{z}}{\partial{z}}=\vec{0}$$
$$\frac{\partial\vec{i}_{r}}{\partial\theta}=\vec{i}_{\theta},\frac{\partial\vec{i}_{\theta}}{\partial\theta}=-\vec{i}_{r},\frac{\partial\vec{i}_{z}}{\partial\theta}=\vec{0}$$
Thus:
$$\nabla\cdot\vec{V}=\vec{i}_{r}\cdot\frac{\partial\vec{V}}{\partial{r}}+\vec{i}_{\theta}\cdot\frac{\partial\vec{V}}{r\partial\theta}+\vec{i}_{z}\cdot\frac{\partial\vec{V}}{\partial{z}}$$
All that remains, is now to differentiate properly, calculate the various dot products appearing in your expression, and simplify...

Last edited: May 14, 2005
6. May 14, 2005

### Spectre5

Why do those two have that special relation but all of the other ones are zero?

Also...why are you including the unit vectors in the dot product??? I thought you just multiply the parts in the same direction and add them?

I thought the dot product was defined as:

a (dot) b = (a_x)(b_x) + (a_y)(b_y) + (a_z)(b_z) (no unit vectors here, so why are there unit vectors with cylindrical)

7. May 14, 2005

### dextercioby

No,no,the dot product is what it is:a contracted tensor product between the 2 vectors.Vectors should be expressed in a (preferably orthonormal) basis,so that the computations should be easier...

$$\vec{a}\cdot\vec{b}=\left(a_{x}\vec{i}+...+a_{z}\vec{k}\right)\cdot\left(b_{x}\vec{i}+...+b_{z}\vec{k}\right)$$

Daniel.

8. May 14, 2005

### arildno

"Why do those two have that special relation but all of the other ones are zero?"
Because none of the unit vectors depend on "r" or "z", whereas only the radial and angular unit vectors depend on the angle.

Well, look at the Cartesian case (i.e, with $$\vec{V}=\vec{V}(x,y,z)$$):
You can perfectly well write that in the same manner:
$$\nabla\cdot\vec{V}=\vec{i}_{x}\cdot\frac{\partial{\vec{V}}}{\partial{x}}+\vec{i}_{y}\cdot\frac{\partial\vec{V}}{\partial{y}}+\vec{i}_{z}\cdot\frac{\partial\vec{V}}{\partial{z}}$$
We now have:
$$\frac{\partial\vec{V}}{\partial{x}}=\frac{\partial{v}_{x}\vec{i}_{x}}{\partial{x}}+\frac{\partial{v}_{y}\vec{i}_{y}}{\partial{x}}+\frac{\partial{v}_{z}\vec{i}_{z}}{\partial{x}}$$
Now, observe the following in the Cartesian case:
1) None of the unit vectors depends on "x", that is, we have for example:
$$\frac{\partial{v}_{x}\vec{i}_{x}}{\partial{x}}=\frac{\partial{v}_{x}}{\partial{x}}\vec{i}_{x}$$
2) $$\vec{i}_{x}\cdot\vec{i}_{y}=\vec{i}_{x}\cdot\vec{i}_{z}=0,\vec{i}_{x}\cdot\vec{i}_{x}=1$$
Thus, we have the following simplification:
$$\vec{i}_{x}\cdot\frac{\partial\vec{V}}{\partial{x}}=\frac{\partial{v}_{x}}{\partial{x}}$$
Similar relations hold for the y-and z derivations; thus, we regain the familiar expression:
$$\nabla\cdot\vec{V}=\frac{\partial{v}_{x}}{\partial{x}}+\frac{\partial{v}_{y}}{\partial{y}}+\frac{\partial{v}_{z}}{\partial{z}}$$

Last edited: May 14, 2005
9. May 14, 2005

### Spectre5

ok, ok.....so i'm an idiot....I think I got it now, thanks for all the help!

One last thing though, why do the r and theta vectors depend on theta whereas all the others don't?

Obviously z would not depend on theta, and obviously theta would depend on the angle theta, but why does r depend on theta. I wouldn't think that the distance you move outwards would depend on the angle you are at?

10. May 14, 2005

### arildno

"r" does not depend on the angle, but THE RADIAL UNIT VECTOR does!!!

11. May 14, 2005

### dextercioby

The unit vector along "r" does,since it's a vector.Its modulus doesn't change as a function of angle,but its direction does...

EDIT:Mine,too.Arildno,take it easy.The shock wave that came to Belgium with the sound of your scream almost broke my window... :surprised

Daniel.

Last edited: May 14, 2005
12. May 14, 2005

### arildno

Sure, but the "outward" direction at one angle value is not PARALLELL to the "outward" direction at another angle value..

EDIT: I see a post got deleted here.
My post is an answer to that deleted post.

13. May 14, 2005

### Spectre5

Isn't the unit r vector just in the outward direction from the z axis though? I realize that in x-y-z coordinates that the r vector would change with changing theta, but cylindrical coords are different

EDIT: No, you just looked like a mind reader cuz it was a response to this post (which was deleted then reposted with different wording)

Last edited: May 14, 2005
14. May 14, 2005

### Spectre5

errr....um ok...I guess i'll just have to try thinking about it some more...anyways thanks for the help guys!