# Thread: Express vectors in different coordinate systems

1. ## Express vectors in different coordinate systems

I don't understand this problem. This is supposedly a review question from calc 3, but I've never seen anything like this before. Fortunately, I solved it, but I just don't understand what I did. (It's probably the weird notation I'm not used to.)

Express the r-component, $\displaystyle A_r$, or a vector A at $\displaystyle ($$\displaystyle r_1,$$\displaystyle \phi_1$$\displaystyle , z_1$$\displaystyle )$

(A) In terms of $\displaystyle A_x$ and $\displaystyle A_y$ in Cartesian coordinates, and
(B) in terms of $\displaystyle A_r$ and $\displaystyle A_\theta$ in spherical coordinates.

My book says:
"The vector $\displaystyle A$ in Cartesian coordinates with components $\displaystyle A_x, A_y, and A_z$ can be written as:

$\displaystyle A$ $\displaystyle = a_x$ $\displaystyle A_x +$ $\displaystyle a_y$ $\displaystyle A_y +$ $\displaystyle a_z$ $\displaystyle A_z$

(A) $\displaystyle A_x cos(\phi_1) + A_y sin(\phi_1)$
(B) $\displaystyle A_r \frac{r_1}{\sqrt(r_1^2+z_1^2)} + A_\theta \frac{r_1}{\sqrt(r_1^2+z_1^2)}$

So for part (A), is that written in the same form as the unit vectors i hat, j hat, and k hat? And for part (B), why are both components divided by the radius?

2. If you have a transform $\displaystyle u_1 = f_1(x,y,z), u_2 = f_2(x,y,z), u_3 = f_3(x,y,z)$

then
$\displaystyle \bold{e}_i \equiv \frac{1}{h_i}\frac{\partial \bold{r}}{\partial u_i}$ where $\displaystyle h_i \equiv \left|\frac{\partial \bold{r}}{\partial u_i} \right|$

In this case we have
$\displaystyle x = r\cos\phi, y = r\sin\phi, z = z$
$\displaystyle \bold{r}(r, \phi, z) = r\cos\phi\bold{e}_x + r\sin\phi\bold{e}_y + z\bold{e}_z \implies \frac{\partial \bold{r}}{\partial r}= \cos\phi\bold{e}_x + \sin\phi\bold{e}_y \implies h_r = \left|\frac{\partial \bold{r}}{\partial r} \right|=\sqrt{\cos^2\phi + \sin^2\phi}=1$

This gives us $\displaystyle \bold{e}_r = \frac{1}{h_r}\frac{\partial \bold{r}}{\partial r}=\cos\phi\bold{e}_x + \sin\phi\bold{e}_y$

3. It's a bit confusing to have the radial component be called r in both the cylindrical and spherical coordinates, so I'll use r=R in spherical coordinates.

To convert from one basis to another, you can use this little trick:
$\displaystyle \bold{e}_r = grad(r)=/r=R\sin\theta/=grad(R\sin\theta)=\sin\theta \bold{e}_R + \cos\theta\bold{e}_\theta = \left/ R = \sqrt{r^2+z^2}, \sin\theta = \frac{r}{\sqrt{r^2+z^2}}, z = R\cos\theta\right /=\frac{r}{\sqrt{r^2+z^2}}\bold{e}_R + \frac{z}{\sqrt{r^2+z^2}}\bold{e}_\theta$

Not getting the same answer as you though...

4. nvm

5. First, a simple example: $\displaystyle \bold{e}_x=grad(x)=\frac{\partial x}{\partial x}\bold{e}_x+\frac{\partial x}{\partial y}\bold{e}_y+\frac{\partial x}{\partial z}\bold{e}_z$

For curvilinear coordinates, we also need to scale the gradient:
$\displaystyle \bold{e}_r=grad(r)=grad(R\sin\theta)=\frac{1}{h_r} \frac{\partial}{\partial r}\left(R\sin\theta\right)\bold{e}_r+\frac{1} {h_{\theta}} \frac{\partial}{\partial \theta}\left(R\sin\theta\right)\bold{e}_{\theta} + \frac{1}{h_{\varphi}} \frac{\partial}{\partial \varphi}\left(R\sin\theta\right)\bold{e}_\varphi$

Remember that $\displaystyle h_r = 1, h_\theta=R, h_\varphi = R\sin\theta$

The function I'm taking the graident of is $\displaystyle f(r, \phi, z)=r = f(R\sin\theta, \varphi, R\cos\theta)=R\sin\theta$