Homework Help: Deriving a forumla for the gradient in cylindrical coordinates

1. Sep 11, 2013

wifi

Problem:

Starting from the gradient of a scalar function T(x,y,z) in cartesian coordinates find the formula for the gradient of T(s,ϕ,z) in cylindrical coordinates.

Solution (so far):

I know that the gradient is given by $\nabla T = \frac{\partial T}{\partial x}\hat{x}+\frac{\partial T}{\partial y}\hat{y}+\frac{\partial T}{\partial z}\hat{z}$. We must use the chain rule, so we have $\frac{\partial T}{\partial x}(\frac{\partial z}{\partial x})=\frac{\partial T}{\partial s}(\frac{\partial s}{\partial x})+\frac{\partial T}{\partial ϕ}(\frac{\partial ϕ}{\partial x})+\frac{\partial T}{\partial z}(\frac{\partial z}{\partial x})$, $\frac{\partial T}{\partial y}=\frac{\partial T}{\partial s}(\frac{\partial s}{\partial y})+\frac{\partial T}{\partial ϕ}(\frac{\partial ϕ}{\partial y})+\frac{\partial T}{\partial z}(\frac{\partial z}{\partial y})$, and $\frac{\partial T}{\partial x}=\frac{\partial T}{\partial s}(\frac{\partial s}{\partial z})+\frac{\partial T}{\partial ϕ}(\frac{\partial ϕ}{\partial z})+\frac{\partial T}{\partial z}(\frac{\partial z}{\partial z})$.

So then I went and calculated $\hat{x}$ and $\hat{y}$ in terms of $\hat{s}$ and $\hat{ϕ}$. I got $\hat{x}=cosϕ\hat{s}-sinϕ\hat{ϕ}$ and $\hat{y}=sinϕ\hat{s}+cosϕ\hat{ϕ}$. Note that $\hat{x} \cdot \hat{x} =1$, $\hat{y} \cdot \hat{y}=1$, and $\hat{x} \cdot \hat{y} =0$ - as they should.

Since I need partials of s and ϕ with respect to x and y, I found the inversion formulas $s=\sqrt{x^2+y^2}$ and $ϕ=sin^{1}(\frac{y}{\sqrt{x^2+y^2}})$. (I used x=s cosϕ and y=s sinϕ)

Obviously $\frac{\partial ϕ}{\partial z}=0$ and $\frac{\partial s}{\partial z} =0$, but
I'm concerned with how complicated $\frac{\partial ϕ}{\partial x}$ and $\frac{\partial ϕ}{\partial y}$ are going to turn out.

Am I on the right track? Thanks in advance.

2. Sep 11, 2013

wifi

Actually, after differentiating and putting it in terms of ϕ, I got $\frac{\partial ϕ}{\partial x}=-\frac{1}{s}sinϕ$ and $\frac{\partial ϕ}{\partial y}=\frac{1}{s}cosϕ$ - That's not too bad. I'd still like to know if this is the correct approach, though.

3. Sep 11, 2013

wifi

Any input is appreciated!

4. Sep 12, 2013

vela

Staff Emeritus
Yup, keep going.

5. Sep 12, 2013

wifi

It worked! Praise the Lord!