# Coordinate systems

1. Aug 27, 2011

### shyta

1. The problem statement, all variables and given/known data

For the cartesian, cylindrical, spherical coordinate system,
prove that
$\nabla$.$\vec{r}$ = 3 and $\nabla$x$\vec{r}$=0

2. Relevant equations
For cylindrical coord system,

$\vec{r}$ = s$\vec{s}$ + z$\vec{z}$

$\nabla$ = $\vec{s}$ $\delta$/$\delta$s + $\vec{\varphi}$$\frac{1}{\varphi}$$\delta$/$\delta$$\varphi$ + $\vec{z}$ $\delta$/$\delta$z

3. The attempt at a solution

Hi guys, I managed to do the cartesian coord part, but I'm having trouble with the cylindrical/spherical parts. Using these 2 equations I tried to do a dot product but I'm getting a 2 instead. What am I doing wrongly here?

Last edited: Aug 27, 2011
2. Aug 27, 2011

### I like Serena

3. Aug 27, 2011

### shyta

Ops, I meant the cross of r. (edited that, thanks for pointing out) I'm pretty sure the gradient formula is correct as checked on the wiki link you gave. Do you mean my r vector is wrong? $\vec{r}$ = s$\vec{s}$ + z$\vec{z}$

Well I looked through my workings and I'm quite sure I got that right as well. Perhaps you could be more specific?

Thanks i like serena!

4. Aug 27, 2011

### I like Serena

The formula for divergence in cylindrical coordinates is:
$$\nabla \cdot \vec A = {1 \over s}{\partial \left( s A_s \right) \over \partial s} + {1 \over s}{\partial A_\phi \over \partial \phi} + {\partial A_z \over \partial z}$$
As you can see this does not match what you have.

$$\nabla \cdot \vec r = {1 \over s}{\partial \left( s \cdot s \right) \over \partial s} + {\partial z \over \partial z}$$

5. Aug 28, 2011

### shyta

Hmmmmm okay I can see how that would give me the correct answer.. But still I am a little confused about this formula on wiki because in my text book, the gradient in cylindrical coordinates formula is as the one I stated above. In particular,

vs just $${\partial \left( A_s \right) \over \partial s}$$

Thanks for the replies!!

6. Aug 28, 2011

### I like Serena

On the same wiki page you can see that you have the formula for gradient in cylindrical coordinates almost right.
Except for you putting a phi, where there should be an "s".

Note that the formulas for gradient, divergence and curl are not trivial in cylindrical or spherical coordinates.
It takes some work to derive these formulas.
Are they not in your textbook?

7. Aug 28, 2011

### shyta

ohh!! I got it!! omg lol thanks alot!