# Switching coordinate system of a field

1. Apr 13, 2017

### 2sin54

1. The problem statement, all variables and given/known data
Say I have some sort of a vector field in the cylindrical coordinate system $$\vec{F}(r, \Theta, z) = f(\vec{A}(r,\Theta,z),\vec{B}(r,\Theta,z))$$

How do I switch to the Cartesian coordinates? More precisely, how do I transform $$A_r = g(A_x,A_y,A_z), A_\Theta = h(A_x,A_y,A_z)$$ and so on?
2. Relevant equations

https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates

3. The attempt at a solution

I understand that $${\left(A_z\right)}_{cyl.} = {\left(A_z\right)}_{Cart.}$$
and similarly for B and that
$$A_x = A_r\cdot\cos(\Theta), A_y = A_r\cdot\sin(\Theta$$.

However, what do I do with $$A_\Theta$$?

2. Apr 13, 2017

### kuruman

$\vec{A}=A_r~\hat{r}+A_{\theta}~\hat{\theta}$
$\hat{r}=\cos \theta~\hat{x}+\sin \theta~\hat{y}$ and $\hat{\theta}=-\sin \theta~\hat{x}+\cos \theta~\hat{y}$
Therefore,
$\vec{A}=A_r~(\cos \theta~\hat{x}+\sin \theta~\hat{y})+A_{\theta}~(-\sin \theta~\hat{x}+\cos \theta~\hat{y})$
From which
$A_x = A_r~\cos \theta - A_{\theta}~\sin \theta~;~~ A_y = A_r~\sin \theta+A_{\theta}\cos \theta$
Is this what you are looking for?

3. Apr 13, 2017

### 2sin54

I don't see $$A_z$$ in your equations. Why is that? Also, one can express $$\Theta$$ as $$= \arctan(\frac{y}{x})$$ correct? But what's the meaning of it when x = 0? If I am solving a physics problem then surely the set of points for which x = 0 aren't necessarily impossible.

4. Apr 13, 2017

### kuruman

You don't see Az because it is the same in Cartesian and cylindrical coordinates. I omitted it to save time, but you can assume it's there.
What makes you think these points might be impossible? When x = 0, the vector points either along the +y axis in which case θ = π/2 or along the -y axis in which case θ = 3π/2.

5. Apr 13, 2017

### 2sin54

Thank you for your answers. One more question. Assuming $$A_x = A_r\cdot\cos(\Theta), A_\Theta = 0$$ If I wish to find how Ax changes with time is the following approach correct?
$$\frac{dA_x}{dt} = \frac{dA_r}{dt}\cdot\cos(\Theta) - A_r\cdot\sin(\Theta)\cdot\frac{d\Theta}{dt}$$

6. Apr 13, 2017

### kuruman

That is correct. It says that when $A_x$ changes with time, it can happen either because $A_r$ changes or because the angle changes or both.