# Thread: simple doubt : vector field in cylindrical coordinates

1. ## simple doubt : vector field in cylindrical coordinates

Hello Mathematicians! I have the answer to a very simple problem, but I dont understand it.
Following vector field is given:

G(x,y,z) = (x - yz, y+xz, z)

I am asked to write the representation Ĝ(r, fi, z) of the given field in cylindrical coordinates (where fi is the angle).

So here´s what I wrote:

Ĝ(r, fi, z)= ( r( cos(fi)-zsin(fi) ) , r( sin(fi) + zcos(fi) ) , z ) I just substituted x= rcos(fi) and y=rsin(fi)

But this is the answer that comes in the answers paper:

Ĝ(r, fi, z) = (r , zr, z) Doesnt make any sense to me... Could it be a mistake in the solutions paper?

Could someone explain why the answer is so, and why what I wrote is wrong?
Thanks!!

2. ## Re: simple doubt : vector field in cylindrical coordinates

Originally Posted by Phyba
Hello Mathematicians! I have the answer to a very simple problem, but I dont understand it.
Following vector field is given:

G(x,y,z) = (x - yz, y+xz, z)

I am asked to write the representation Ĝ(r, fi, z) of the given field in cylindrical coordinates (where fi is the angle).

So here´s what I wrote:

Ĝ(r, fi, z)= ( r( cos(fi)-zsin(fi) ) , r( sin(fi) + zcos(fi) ) , z ) I just substituted x= rcos(fi) and y=rsin(fi)

But this is the answer that comes in the answers paper:

Ĝ(r, fi, z) = (r , zr, z) Doesnt make any sense to me... Could it be a mistake in the solutions paper?

Could someone explain why the answer is so, and why what I wrote is wrong?
Thanks!!
You transformation is wrong. You have G(x, y, z) = (x - yz, y + xz, z). Here the "x" coordinate is actually x - yz, etc. So...
$\displaystyle r = \sqrt{ (x - yz)^2 + (y + xz)^2}$

etc.

-Dan

3. ## Re: simple doubt : vector field in cylindrical coordinates

Thank you Dan for your answer! So clearly I am not understanding the principle of transforming coordinates at all...
I'm very confused , but trying to understand how one carries out the transformation...
So you wrote r in term of the "x" and "y" coordinates

Now, how is the first funcion of the field Ĝ1 = r ? How is equivalent to (x - yz)^2 ....
And how is Ĝ2 = rz ?

Could you please explain it briefly or provide a link with an explanation that will allow me to understand how it works?

Regards,

Phyba

4. ## Re: simple doubt : vector field in cylindrical coordinates

Given a vector in Cartesian coordinates $\displaystyle (a_x, a_y, a_z)$ then we have
$\displaystyle r = \sqrt{a_x ^2 + a_y ^2}$
$\displaystyle \phi = tan^{-1} \left ( \dfrac{a_y}{a_x} \right )$
$\displaystyle z = z$

In this instance you have, in Cartesian coordinates for G, $\displaystyle g_x = x - yz$, $\displaystyle g_y = y + xz$, and $\displaystyle g_z = z$. The tranformation above gives G in terms of cylindrical coordinates as a function of x, y, z.

-Dan

Addendum: Perhaps I should mention that x, y, and z are not the Cartesian components of G. The notation is, IMHO, somewhat confusing.

5. ## Re: simple doubt : vector field in cylindrical coordinates

Ok, so I get what (r, ϕ ,z )are written in terms of (x,y,z)...
Now, how do we get to ĝ1 = r , ĝ2 = rz ?

ĝ3 = z does makes sense to me on its own, as there is nothing to transform in this coordinate

6. ## Re: simple doubt : vector field in cylindrical coordinates

Okay. Sorry, I misread what you were asking. I have no idea how to get to their answer. My guess is a typo, but that's one heck of a typo. Is it possible that this is the solution to another problem?

I would have to say that the answer key is wrong.

-Dan

7. ## Re: simple doubt : vector field in cylindrical coordinates

What's going on is that you are neglecting to restate the field in the new unit vectors

The field is given as

$G = (x-yz)\hat{x} + (y+x z) \hat{y} + z \hat{z}$

we want the field components as

$G = G_r \hat{r} + G_\theta \hat{\theta} + G_z \hat{z}$

we do this by dotting the cartesian unit vectors with the cylindrical unit vectors

$G_r = G_x \hat{x}\cdot \hat{r} + G_y \hat{y}\cdot \hat{r}$
$G_r = G_x \cos(\theta) + G_y \sin(\theta)$

$G_\theta = G_x \hat{x} \cdot \hat{\theta} + G_y \hat{y}\cdot \hat{\theta}$
$G_\theta = -G_x \sin(\theta) + G_y \cos(\theta)$

$G_r = r(\cos(\theta)- z\sin(\theta))\cos(\theta) + r(\sin(\theta)+z\cos(\theta))\sin(\theta) = r$

$G_\theta =-r(\cos(\theta)- z\sin(\theta))\sin(\theta) + r(\sin(\theta)+z\cos(\theta))\cos(\theta) = rz$

I leave it to you to confirm the algebra.

8. ## Re: simple doubt : vector field in cylindrical coordinates

Ahhhhh... I forgot about transforming the unit vectors.

Good catch!

-Dan

9. ## Re: simple doubt : vector field in cylindrical coordinates

Ah, I see now! I forgot that one must take the unit vectors into account. Thank you so much, now I know how it works.
I upload here the solution worked out by myself in case somebody might find it useful in the future.

To carry out the dot-product of unit vectors, I used the cartesian2cylindrical-transformation matrix that I found in the following link (I didnt know myself how the cylindrical unit vectors look like) :
https://en.wikipedia.org/wiki/Vector...al_coordinates

Thank you so much!