Gradient of unit vectors in Spherical Coords

Maths and statistics discussion, revision, exam and homework help.

Announcements Posted on
IMPORTANT: You must wait until midnight (morning exams)/4.30AM (afternoon exams) to discuss Edexcel exams and until 1pm/6pm the following day for STEP and IB exams. Please read before posting, including for rules for practical and oral exams. 28-04-2013
Sign in to Reply
  1. Manitude's Avatar
    • TSR Idol
    • Location: The Grim North West
    • Posts: 8,331
    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 \nabla r and \nabla \theta. The question is as follows:
    In terms of spherical polar coordinates (r, \theta , \phi) the Cartesian coordinates (x, y, z) are given by
    x = r sin(\theta) cos(\phi) ; y = r sin(\theta) sin(\phi) and z = r cos(\theta)
    Furthermore
    \hat{i} = sin(\theta) cos(\phi) \nabla r + r cos(\theta) cos(\phi) \nabla \theta - r sin(\theta) sin(\phi) \nabla \phi
    \hat{j} = sin(\theta) sin(\phi) \nabla r + r cos(\theta) sin(\phi) \nabla \theta + r sin(\theta) cos(\phi) \nabla \phi

    (ii) Express \hat{k} = \nabla z in terms of \nabla r and \nabla \theta.
    Okay, so I attempted to use the definition of gradient in spherical coordinates:
    \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 \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 \hat{i} vector given in the question.
    After a bit of playing around with it I realised that it works if
    \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

     \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 = \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 \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)
    Last edited by Manitude; 02-06-2012 at 22:36.
  2. Jonny W's Avatar
    • Overlord in Training
    Re: Gradient of unit vectors in Spherical Coords
    Your lecturer's (vector) formula
    \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:
     \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}
     \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}
     \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.
  3. Manitude's Avatar
    • TSR Idol
    • Location: The Grim North West
    • Posts: 8,331
    Re: Gradient of unit vectors in Spherical Coords
    (Original post by Jonny W)
    Your lecturer's (vector) formula
    \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:
     \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}
     \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}
     \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.
Sign in to Reply
Share this discussion:  
Article updates
Moderators

We have a brilliant team of more than 60 volunteers looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Reputation gems:
The Reputation gems seen here indicate how well reputed the user is, red gem indicate negative reputation and green indicates a good rep.
Post rating score:
These scores show if a post has been positively or negatively rated by our members.