The Student Room Group

Gradient of unit vectors in Spherical Coords

Hi there,

I'm doing a past paper (second year physics) and it's asking about the gradient of a cartesian coordinate z in terms of r\nabla r and θ\nabla \theta. The question is as follows:

In terms of spherical polar coordinates (r,θ,ϕ)(r, \theta , \phi) the Cartesian coordinates (x,y,z)(x, y, z) are given by
x=rsin(θ)cos(ϕ)x = r sin(\theta) cos(\phi) ; y=rsin(θ)sin(ϕ)y = r sin(\theta) sin(\phi) and z=rcos(θ)z = r cos(\theta)
Furthermore
i^=sin(θ)cos(ϕ)r+rcos(θ)cos(ϕ)θrsin(θ)sin(ϕ)ϕ\hat{i} = sin(\theta) cos(\phi) \nabla r + r cos(\theta) cos(\phi) \nabla \theta - r sin(\theta) sin(\phi) \nabla \phi
j^=sin(θ)sin(ϕ)r+rcos(θ)sin(ϕ)θ+rsin(θ)cos(ϕ)ϕ\hat{j} = sin(\theta) sin(\phi) \nabla r + r cos(\theta) sin(\phi) \nabla \theta + r sin(\theta) cos(\phi) \nabla \phi

(ii) Express k^=z\hat{k} = \nabla z in terms of r\nabla r and θ\nabla \theta.


Okay, so I attempted to use the definition of gradient in spherical coordinates:
f=frr^+1rfθθ^+1rsin(θ)fϕϕ^\nabla f = \frac{\partial f}{\partial r} \hat{r} + \frac{1}{r} \frac{\partial f}{\partial \theta} \hat{\theta} + \frac{1}{rsin(\theta)} \frac{\partial f}{\partial \phi} \hat{\phi}
Where r=r^,θ=θ^,ϕ=ϕ^\nabla r = \hat{r}, \nabla \theta = \hat{\theta}, \nabla \phi = \hat{\phi} (I assume this is correct for spherical - it works in Cartesian at least!)
But this doesn't give the correct result when applied to the i^\hat{i} vector given in the question.
After a bit of playing around with it I realised that it works if
f=frr^+fθθ^+fϕϕ^\nabla f = \frac{\partial f}{\partial r} \hat{r} + \frac{\partial f}{\partial \theta} \hat{\theta} + \frac{\partial f}{\partial \phi} \hat{\phi}
And this gives the correct value as provided in the mark scheme. I emailed my lecturer and he replied and said:
The correct formula is

x=xrr+xθθ+xϕϕ \nabla x= \frac{\partial x}{\partial r} \nabla {r} + \frac{\partial x}{\partial \theta} \nabla {\theta} + \frac{\partial x}{\partial \phi} \nabla {\phi}

this simply requires the function of a function rule.

Which seems to be in contradiction to every textbook and internet resource I can find. How can this be correct?

But taking what he said about a function of a function rule I deduce that
df=frdr+fθdθ+fϕdϕdf = \frac{\partial f}{\partial r}dr + \frac{\partial f}{\partial \theta}d \theta + \frac{\partial f}{\partial \phi}d \phi
If I substitute df, dr etc for f,r\nabla f, \nabla r etc then it seems to work, but that doesn't feel 'right' as I'd have to define an infinitesimal change in these quantities to be equal to their gradient...which just sounds plain wrong to me.
So, anyone got any ideas about how this might be resolved?

Thanks for taking the time to read this - please don't let my beautiful latex-ing go to waste!

(oh and apparently this question is suppose to take under 5 minutes)
(edited 11 years ago)
Reply 1
Your lecturer's (vector) formula
x=xrr+xθθ+xϕϕ\nabla x= \frac{\partial x}{\partial r} \nabla {r} + \frac{\partial x}{\partial \theta} \nabla {\theta} + \frac{\partial x}{\partial \phi} \nabla {\phi}
is really, taking a component at a time, three scalar formulas in one:
xx=xrrx+xθθx+xϕϕx \frac{\partial x}{\partial x} = \frac{\partial x}{\partial r} \frac{\partial r}{\partial x} + \frac{\partial x}{\partial \theta} \frac{\partial \theta}{\partial x} + \frac{\partial x}{\partial \phi} \frac{\partial \phi}{\partial x}
xy=xrry+xθθy+xϕϕy \frac{\partial x}{\partial y} = \frac{\partial x}{\partial r} \frac{\partial r}{\partial y} + \frac{\partial x}{\partial \theta} \frac{\partial \theta}{\partial y} + \frac{\partial x}{\partial \phi} \frac{\partial \phi}{\partial y}
xz=xrrz+xθθz+xϕϕz \frac{\partial x}{\partial z} = \frac{\partial x}{\partial r} \frac{\partial r}{\partial z} + \frac{\partial x}{\partial \theta} \frac{\partial \theta}{\partial z} + \frac{\partial x}{\partial \phi} \frac{\partial \phi}{\partial z}
Those all look to me like applications of the chain rule.
Reply 2
Original post by Jonny W
Your lecturer's (vector) formula
x=xrr+xθθ+xϕϕ\nabla x= \frac{\partial x}{\partial r} \nabla {r} + \frac{\partial x}{\partial \theta} \nabla {\theta} + \frac{\partial x}{\partial \phi} \nabla {\phi}
is really, taking a component at a time, three scalar formulas in one:
xx=xrrx+xθθx+xϕϕx \frac{\partial x}{\partial x} = \frac{\partial x}{\partial r} \frac{\partial r}{\partial x} + \frac{\partial x}{\partial \theta} \frac{\partial \theta}{\partial x} + \frac{\partial x}{\partial \phi} \frac{\partial \phi}{\partial x}
xy=xrry+xθθy+xϕϕy \frac{\partial x}{\partial y} = \frac{\partial x}{\partial r} \frac{\partial r}{\partial y} + \frac{\partial x}{\partial \theta} \frac{\partial \theta}{\partial y} + \frac{\partial x}{\partial \phi} \frac{\partial \phi}{\partial y}
xz=xrrz+xθθz+xϕϕz \frac{\partial x}{\partial z} = \frac{\partial x}{\partial r} \frac{\partial r}{\partial z} + \frac{\partial x}{\partial \theta} \frac{\partial \theta}{\partial z} + \frac{\partial x}{\partial \phi} \frac{\partial \phi}{\partial z}
Those all look to me like applications of the chain rule.

Yes, I think I can see how this works. By taking the sum (with the appropriate unit vectors put in place?) and then factorising, the expressions for gradient can be obtained.

Thanks!
+rep heading your way.

Quick Reply

Latest